diff --git a/tests/Makefile.am b/tests/Makefile.am index 1e99c44a..099638c9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -738,7 +738,6 @@ EXTRA_DIST = init.sh run.sh match.awk \ ipc_msgbuf.expected \ ksysent.sed \ lstatx.c \ - memfd_create.expected \ mq.expected \ net.expected \ oldselect.expected \ diff --git a/tests/memfd_create.c b/tests/memfd_create.c index 9fe7f6d4..2b1bd026 100644 --- a/tests/memfd_create.c +++ b/tests/memfd_create.c @@ -1,13 +1,21 @@ #include "tests.h" -#include #include #ifdef __NR_memfd_create +# include +# include + int main(void) { - syscall(__NR_memfd_create, "strace", 7); + 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; } diff --git a/tests/memfd_create.expected b/tests/memfd_create.expected deleted file mode 100644 index 6fb938fd..00000000 --- a/tests/memfd_create.expected +++ /dev/null @@ -1 +0,0 @@ -memfd_create\("strace", MFD_CLOEXEC\|MFD_ALLOW_SEALING\|0x4\) += -1 .* diff --git a/tests/memfd_create.test b/tests/memfd_create.test index 6a34fc13..4361dae4 100755 --- a/tests/memfd_create.test +++ b/tests/memfd_create.test @@ -1,11 +1,6 @@ #!/bin/sh -# Check memfd_create syscall decoding. +# Check decoding of memfd_create syscall. . "${srcdir=.}/init.sh" - -run_prog -run_strace -e memfd_create $args -match_grep - -exit 0 +run_strace_match_diff