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.
This commit is contained in:
parent
b9bc216fdd
commit
c4fdce5cea
@ -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 \
|
||||
|
@ -1,13 +1,21 @@
|
||||
#include "tests.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __NR_memfd_create
|
||||
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
memfd_create\("strace", MFD_CLOEXEC\|MFD_ALLOW_SEALING\|0x4\) += -1 .*
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user