diff --git a/tests/attach-f-p-cmd.c b/tests/attach-f-p-cmd.c index 77594beb..db8e1a2e 100644 --- a/tests/attach-f-p-cmd.c +++ b/tests/attach-f-p-cmd.c @@ -34,6 +34,8 @@ int main(void) { + skip_if_unavailable("/proc/self/task/"); + static const char dir[] = "attach-f-p.test cmd"; pid_t pid = getpid(); int rc = chdir(dir); diff --git a/tests/attach-f-p.test b/tests/attach-f-p.test index d3aab343..b23a4521 100755 --- a/tests/attach-f-p.test +++ b/tests/attach-f-p.test @@ -29,9 +29,6 @@ . "${srcdir=.}/init.sh" -# strace -f -p is implemented using /proc/$pid/task/ -[ -d /proc/self/task/ ] || - framework_skip_ '/proc/self/task/ is not available' run_prog_skip_if_failed \ kill -0 $$ run_prog ../attach-f-p-cmd > /dev/null diff --git a/tests/fstat.test b/tests/fstat.test index c7dbc740..38936320 100755 --- a/tests/fstat.test +++ b/tests/fstat.test @@ -4,10 +4,6 @@ . "${srcdir=.}/init.sh" -# strace -P is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - syscall=$NAME run_prog > /dev/null sample=$syscall.sample diff --git a/tests/net-y-unix.c b/tests/net-y-unix.c index 98ea9563..df56ad64 100644 --- a/tests/net-y-unix.c +++ b/tests/net-y-unix.c @@ -43,6 +43,8 @@ int main(void) { + skip_if_unavailable("/proc/self/fd/"); + static const struct sockaddr_un addr = { .sun_family = AF_UNIX, .sun_path = TEST_SOCKET diff --git a/tests/net-y-unix.test b/tests/net-y-unix.test index ffa28780..fd3fd686 100755 --- a/tests/net-y-unix.test +++ b/tests/net-y-unix.test @@ -29,13 +29,9 @@ . "${srcdir=.}/init.sh" -# strace -y is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - check_prog sed -run_prog "../$NAME" > /dev/null +run_prog > /dev/null run_strace -a20 -y -eclose,network $args > "$EXP" # Filter out close() calls made by ld.so and libc. diff --git a/tests/net-yy-inet.c b/tests/net-yy-inet.c index aa6e957e..452eb634 100644 --- a/tests/net-yy-inet.c +++ b/tests/net-yy-inet.c @@ -41,6 +41,8 @@ int main(void) { + skip_if_unavailable("/proc/self/fd/"); + const struct sockaddr_in addr = { .sin_family = AF_INET, .sin_addr.s_addr = htonl(INADDR_LOOPBACK) diff --git a/tests/net-yy-inet.test b/tests/net-yy-inet.test index 08c46351..17bc6f91 100755 --- a/tests/net-yy-inet.test +++ b/tests/net-yy-inet.test @@ -29,14 +29,10 @@ . "${srcdir=.}/init.sh" -# strace -yy is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - check_prog sed run_prog ../netlink_inet_diag -run_prog "../$NAME" > /dev/null +run_prog > /dev/null run_strace -a22 -yy -eclose,network $args > "$EXP" # Filter out close() calls made by ld.so and libc. diff --git a/tests/net-yy-netlink.c b/tests/net-yy-netlink.c index 1d7001ed..6539edab 100644 --- a/tests/net-yy-netlink.c +++ b/tests/net-yy-netlink.c @@ -47,6 +47,8 @@ int main(void) { + skip_if_unavailable("/proc/self/fd/"); + struct sockaddr_nl addr = { .nl_family = AF_NETLINK, .nl_pid = getpid() diff --git a/tests/net-yy-netlink.test b/tests/net-yy-netlink.test index 0723c3ed..4c6da22e 100755 --- a/tests/net-yy-netlink.test +++ b/tests/net-yy-netlink.test @@ -32,14 +32,10 @@ . "${srcdir=.}/init.sh" -# strace -yy is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - check_prog sed run_prog ../netlink_netlink_diag -run_prog "../$NAME" > /dev/null +run_prog > /dev/null run_strace -a22 -yy -eclose,network $args > "$EXP" # Filter out close() calls made by ld.so and libc. diff --git a/tests/net-yy-unix.c b/tests/net-yy-unix.c index d646f286..f27cdc07 100644 --- a/tests/net-yy-unix.c +++ b/tests/net-yy-unix.c @@ -43,6 +43,8 @@ int main(void) { + skip_if_unavailable("/proc/self/fd/"); + struct sockaddr_un addr = { .sun_family = AF_UNIX, .sun_path = TEST_SOCKET diff --git a/tests/net-yy-unix.test b/tests/net-yy-unix.test index a660c5c1..59323a47 100755 --- a/tests/net-yy-unix.test +++ b/tests/net-yy-unix.test @@ -31,14 +31,10 @@ . "${srcdir=.}/init.sh" -# strace -yy is implemented using /proc/self/fd -[ -d /proc/self/fd/ ] || - framework_skip_ '/proc/self/fd/ is not available' - check_prog sed run_prog ../netlink_unix_diag -run_prog "../$NAME" > /dev/null +run_prog > /dev/null run_strace -a22 -yy -eclose,network $args > "$EXP" # Filter out close() calls made by ld.so and libc. diff --git a/tests/xstatx.c b/tests/xstatx.c index f4e1a90f..9b56deff 100644 --- a/tests/xstatx.c +++ b/tests/xstatx.c @@ -267,7 +267,9 @@ create_sample(const char *fname, const libc_off_t size) int main(void) { -# if !IS_FSTAT +# if IS_FSTAT + skip_if_unavailable("/proc/self/fd/"); +# else static const char full[] = "/dev/full"; # endif static const char sample[] = TEST_SYSCALL_STR ".sample";