strace/tests/memfd_create.c
Dmitry V. Levin c4fdce5cea memfd_create.test: rewrite from match_grep to match_diff
* tests/memfd_create.c (main): Print expected output.
* tests/memfd_create.test: Use run_strace_match_diff.
* tests/memfd_create.expected: Remove.
* tests/Makefile.am (EXTRA_DIST): Remove it.
2016-07-30 22:52:27 +00:00

27 lines
440 B
C

#include "tests.h"
#include <sys/syscall.h>
#ifdef __NR_memfd_create
# include <stdio.h>
# include <unistd.h>
int
main(void)
{
static const char text[] = "strace";
int rc = syscall(__NR_memfd_create, text, 7);
printf("memfd_create(\"%s\", %s) = %d %s (%m)\n",
text, "MFD_CLOEXEC|MFD_ALLOW_SEALING|0x4", rc, errno2name());
puts("+++ exited with 0 +++");
return 0;
}
#else
SKIP_MAIN_UNDEFINED("__NR_memfd_create")
#endif