tests: convert epoll_create1.test from match_grep to match_diff
* tests/epoll_create1.c (main): Print expected output. * tests/epoll_create1.test: Use match_diff instead of match_grep. * tests/epoll_create1.expected: Remove. * tests/Makefile.am (EXTRA_DIST): Remove epoll_create1.expected.
This commit is contained in:
parent
6e65922a32
commit
6267e4b0e3
@ -307,7 +307,6 @@ AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh
|
|||||||
EXTRA_DIST = init.sh run.sh match.awk \
|
EXTRA_DIST = init.sh run.sh match.awk \
|
||||||
caps.awk \
|
caps.awk \
|
||||||
dumpio.expected \
|
dumpio.expected \
|
||||||
epoll_create1.expected \
|
|
||||||
eventfd.expected \
|
eventfd.expected \
|
||||||
execve.expected \
|
execve.expected \
|
||||||
execve-v.expected \
|
execve-v.expected \
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "tests.h"
|
#include "tests.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
|
|
||||||
@ -37,9 +38,15 @@ int
|
|||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
(void) close(0);
|
(void) close(0);
|
||||||
|
|
||||||
if (syscall(__NR_epoll_create1, O_CLOEXEC))
|
if (syscall(__NR_epoll_create1, O_CLOEXEC))
|
||||||
perror_msg_and_skip("epoll_create1 O_CLOEXEC");
|
perror_msg_and_skip("epoll_create1 O_CLOEXEC");
|
||||||
|
puts("epoll_create1(EPOLL_CLOEXEC) = 0");
|
||||||
|
|
||||||
assert(syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK) == -1);
|
assert(syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK) == -1);
|
||||||
|
printf("epoll_create1(EPOLL_CLOEXEC|%#x) = -1 EINVAL (%m)\n", O_NONBLOCK);
|
||||||
|
|
||||||
|
puts("+++ exited with 0 +++");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
epoll_create1\(EPOLL_CLOEXEC\) += 0
|
|
||||||
epoll_create1\(EPOLL_CLOEXEC\|0x[[:xdigit:]]+\) += -1 EINVAL .*
|
|
@ -4,8 +4,10 @@
|
|||||||
|
|
||||||
. "${srcdir=.}/init.sh"
|
. "${srcdir=.}/init.sh"
|
||||||
|
|
||||||
run_prog
|
run_prog > /dev/null
|
||||||
run_strace -e epoll_create1 $args
|
OUT="$LOG.out"
|
||||||
match_grep
|
run_strace -a28 -eepoll_create1 $args > "$OUT"
|
||||||
|
match_diff "$LOG" "$OUT"
|
||||||
|
rm -f "$OUT"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user