tests: tabulate read-write.test

* tests/gen_tests.in (read-write): New entry.
* tests/read-write.c: (main): Skip the test if /proc/self/fd/
is not available.
* tests/read-write.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove read-write.test.
This commit is contained in:
Дмитрий Левин 2017-04-19 02:16:31 +00:00
parent 9f93fd094f
commit 12f6562f2b
4 changed files with 4 additions and 17 deletions

View File

@ -216,7 +216,6 @@ DECODER_TESTS = \
prctl-tsc.test \
pread64-pwrite64.test \
qual_fault-exit_group.test \
read-write.test \
readv.test \
regex.test \
sched.test \

View File

@ -214,6 +214,7 @@ quotactl
quotactl-v -v -e trace=quotactl
quotactl-xfs -e trace=quotactl
quotactl-xfs-v -v -e trace=quotactl
read-write -a15 -eread=0 -ewrite=1 -e trace=read,write -P read-write-tmpfile -P /dev/zero -P /dev/null
readahead -a1
readdir -a16
readlink -xx

View File

@ -137,7 +137,9 @@ main(void)
{
tprintf("%s", "");
static char tmp[] = "read-write-tmpfile";
skip_if_unavailable("/proc/self/fd/");
static const char tmp[] = "read-write-tmpfile";
if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0)
perror_msg_and_fail("creat: %s", tmp);
if (open(tmp, O_WRONLY) != 1)

View File

@ -1,15 +0,0 @@
#!/bin/sh
# Check decoding and dumping of read and write syscalls.
. "${srcdir=.}/init.sh"
# strace -P is implemented using /proc/self/fd
[ -d /proc/self/fd/ ] ||
framework_skip_ '/proc/self/fd/ is not available'
tmpfile=read-write-tmpfile
run_strace_match_diff \
-a15 -eread=0 -ewrite=1 -e trace=read,write \
-P $tmpfile -P /dev/zero -P /dev/null