fanotify_mark.test: rewrite from match_grep to match_diff

* tests/fanotify_mark.c (main): Print expected output.
* tests/fanotify_mark.test: Use run_strace_match_diff.
* tests/fanotify_mark.expected: Remove.
* tests/Makefile.am (EXTRA_DIST): Remove it.
This commit is contained in:
Дмитрий Левин 2016-08-01 22:10:44 +00:00
parent 884e1e930b
commit 79bbee8368
4 changed files with 9 additions and 10 deletions

View File

@ -728,7 +728,6 @@ EXTRA_DIST = init.sh run.sh match.awk \
caps.awk \
count-f.expected \
eventfd.expected \
fanotify_mark.expected \
filter-unavailable.expected \
fstatat.c \
fstatx.c \

View File

@ -2,12 +2,18 @@
#if defined HAVE_SYS_FANOTIFY_H && defined HAVE_FANOTIFY_MARK
# include <stdio.h>
# include <sys/fanotify.h>
int
main(void)
{
fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY | FAN_ONDIR, -100, ".");
int rc = fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY | FAN_ONDIR,
-100, ".");
printf("fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY|FAN_ONDIR"
", AT_FDCWD, \".\") = %d %s (%m)\n", rc, errno2name());
puts("+++ exited with 0 +++");
return 0;
}

View File

@ -1 +0,0 @@
fanotify_mark\(-1, FAN_MARK_ADD, FAN_MODIFY\|FAN_ONDIR, AT_FDCWD, "\."\) += -1.*

View File

@ -1,11 +1,6 @@
#!/bin/sh
# Check fanotify_mark syscall decoding.
# Check decoding of fanotify_mark syscall.
. "${srcdir=.}/init.sh"
run_prog
run_strace -efanotify_mark $args
match_grep
exit 0
run_strace_match_diff