From e01042b84abdfa224d47e6d11eb9798ce4c7d2f8 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 16 Dec 2022 14:17:07 -0500 Subject: tests: Replace skip_unless test with test || skip --- tests/posix/L_xdev.sh | 4 ++-- tests/posix/name_bracket.sh | 2 +- tests/posix/readdir_error.sh | 4 ++-- tests/posix/type_bind_mount.sh | 4 ++-- tests/posix/xdev.sh | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tests/posix') diff --git a/tests/posix/L_xdev.sh b/tests/posix/L_xdev.sh index ddbadd8..2fc99dd 100644 --- a/tests/posix/L_xdev.sh +++ b/tests/posix/L_xdev.sh @@ -1,5 +1,5 @@ -skip_unless test "$SUDO" -skip_if test "$UNAME" = "Darwin" +test "$SUDO" || skip +test "$UNAME" = "Darwin" && skip clean_scratch mkdir scratch/{foo,mnt} diff --git a/tests/posix/name_bracket.sh b/tests/posix/name_bracket.sh index 84a417f..80ca186 100644 --- a/tests/posix/name_bracket.sh +++ b/tests/posix/name_bracket.sh @@ -1,5 +1,5 @@ # fnmatch() is broken on macOS -skip_if test "$UNAME" = "Darwin" +test "$UNAME" = "Darwin" && skip # An unclosed [ should be matched literally bfs_diff weirdnames -name '[' diff --git a/tests/posix/readdir_error.sh b/tests/posix/readdir_error.sh index ce06723..483f543 100644 --- a/tests/posix/readdir_error.sh +++ b/tests/posix/readdir_error.sh @@ -1,4 +1,4 @@ -skip_unless test "$UNAME" = "Linux" +test "$UNAME" = "Linux" || skip clean_scratch mkfifo scratch/{fever,pid,wait,running} @@ -33,5 +33,5 @@ while [ "$state" != "Z" ]; do done # On Linux, open(/proc/$pid/net) will succeed but readdir() will fail -skip_unless test -r "/proc/$pid/net" +test -r "/proc/$pid/net" || skip fail invoke_bfs "/proc/$pid/net" >/dev/null diff --git a/tests/posix/type_bind_mount.sh b/tests/posix/type_bind_mount.sh index 445f6ef..fe32875 100644 --- a/tests/posix/type_bind_mount.sh +++ b/tests/posix/type_bind_mount.sh @@ -1,5 +1,5 @@ -skip_unless test "$SUDO" -skip_unless test "$UNAME" = "Linux" +test "$SUDO" || skip +test "$UNAME" = "Linux" || skip clean_scratch "$XTOUCH" scratch/{file,null} diff --git a/tests/posix/xdev.sh b/tests/posix/xdev.sh index 4591940..44e04dd 100644 --- a/tests/posix/xdev.sh +++ b/tests/posix/xdev.sh @@ -1,5 +1,5 @@ -skip_unless test "$SUDO" -skip_if test "$UNAME" = "Darwin" +test "$SUDO" || skip +test "$UNAME" = "Darwin" && skip clean_scratch mkdir scratch/{foo,mnt} -- cgit v1.2.3