diff --git a/tests/bin/df/t_df.sh b/tests/bin/df/t_df.sh index d8ebc6063bb8..c69529ab40fd 100644 --- a/tests/bin/df/t_df.sh +++ b/tests/bin/df/t_df.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_df.sh,v 1.2 2020/08/23 15:51:30 ryo Exp $ +# $NetBSD: t_df.sh,v 1.3 2024/04/28 07:27:40 rillig Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -79,7 +79,7 @@ filer:/ 1202716672 1202716672 -180407500 117% /filer /dev/strpct 21474836476 10737418240 10737418236 50% /strpct /dev/wd0e 10485688 2859932 7625756 27% /mount/windows/C EOF - atf_check -s eq:0 -o file:expout -e empty \ + atf_check -s exit:0 -o file:expout -e empty \ -x "BLOCKSIZE=1k $(atf_get_srcdir)/h_df -n" } @@ -137,7 +137,7 @@ filer:/ 1.1T 1.1T -172G 117% /filer /dev/strpct 20T 10T 10T 50% /strpct /dev/wd0e 10G 2.7G 7.3G 27% /mount/windows/C EOF - atf_check -s eq:0 -o file:expout -e empty \ + atf_check -s exit:0 -o file:expout -e empty \ -x "BLOCKSIZE=1k $(atf_get_srcdir)/h_df -hn" } diff --git a/tests/bin/pax/t_pax.sh b/tests/bin/pax/t_pax.sh index 63ae7f8965ce..38d1189d00bb 100644 --- a/tests/bin/pax/t_pax.sh +++ b/tests/bin/pax/t_pax.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_pax.sh,v 1.1 2012/03/17 16:33:11 jruoho Exp $ +# $NetBSD: t_pax.sh,v 1.2 2024/04/28 07:27:40 rillig Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,17 +35,17 @@ append_body() { touch foo bar # store both foo and bar into file1.tar - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ pax -w -b 512 -x ustar -f file1.tar foo bar # store foo into file2.tar, then append bar to file2.tar - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ pax -w -b 512 -x ustar -f file2.tar foo - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ pax -w -b 512 -x ustar -f file2.tar -a bar # ensure that file1.tar and file2.tar are equal - atf_check -s eq:0 -o empty -e empty cmp file1.tar file2.tar + atf_check -s exit:0 -o empty -e empty cmp file1.tar file2.tar } atf_init_test_cases() diff --git a/tests/bin/sh/t_ulimit.sh b/tests/bin/sh/t_ulimit.sh index 094a2eedc7e4..0bff3732feda 100644 --- a/tests/bin/sh/t_ulimit.sh +++ b/tests/bin/sh/t_ulimit.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_ulimit.sh,v 1.3 2016/03/27 14:50:01 christos Exp $ +# $NetBSD: t_ulimit.sh,v 1.4 2024/04/28 07:27:40 rillig Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -45,10 +45,10 @@ get_ulimits() { } limits_body() { - atf_check -s eq:0 -o ignore -e empty ${TEST_SH} -c "ulimit -a" + atf_check -s exit:0 -o ignore -e empty ${TEST_SH} -c "ulimit -a" for l in $(get_ulimits) do - atf_check -s eq:0 -o ignore -e empty ${TEST_SH} -c "ulimit $l" + atf_check -s exit:0 -o ignore -e empty ${TEST_SH} -c "ulimit $l" done } diff --git a/tests/bin/sh/t_varquote.sh b/tests/bin/sh/t_varquote.sh index 3811d85b29de..1e24e3c6ae3e 100644 --- a/tests/bin/sh/t_varquote.sh +++ b/tests/bin/sh/t_varquote.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_varquote.sh,v 1.5 2016/03/27 14:50:01 christos Exp $ +# $NetBSD: t_varquote.sh,v 1.6 2024/04/28 07:27:40 rillig Exp $ # # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. @@ -113,7 +113,7 @@ nested_quotes_multiword_head() { "string works (PR bin/43597)" } nested_quotes_multiword_body() { - atf_check -s eq:0 -o match:"first-word second-word" -e empty \ + atf_check -s exit:0 -o match:"first-word second-word" -e empty \ ${TEST_SH} -c 'echo "${foo:="first-word"} second-word"' } @@ -123,8 +123,8 @@ default_assignment_with_arith_head() { "string works (PR bin/50827)" } default_assignment_with_arith_body() { - atf_check -s eq:0 -o empty -e empty ${TEST_SH} -c ': "${x=$((1))}"' - atf_check -s eq:0 -o match:1 -e empty ${TEST_SH} -c 'echo "${x=$((1))}"' + atf_check -s exit:0 -o empty -e empty ${TEST_SH} -c ': "${x=$((1))}"' + atf_check -s exit:0 -o match:1 -e empty ${TEST_SH} -c 'echo "${x=$((1))}"' } atf_init_test_cases() { diff --git a/tests/bin/tar/t_tar.sh b/tests/bin/tar/t_tar.sh index 13321d62fb84..a32f6c3ddb8c 100644 --- a/tests/bin/tar/t_tar.sh +++ b/tests/bin/tar/t_tar.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_tar.sh,v 1.2 2018/11/30 00:53:41 christos Exp $ +# $NetBSD: t_tar.sh,v 1.3 2024/04/28 07:27:40 rillig Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,14 +35,14 @@ append_body() { touch foo bar # store both foo and bar into file1.tar - atf_check -s eq:0 -o empty -e empty tar -cf file1.tar foo bar + atf_check -s exit:0 -o empty -e empty tar -cf file1.tar foo bar # store foo into file2.tar, then append bar to file2.tar - atf_check -s eq:0 -o empty -e empty tar -cf file2.tar foo - atf_check -s eq:0 -o empty -e empty tar -rf file2.tar bar + atf_check -s exit:0 -o empty -e empty tar -cf file2.tar foo + atf_check -s exit:0 -o empty -e empty tar -rf file2.tar bar # ensure that file1.tar and file2.tar are equal - atf_check -s eq:0 -o empty -e empty cmp file1.tar file2.tar + atf_check -s exit:0 -o empty -e empty cmp file1.tar file2.tar } atf_test_case rd_base256_size @@ -84,10 +84,10 @@ rd_base256_size_body() { head -c 1450 /dev/zero >> test.tar # test extracting the test archive - atf_check -s eq:0 -o empty -e empty tar -xf test.tar + atf_check -s exit:0 -o empty -e empty tar -xf test.tar # ensure that output.bin is equal to reference.bin - atf_check -s eq:0 -o empty -e empty cmp output.bin reference.bin + atf_check -s exit:0 -o empty -e empty cmp output.bin reference.bin } atf_init_test_cases() diff --git a/tests/crypto/libcrypto/t_libcrypto.sh b/tests/crypto/libcrypto/t_libcrypto.sh index 364329de30de..bf3ce38b0a4c 100644 --- a/tests/crypto/libcrypto/t_libcrypto.sh +++ b/tests/crypto/libcrypto/t_libcrypto.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_libcrypto.sh,v 1.9 2023/05/08 17:46:06 christos Exp $ +# $NetBSD: t_libcrypto.sh,v 1.10 2024/04/28 07:27:40 rillig Exp $ # # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -78,7 +78,7 @@ threads_body() -cert "$s/d_server.pem" \ -ccert "$s/d_client.pem" \ 2>&1 | tee out - atf_check -s eq:1 -o empty -e empty grep :error: out + atf_check -s exit:1 -o empty -e empty grep :error: out fi } diff --git a/tests/fs/psshfs/t_psshfs.sh b/tests/fs/psshfs/t_psshfs.sh index 245b9939ac57..f247614ba17a 100644 --- a/tests/fs/psshfs/t_psshfs.sh +++ b/tests/fs/psshfs/t_psshfs.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_psshfs.sh,v 1.9 2017/05/24 15:29:51 christos Exp $ +# $NetBSD: t_psshfs.sh,v 1.10 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -72,13 +72,13 @@ start_ssh() { sed -e "s,@SRCDIR@,$(atf_get_srcdir),g" -e "s,@WORKDIR@,$(pwd),g" \ $(atf_get_srcdir)/sshd_config.in >sshd_config || \ atf_fail "Failed to create sshd_config" - atf_check -s eq:0 -o empty -e empty cp /usr/libexec/sftp-server . - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty cp /usr/libexec/sftp-server . + atf_check -s exit:0 -o empty -e empty \ cp $(atf_get_srcdir)/ssh_host_key . - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ cp $(atf_get_srcdir)/ssh_host_key.pub . - atf_check -s eq:0 -o empty -e empty chmod 400 ssh_host_key - atf_check -s eq:0 -o empty -e empty chmod 444 ssh_host_key.pub + atf_check -s exit:0 -o empty -e empty chmod 400 ssh_host_key + atf_check -s exit:0 -o empty -e empty chmod 444 ssh_host_key.pub /usr/sbin/sshd -e -f ./sshd_config >sshd.log 2>&1 & while [ ! -f sshd.pid ]; do @@ -87,14 +87,14 @@ start_ssh() { echo "SSH server started (pid $(cat sshd.pid))" echo "Setting up SSH client configuration" - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ ssh-keygen -f ssh_user_key -t rsa -b 1024 -N "" -q - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ cp ssh_user_key.pub authorized_keys echo "[localhost]:10000,[127.0.0.1]:10000,[::1]:10000" \ "$(cat $(atf_get_srcdir)/ssh_host_key.pub)" >known_hosts || \ atf_fail "Failed to create known_hosts" - atf_check -s eq:0 -o empty -e empty chmod 600 authorized_keys + atf_check -s exit:0 -o empty -e empty chmod 600 authorized_keys sed -e "s,@SRCDIR@,$(atf_get_srcdir),g" -e "s,@WORKDIR@,$(pwd),g" \ $(atf_get_srcdir)/ssh_config.in >ssh_config || \ atf_fail "Failed to create ssh_config" @@ -119,7 +119,7 @@ stop_ssh() { # Both directories are supposed to live on the current directory. # mount_psshfs() { - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ mount -t psshfs -o -F=$(pwd)/ssh_config localhost:$(pwd)/${1} ${2} } @@ -159,13 +159,13 @@ EOF mkdir mnt mount_psshfs root mnt - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ ./ne_inodes.sh root/dir root/dir/file1 - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ ./ne_inodes.sh root/dir root/dir/file2 - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ ./ne_inodes.sh root/dir/file1 root/dir/file2 - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ ./ne_inodes.sh root/file3 root/file4 } inode_nos_cleanup() { @@ -186,11 +186,11 @@ pwd_body() { mkdir root/dir mkdir mnt - atf_check -s eq:0 -o save:stdout -e empty \ + atf_check -s exit:0 -o save:stdout -e empty \ -x 'echo $(cd mnt && /bin/pwd)/dir' mv stdout expout mount_psshfs root mnt - atf_check -s eq:0 -o file:expout -e empty \ + atf_check -s exit:0 -o file:expout -e empty \ -x 'cd mnt/dir && ls .. >/dev/null && /bin/pwd' } pwd_cleanup() { diff --git a/tests/fs/tmpfs/h_funcs.subr b/tests/fs/tmpfs/h_funcs.subr index 07c1644da66f..feb25c4217ea 100644 --- a/tests/fs/tmpfs/h_funcs.subr +++ b/tests/fs/tmpfs/h_funcs.subr @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: h_funcs.subr,v 1.5 2013/03/17 01:16:45 jmmv Exp $ +# $NetBSD: h_funcs.subr,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. # All rights reserved. @@ -40,7 +40,7 @@ test_mount() { require_fs tmpfs Mount_Point=$(pwd)/mntpt - atf_check -s eq:0 -o empty -e empty mkdir "${Mount_Point}" + atf_check -s exit:0 -o empty -e empty mkdir "${Mount_Point}" echo "mount -t tmpfs ${*} tmpfs ${Mount_Point}" mount -t tmpfs "${@}" tmpfs "${Mount_Point}" 2>mounterr if [ "${?}" -ne 0 ]; then @@ -60,8 +60,8 @@ test_mount() { # test_unmount() { cd - >/dev/null - atf_check -s eq:0 -o empty -e empty umount ${Mount_Point} - atf_check -s eq:0 -o empty -e empty rmdir ${Mount_Point} + atf_check -s exit:0 -o empty -e empty umount ${Mount_Point} + atf_check -s exit:0 -o empty -e empty rmdir ${Mount_Point} Mount_Point= } diff --git a/tests/fs/tmpfs/t_create.sh b/tests/fs/tmpfs/t_create.sh index f1f894dfd65f..77d845d569c9 100644 --- a/tests/fs/tmpfs/t_create.sh +++ b/tests/fs/tmpfs/t_create.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_create.sh,v 1.8 2011/03/05 07:41:11 pooka Exp $ +# $NetBSD: t_create.sh,v 1.9 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,9 +37,9 @@ create_head() { create_body() { test_mount - atf_check -s eq:1 -o empty -e empty test -f a - atf_check -s eq:0 -o empty -e empty touch a - atf_check -s eq:0 -o empty -e empty test -f a + atf_check -s exit:1 -o empty -e empty test -f a + atf_check -s exit:0 -o empty -e empty touch a + atf_check -s exit:0 -o empty -e empty test -f a test_unmount } @@ -59,9 +59,9 @@ attrs_body() { test_mount umask 022 - atf_check -s eq:1 -o empty -e empty test -f a - atf_check -s eq:0 -o empty -e empty touch a - atf_check -s eq:0 -o empty -e empty test -f a + atf_check -s exit:1 -o empty -e empty test -f a + atf_check -s exit:0 -o empty -e empty touch a + atf_check -s exit:0 -o empty -e empty test -f a eval $(stat -s . | sed -e 's|st_|dst_|g') eval $(stat -s a) @@ -71,24 +71,24 @@ attrs_body() { test ${st_gid} -eq ${dst_gid} || atf_fail "Incorrect gid" test ${st_mode} = 0100644 || atf_fail "Incorrect mode" - atf_check -s eq:0 -o empty -e empty mkdir b c + atf_check -s exit:0 -o empty -e empty mkdir b c - atf_check -s eq:0 -o empty -e empty chown ${user}:0 b + atf_check -s exit:0 -o empty -e empty chown ${user}:0 b eval $(stat -s b) [ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner" [ ${st_gid} -eq 0 ] || atf_fail "Incorrect group" - atf_check -s eq:0 -o empty -e empty chown ${user}:100 c + atf_check -s exit:0 -o empty -e empty chown ${user}:100 c eval $(stat -s c) [ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner" [ ${st_gid} -eq 100 ] || atf_fail "Incorrect group" - atf_check -s eq:0 -o empty -e empty su -m ${user} -c 'touch b/a' + atf_check -s exit:0 -o empty -e empty su -m ${user} -c 'touch b/a' eval $(stat -s b/a) [ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner" [ ${st_gid} -eq 0 ] || atf_fail "Incorrect group" - atf_check -s eq:0 -o empty -e empty su -m ${user} -c 'touch c/a' + atf_check -s exit:0 -o empty -e empty su -m ${user} -c 'touch c/a' eval $(stat -s c/a) [ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner" [ ${st_gid} -eq 100 ] || atf_fail "Incorrect group" @@ -105,7 +105,7 @@ kqueue_head() { kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty mkdir dir echo 'touch dir/a' | kqueue_monitor 1 dir kqueue_check dir NOTE_WRITE diff --git a/tests/fs/tmpfs/t_devices.sh b/tests/fs/tmpfs/t_devices.sh index 472d37860dd8..3b66b4788cb9 100644 --- a/tests/fs/tmpfs/t_devices.sh +++ b/tests/fs/tmpfs/t_devices.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_devices.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_devices.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,12 +35,12 @@ basic_body() { umask 022 - atf_check -s eq:0 -o ignore -e ignore /dev/MAKEDEV std - atf_check -s eq:0 -o empty -e empty test -e zero - atf_check -s eq:0 -o empty -e empty test -e null + atf_check -s exit:0 -o ignore -e ignore /dev/MAKEDEV std + atf_check -s exit:0 -o empty -e empty test -e zero + atf_check -s exit:0 -o empty -e empty test -e null echo "Reading from the 'zero' character device" - atf_check -s eq:0 -o ignore -e ignore dd if=zero of=a bs=10k count=1 + atf_check -s exit:0 -o ignore -e ignore dd if=zero of=a bs=10k count=1 [ $(md5 a | cut -d ' ' -f 4) = 1276481102f218c981e0324180bafd9f ] || \ atf_fail "Data read is invalid" diff --git a/tests/fs/tmpfs/t_dots.sh b/tests/fs/tmpfs/t_dots.sh index e480de7658ac..dd37858a8fe8 100644 --- a/tests/fs/tmpfs/t_dots.sh +++ b/tests/fs/tmpfs/t_dots.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_dots.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_dots.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -34,9 +34,9 @@ topdir_head() { topdir_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty test -d ./a - atf_check -s eq:0 -o empty -e empty test -d a/../a + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty test -d ./a + atf_check -s exit:0 -o empty -e empty test -d a/../a test_unmount } @@ -50,10 +50,10 @@ nesteddir_head() { nesteddir_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty mkdir a/b - atf_check -s eq:0 -o empty -e empty test -d a/b/../b - atf_check -s eq:0 -o empty -e empty test -d a/b/../../a + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty mkdir a/b + atf_check -s exit:0 -o empty -e empty test -d a/b/../b + atf_check -s exit:0 -o empty -e empty test -d a/b/../../a test_unmount } diff --git a/tests/fs/tmpfs/t_exec.sh b/tests/fs/tmpfs/t_exec.sh index 9ffc6008a139..2f3706936964 100644 --- a/tests/fs/tmpfs/t_exec.sh +++ b/tests/fs/tmpfs/t_exec.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_exec.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_exec.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,11 +35,11 @@ basic_head() { basic_body() { test_mount - atf_check -s eq:0 -o empty -e empty cp /bin/cp . + atf_check -s exit:0 -o empty -e empty cp /bin/cp . echo "Verifying copied file" [ $(md5 cp | cut -d ' ' -f 4) = $(md5 /bin/cp | cut -d ' ' -f 4) ] || \ atf_file "New binary file does not match original" - atf_check -s eq:0 -o empty -e empty ./cp cp foo + atf_check -s exit:0 -o empty -e empty ./cp cp foo test_unmount } diff --git a/tests/fs/tmpfs/t_link.sh b/tests/fs/tmpfs/t_link.sh index b436104d9146..29d6064d35eb 100644 --- a/tests/fs/tmpfs/t_link.sh +++ b/tests/fs/tmpfs/t_link.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_link.sh,v 1.6 2021/10/30 09:53:47 hannken Exp $ +# $NetBSD: t_link.sh,v 1.7 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,14 +38,14 @@ basic_head() { basic_body() { test_mount - atf_check -s eq:0 -o empty -e empty touch a - atf_check -s eq:0 -o empty -e empty touch z + atf_check -s exit:0 -o empty -e empty touch a + atf_check -s exit:0 -o empty -e empty touch z eval $(stat -s a | sed -e 's|st_|sta_|g') eval $(stat -s z | sed -e 's|st_|stz_|g') test ${sta_ino} != ${stz_ino} || \ atf_fail "Node numbers are not different" test ${sta_nlink} -eq 1 || atf_fail "Number of links is incorrect" - atf_check -s eq:0 -o empty -e empty ln a b + atf_check -s exit:0 -o empty -e empty ln a b echo "Checking if link count is correct after links are created" eval $(stat -s a | sed -e 's|st_|sta_|g') @@ -55,10 +55,10 @@ basic_body() { test ${stb_nlink} -eq 2 || atf_fail "Link count is incorrect" echo "Checking if link count is correct after links are deleted" - atf_check -s eq:0 -o empty -e empty rm a + atf_check -s exit:0 -o empty -e empty rm a eval $(stat -s b | sed -e 's|st_|stb_|g') test ${stb_nlink} -eq 1 || atf_fail "Link count is incorrect" - atf_check -s eq:0 -o empty -e empty rm b + atf_check -s exit:0 -o empty -e empty rm b test_unmount } @@ -72,9 +72,9 @@ subdirs_head() { subdirs_body() { test_mount - atf_check -s eq:0 -o empty -e empty touch a - atf_check -s eq:0 -o empty -e empty mkdir c - atf_check -s eq:0 -o empty -e empty ln a c/b + atf_check -s exit:0 -o empty -e empty touch a + atf_check -s exit:0 -o empty -e empty mkdir c + atf_check -s exit:0 -o empty -e empty ln a c/b echo "Checking if link count is correct after links are created" eval $(stat -s a | sed -e 's|st_|sta_|g') @@ -84,11 +84,11 @@ subdirs_body() { test ${stb_nlink} -eq 2 || atf_fail "Link count is incorrect" echo "Checking if link count is correct after links are deleted" - atf_check -s eq:0 -o empty -e empty rm a + atf_check -s exit:0 -o empty -e empty rm a eval $(stat -s c/b | sed -e 's|st_|stb_|g') test ${stb_nlink} -eq 1 || atf_fail "Link count is incorrect" - atf_check -s eq:0 -o empty -e empty rm c/b - atf_check -s eq:0 -o empty -e empty rmdir c + atf_check -s exit:0 -o empty -e empty rm c/b + atf_check -s exit:0 -o empty -e empty rmdir c test_unmount } @@ -102,8 +102,8 @@ kqueue_head() { kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir dir - atf_check -s eq:0 -o empty -e empty touch dir/a + atf_check -s exit:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty touch dir/a echo 'ln dir/a dir/b' | kqueue_monitor 2 dir dir/a kqueue_check dir/a NOTE_LINK kqueue_check dir NOTE_WRITE @@ -111,8 +111,8 @@ kqueue_body() { echo 'rm dir/a' | kqueue_monitor 2 dir dir/b kqueue_check dir/b NOTE_DELETE kqueue_check dir NOTE_WRITE - atf_check -s eq:0 -o empty -e empty rm dir/b - atf_check -s eq:0 -o empty -e empty rmdir dir + atf_check -s exit:0 -o empty -e empty rm dir/b + atf_check -s exit:0 -o empty -e empty rmdir dir test_unmount } diff --git a/tests/fs/tmpfs/t_mkdir.sh b/tests/fs/tmpfs/t_mkdir.sh index db0d1e3c5c8f..5358d55026c1 100644 --- a/tests/fs/tmpfs/t_mkdir.sh +++ b/tests/fs/tmpfs/t_mkdir.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_mkdir.sh,v 1.8 2011/03/05 07:41:11 pooka Exp $ +# $NetBSD: t_mkdir.sh,v 1.9 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -39,9 +39,9 @@ single_head() { single_body() { test_mount - atf_check -s eq:1 -o empty -e empty test -d a - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty test -d a + atf_check -s exit:1 -o empty -e empty test -d a + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty test -d a test -d a eval $(stat -s ${Mount_Point}) [ ${st_nlink} = 3 ] || atf_fail "Link count is not 3" @@ -59,9 +59,9 @@ many_body() { test_mount for d in $(jot 100); do - atf_check -s eq:1 -o empty -e empty test -d ${d} - atf_check -s eq:0 -o empty -e empty mkdir ${d} - atf_check -s eq:0 -o empty -e empty test -d ${d} + atf_check -s exit:1 -o empty -e empty test -d ${d} + atf_check -s exit:0 -o empty -e empty mkdir ${d} + atf_check -s exit:0 -o empty -e empty test -d ${d} done eval $(stat -s ${Mount_Point}) [ ${st_nlink} = 102 ] || atf_fail "Link count is not 102" @@ -77,9 +77,9 @@ nested_head() { nested_body() { test_mount - atf_check -s eq:1 -o empty -e empty test -d a/b/c/d/e - atf_check -s eq:0 -o empty -e empty mkdir -p a/b/c/d/e - atf_check -s eq:0 -o empty -e empty test -d a/b/c/d/e + atf_check -s exit:1 -o empty -e empty test -d a/b/c/d/e + atf_check -s exit:0 -o empty -e empty mkdir -p a/b/c/d/e + atf_check -s exit:0 -o empty -e empty test -d a/b/c/d/e test_unmount } @@ -98,24 +98,24 @@ attrs_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir b c + atf_check -s exit:0 -o empty -e empty mkdir b c - atf_check -s eq:0 -o empty -e empty chown ${user}:0 b + atf_check -s exit:0 -o empty -e empty chown ${user}:0 b eval $(stat -s b) [ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner" [ ${st_gid} -eq 0 ] || atf_fail "Incorrect group" - atf_check -s eq:0 -o empty -e empty chown ${user}:100 c + atf_check -s exit:0 -o empty -e empty chown ${user}:100 c eval $(stat -s c) [ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner" [ ${st_gid} -eq 100 ] || atf_fail "Incorrect group" - atf_check -s eq:0 -o empty -e empty su -m ${user} -c 'mkdir b/a' + atf_check -s exit:0 -o empty -e empty su -m ${user} -c 'mkdir b/a' eval $(stat -s b/a) [ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner" [ ${st_gid} -eq 0 ] || atf_fail "Incorrect group" - atf_check -s eq:0 -o empty -e empty su -m ${user} -c 'mkdir c/a' + atf_check -s exit:0 -o empty -e empty su -m ${user} -c 'mkdir c/a' eval $(stat -s c/a) [ ${st_uid} -eq $(id -u ${user}) ] || atf_fail "Incorrect owner" [ ${st_gid} -eq 100 ] || atf_fail "Incorrect group" @@ -132,7 +132,7 @@ kqueue_head() { kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty mkdir dir echo 'mkdir dir/a' | kqueue_monitor 2 dir # Creating a directory raises NOTE_LINK on the parent directory @@ -141,8 +141,8 @@ kqueue_body() { # Creating a directory raises NOTE_WRITE on the parent directory kqueue_check dir NOTE_WRITE - atf_check -s eq:0 -o empty -e empty rmdir dir/a - atf_check -s eq:0 -o empty -e empty rmdir dir + atf_check -s exit:0 -o empty -e empty rmdir dir/a + atf_check -s exit:0 -o empty -e empty rmdir dir test_unmount } diff --git a/tests/fs/tmpfs/t_mknod.sh b/tests/fs/tmpfs/t_mknod.sh index 62c7cce22834..76f4f5c7c2f6 100644 --- a/tests/fs/tmpfs/t_mknod.sh +++ b/tests/fs/tmpfs/t_mknod.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_mknod.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_mknod.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,7 +38,7 @@ block_body() { test_mount umask 022 - atf_check -s eq:0 -o empty -e empty mknod fd0a b 2 0 + atf_check -s exit:0 -o empty -e empty mknod fd0a b 2 0 eval $(stat -s fd0a) [ ${st_mode} = 060644 ] || atf_fail "Invalid mode" [ ${st_rdev} -eq 512 ] || atf_fail "Invalid device" @@ -56,7 +56,7 @@ block_kqueue_body() { test_mount umask 022 - atf_check -s eq:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty mkdir dir echo 'mknod dir/fd0a b 2 0' | kqueue_monitor 1 dir kqueue_check dir NOTE_WRITE @@ -72,7 +72,7 @@ char_body() { test_mount umask 022 - atf_check -s eq:0 -o empty -e empty mknod null c 2 2 + atf_check -s exit:0 -o empty -e empty mknod null c 2 2 eval $(stat -s null) [ ${st_mode} = 020644 ] || atf_fail "Invalid mode" [ ${st_rdev} -eq 514 ] || atf_fail "Invalid device" @@ -90,7 +90,7 @@ char_kqueue_body() { test_mount umask 022 - atf_check -s eq:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty mkdir dir echo 'mknod dir/null c 2 2' | kqueue_monitor 1 dir kqueue_check dir NOTE_WRITE @@ -106,7 +106,7 @@ pipe_body() { test_mount umask 022 - atf_check -s eq:0 -o empty -e empty mknod pipe p + atf_check -s exit:0 -o empty -e empty mknod pipe p eval $(stat -s pipe) [ ${st_mode} = 010644 ] || atf_fail "Invalid mode" @@ -123,7 +123,7 @@ pipe_kqueue_body() { test_mount umask 022 - atf_check -s eq:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty mkdir dir echo 'mknod dir/pipe p' | kqueue_monitor 1 dir kqueue_check dir NOTE_WRITE diff --git a/tests/fs/tmpfs/t_mount.sh b/tests/fs/tmpfs/t_mount.sh index 11a77d49c24a..4663d1a6a75f 100644 --- a/tests/fs/tmpfs/t_mount.sh +++ b/tests/fs/tmpfs/t_mount.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_mount.sh,v 1.6 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_mount.sh,v 1.7 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -104,9 +104,9 @@ large_body() { test_unmount mkdir tmp - atf_check -s eq:1 -o empty -e ignore \ + atf_check -s exit:1 -o empty -e ignore \ mount -t tmpfs -o -s9223372036854775808 tmpfs tmp - atf_check -s eq:1 -o empty -e ignore \ + atf_check -s exit:1 -o empty -e ignore \ mount -t tmpfs -o -s9223372036854775808g tmpfs tmp rmdir tmp } @@ -119,12 +119,12 @@ mntpt_head() { } mntpt_body() { mount_tmpfs unused $(pwd)/mnt >out 2>&1 - atf_check -s eq:1 -o empty -e empty grep unused out - atf_check -s eq:0 -o ignore -e empty grep "$(pwd)/mnt" out + atf_check -s exit:1 -o empty -e empty grep unused out + atf_check -s exit:0 -o ignore -e empty grep "$(pwd)/mnt" out mount_tmpfs unused mnt >out 2>&1 - atf_check -s eq:1 -o empty -e empty grep unused out - atf_check -s eq:0 -o ignore -e empty grep mnt out + atf_check -s exit:1 -o empty -e empty grep unused out + atf_check -s exit:0 -o ignore -e empty grep mnt out } atf_init_test_cases() { diff --git a/tests/fs/tmpfs/t_pipes.sh b/tests/fs/tmpfs/t_pipes.sh index 7c0065a9cb1d..d77403083350 100644 --- a/tests/fs/tmpfs/t_pipes.sh +++ b/tests/fs/tmpfs/t_pipes.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_pipes.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_pipes.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,7 +35,7 @@ basic_body() { umask 022 - atf_check -s eq:0 -o empty -e empty mknod pipe p + atf_check -s exit:0 -o empty -e empty mknod pipe p echo "Writing to pipe and waiting for response" echo -n foo >pipe & diff --git a/tests/fs/tmpfs/t_read_write.sh b/tests/fs/tmpfs/t_read_write.sh index 13cc2560ad44..eb5704d0bdda 100644 --- a/tests/fs/tmpfs/t_read_write.sh +++ b/tests/fs/tmpfs/t_read_write.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_read_write.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_read_write.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -64,7 +64,7 @@ kqueue_head() { kqueue_body() { test_mount - atf_check -s eq:0 -o ignore -e ignore \ + atf_check -s exit:0 -o ignore -e ignore \ dd if=/dev/zero of=c bs=1k count=10 echo 'dd if=/dev/zero of=c seek=2 bs=1k count=1 conv=notrunc' \ '>/dev/null 2>&1' | kqueue_monitor 1 c diff --git a/tests/fs/tmpfs/t_readdir.sh b/tests/fs/tmpfs/t_readdir.sh index 6f5dc3ef2bde..25c00a6a9dc2 100644 --- a/tests/fs/tmpfs/t_readdir.sh +++ b/tests/fs/tmpfs/t_readdir.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_readdir.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_readdir.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,9 +38,9 @@ dots_head() { dots_body() { test_mount - atf_check -s eq:0 -o save:stdout -e empty /bin/ls -a - atf_check -s eq:0 -o ignore -e empty grep '^\.$' stdout - atf_check -s eq:0 -o ignore -e empty grep '^\..$' stdout + atf_check -s exit:0 -o save:stdout -e empty /bin/ls -a + atf_check -s exit:0 -o ignore -e empty grep '^\.$' stdout + atf_check -s exit:0 -o ignore -e empty grep '^\..$' stdout test_unmount } @@ -54,17 +54,17 @@ types_head() { types_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir dir - atf_check -s eq:0 -o empty -e empty touch reg - atf_check -s eq:0 -o empty -e empty ln -s reg lnk - atf_check -s eq:0 -o empty -e empty mknod blk b 0 0 - atf_check -s eq:0 -o empty -e empty mknod chr c 0 0 - atf_check -s eq:0 -o empty -e empty mknod fifo p - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty touch reg + atf_check -s exit:0 -o empty -e empty ln -s reg lnk + atf_check -s exit:0 -o empty -e empty mknod blk b 0 0 + atf_check -s exit:0 -o empty -e empty mknod chr c 0 0 + atf_check -s exit:0 -o empty -e empty mknod fifo p + atf_check -s exit:0 -o empty -e empty \ $(atf_get_srcdir)/h_tools sockets sock - atf_check -s eq:0 -o ignore -e empty ls - atf_check -s eq:0 -o empty -e empty rm -rf * + atf_check -s exit:0 -o ignore -e empty ls + atf_check -s exit:0 -o empty -e empty rm -rf * test_unmount } @@ -78,10 +78,10 @@ caching_head() { caching_body() { test_mount - atf_check -s eq:0 -o empty -e empty touch $(jot 10) - atf_check -s eq:0 -o empty -e empty rm * - atf_check -s eq:0 -o empty -e empty touch $(jot 20) - atf_check -s eq:0 -o empty -e empty -x "ls >/dev/null" + atf_check -s exit:0 -o empty -e empty touch $(jot 10) + atf_check -s exit:0 -o empty -e empty rm * + atf_check -s exit:0 -o empty -e empty touch $(jot 20) + atf_check -s exit:0 -o empty -e empty -x "ls >/dev/null" test_unmount } @@ -94,13 +94,13 @@ many_head() { many_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty mkdir a echo "Creating 500 files" for f in $(jot 500); do touch a/$f done - atf_check -s eq:0 -o empty -e empty rm a/* - atf_check -s eq:0 -o empty -e empty rmdir a + atf_check -s exit:0 -o empty -e empty rm a/* + atf_check -s exit:0 -o empty -e empty rmdir a test_unmount } diff --git a/tests/fs/tmpfs/t_remove.sh b/tests/fs/tmpfs/t_remove.sh index df868f9ccf52..9ee9dd6c8e47 100644 --- a/tests/fs/tmpfs/t_remove.sh +++ b/tests/fs/tmpfs/t_remove.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_remove.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_remove.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,11 +37,11 @@ single_head() { single_body() { test_mount - atf_check -s eq:1 -o empty -e empty test -f a - atf_check -s eq:0 -o empty -e empty touch a - atf_check -s eq:0 -o empty -e empty test -f a - atf_check -s eq:0 -o empty -e empty rm a - atf_check -s eq:1 -o empty -e empty test -f a + atf_check -s exit:1 -o empty -e empty test -f a + atf_check -s exit:0 -o empty -e empty touch a + atf_check -s exit:0 -o empty -e empty test -f a + atf_check -s exit:0 -o empty -e empty rm a + atf_check -s exit:1 -o empty -e empty test -f a test_unmount } @@ -55,12 +55,12 @@ uchg_head() { uchg_body() { test_mount - atf_check -s eq:0 -o empty -e empty touch a - atf_check -s eq:0 -o empty -e empty chflags uchg a - atf_check -s eq:1 -o empty -e ignore rm -f a - atf_check -s eq:0 -o empty -e empty chflags nouchg a - atf_check -s eq:0 -o empty -e empty rm a - atf_check -s eq:1 -o empty -e empty test -f a + atf_check -s exit:0 -o empty -e empty touch a + atf_check -s exit:0 -o empty -e empty chflags uchg a + atf_check -s exit:1 -o empty -e ignore rm -f a + atf_check -s exit:0 -o empty -e empty chflags nouchg a + atf_check -s exit:0 -o empty -e empty rm a + atf_check -s exit:1 -o empty -e empty test -f a test_unmount } @@ -73,9 +73,9 @@ dot_head() { dot_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:1 -o empty -e ignore unlink a/. - atf_check -s eq:0 -o empty -e empty rmdir a + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:1 -o empty -e ignore unlink a/. + atf_check -s exit:0 -o empty -e empty rmdir a test_unmount } @@ -89,12 +89,12 @@ kqueue_head() { kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir dir - atf_check -s eq:0 -o empty -e empty touch dir/a + atf_check -s exit:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty touch dir/a echo 'rm dir/a' | kqueue_monitor 2 dir dir/a kqueue_check dir/a NOTE_DELETE kqueue_check dir NOTE_WRITE - atf_check -s eq:0 -o empty -e empty rmdir dir + atf_check -s exit:0 -o empty -e empty rmdir dir test_unmount } diff --git a/tests/fs/tmpfs/t_rename.sh b/tests/fs/tmpfs/t_rename.sh index 7613f1f493a8..c704efbceaca 100644 --- a/tests/fs/tmpfs/t_rename.sh +++ b/tests/fs/tmpfs/t_rename.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_rename.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_rename.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,10 +38,10 @@ dots_head() { dots_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:1 -o empty -e ignore mv a/. c - atf_check -s eq:1 -o empty -e ignore mv a/.. c - atf_check -s eq:0 -o empty -e empty rmdir a + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:1 -o empty -e ignore mv a/. c + atf_check -s exit:1 -o empty -e ignore mv a/.. c + atf_check -s exit:0 -o empty -e empty rmdir a test_unmount } @@ -54,12 +54,12 @@ crossdev_head() { crossdev_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:1 -o empty -e save:stderr \ + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:1 -o empty -e save:stderr \ $(atf_get_srcdir)/h_tools rename a /var/tmp/a - atf_check -s eq:0 -o ignore -e empty grep "Cross-device link" stderr - atf_check -s eq:0 -o empty -e empty test -d a - atf_check -s eq:0 -o empty -e empty rmdir a + atf_check -s exit:0 -o ignore -e empty grep "Cross-device link" stderr + atf_check -s exit:0 -o empty -e empty test -d a + atf_check -s exit:0 -o empty -e empty rmdir a test_unmount } @@ -72,11 +72,11 @@ basic_head() { basic_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty mv a c - atf_check -s eq:1 -o empty -e empty test -d a - atf_check -s eq:0 -o empty -e empty test -d c - atf_check -s eq:0 -o empty -e empty rmdir c + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty mv a c + atf_check -s exit:1 -o empty -e empty test -d a + atf_check -s exit:0 -o empty -e empty test -d c + atf_check -s exit:0 -o empty -e empty rmdir c test_unmount } @@ -91,37 +91,37 @@ dotdot_body() { test_mount echo "Checking if the '..' entry is updated after moves" - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty mkdir b - atf_check -s eq:0 -o empty -e empty mv b a - atf_check -s eq:0 -o empty -e empty test -d a/b/../b - atf_check -s eq:0 -o empty -e empty test -d a/b/../../a + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty mkdir b + atf_check -s exit:0 -o empty -e empty mv b a + atf_check -s exit:0 -o empty -e empty test -d a/b/../b + atf_check -s exit:0 -o empty -e empty test -d a/b/../../a eval $(stat -s a/b) [ ${st_nlink} = 2 ] || atf_fail "Incorrect number of links" eval $(stat -s a) [ ${st_nlink} = 3 ] || atf_fail "Incorrect number of links" - atf_check -s eq:0 -o empty -e empty rmdir a/b - atf_check -s eq:0 -o empty -e empty rmdir a + atf_check -s exit:0 -o empty -e empty rmdir a/b + atf_check -s exit:0 -o empty -e empty rmdir a echo "Checking if the '..' entry is correct after renames" - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty mkdir b - atf_check -s eq:0 -o empty -e empty mv b a - atf_check -s eq:0 -o empty -e empty mv a c - atf_check -s eq:0 -o empty -e empty test -d c/b/../b - atf_check -s eq:0 -o empty -e empty test -d c/b/../../c - atf_check -s eq:0 -o empty -e empty rmdir c/b - atf_check -s eq:0 -o empty -e empty rmdir c + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty mkdir b + atf_check -s exit:0 -o empty -e empty mv b a + atf_check -s exit:0 -o empty -e empty mv a c + atf_check -s exit:0 -o empty -e empty test -d c/b/../b + atf_check -s exit:0 -o empty -e empty test -d c/b/../../c + atf_check -s exit:0 -o empty -e empty rmdir c/b + atf_check -s exit:0 -o empty -e empty rmdir c echo "Checking if the '..' entry is correct after multiple moves" - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty mkdir b - atf_check -s eq:0 -o empty -e empty mv b a - atf_check -s eq:0 -o empty -e empty mv a c - atf_check -s eq:0 -o empty -e empty mv c/b d - atf_check -s eq:0 -o empty -e empty test -d d/../c - atf_check -s eq:0 -o empty -e empty rmdir d - atf_check -s eq:0 -o empty -e empty rmdir c + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty mkdir b + atf_check -s exit:0 -o empty -e empty mv b a + atf_check -s exit:0 -o empty -e empty mv a c + atf_check -s exit:0 -o empty -e empty mv c/b d + atf_check -s exit:0 -o empty -e empty test -d d/../c + atf_check -s exit:0 -o empty -e empty rmdir d + atf_check -s exit:0 -o empty -e empty rmdir c test_unmount } @@ -135,14 +135,14 @@ dir_to_emptydir_head() { dir_to_emptydir_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty touch a/c - atf_check -s eq:0 -o empty -e empty mkdir b - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty touch a/c + atf_check -s exit:0 -o empty -e empty mkdir b + atf_check -s exit:0 -o empty -e empty \ $(atf_get_srcdir)/h_tools rename a b - atf_check -s eq:1 -o empty -e empty test -e a - atf_check -s eq:0 -o empty -e empty test -d b - atf_check -s eq:0 -o empty -e empty test -f b/c + atf_check -s exit:1 -o empty -e empty test -e a + atf_check -s exit:0 -o empty -e empty test -d b + atf_check -s exit:0 -o empty -e empty test -f b/c rm b/c rmdir b @@ -158,17 +158,17 @@ dir_to_fulldir_head() { dir_to_fulldir_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty touch a/c - atf_check -s eq:0 -o empty -e empty mkdir b - atf_check -s eq:0 -o empty -e empty touch b/d - atf_check -s eq:1 -o empty -e save:stderr \ + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty touch a/c + atf_check -s exit:0 -o empty -e empty mkdir b + atf_check -s exit:0 -o empty -e empty touch b/d + atf_check -s exit:1 -o empty -e save:stderr \ $(atf_get_srcdir)/h_tools rename a b - atf_check -s eq:0 -o ignore -e empty grep "Directory not empty" stderr - atf_check -s eq:0 -o empty -e empty test -d a - atf_check -s eq:0 -o empty -e empty test -f a/c - atf_check -s eq:0 -o empty -e empty test -d b - atf_check -s eq:0 -o empty -e empty test -f b/d + atf_check -s exit:0 -o ignore -e empty grep "Directory not empty" stderr + atf_check -s exit:0 -o empty -e empty test -d a + atf_check -s exit:0 -o empty -e empty test -f a/c + atf_check -s exit:0 -o empty -e empty test -d b + atf_check -s exit:0 -o empty -e empty test -f b/d rm a/c rm b/d rmdir a @@ -186,13 +186,13 @@ dir_to_file_head() { dir_to_file_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty touch b - atf_check -s eq:1 -o empty -e save:stderr \ + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty touch b + atf_check -s exit:1 -o empty -e save:stderr \ $(atf_get_srcdir)/h_tools rename a b - atf_check -s eq:0 -o ignore -e empty grep "Not a directory" stderr - atf_check -s eq:0 -o empty -e empty test -d a - atf_check -s eq:0 -o empty -e empty test -f b + atf_check -s exit:0 -o ignore -e empty grep "Not a directory" stderr + atf_check -s exit:0 -o empty -e empty test -d a + atf_check -s exit:0 -o empty -e empty test -f b rmdir a rm b @@ -208,13 +208,13 @@ file_to_dir_head() { file_to_dir_body() { test_mount - atf_check -s eq:0 -o empty -e empty touch a - atf_check -s eq:0 -o empty -e empty mkdir b - atf_check -s eq:1 -o empty -e save:stderr \ + atf_check -s exit:0 -o empty -e empty touch a + atf_check -s exit:0 -o empty -e empty mkdir b + atf_check -s exit:1 -o empty -e save:stderr \ $(atf_get_srcdir)/h_tools rename a b - atf_check -s eq:0 -o ignore -e empty grep "Is a directory" stderr - atf_check -s eq:0 -o empty -e empty test -f a - atf_check -s eq:0 -o empty -e empty test -d b + atf_check -s exit:0 -o ignore -e empty grep "Is a directory" stderr + atf_check -s exit:0 -o empty -e empty test -f a + atf_check -s exit:0 -o empty -e empty test -d b rm a rmdir b @@ -230,34 +230,34 @@ kqueue_head() { kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir dir - atf_check -s eq:0 -o empty -e empty touch dir/a + atf_check -s exit:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty touch dir/a echo 'mv dir/a dir/b' | kqueue_monitor 2 dir dir/a kqueue_check dir/a NOTE_RENAME kqueue_check dir NOTE_WRITE - atf_check -s eq:0 -o empty -e empty rm dir/b - atf_check -s eq:0 -o empty -e empty rmdir dir + atf_check -s exit:0 -o empty -e empty rm dir/b + atf_check -s exit:0 -o empty -e empty rmdir dir - atf_check -s eq:0 -o empty -e empty mkdir dir - atf_check -s eq:0 -o empty -e empty touch dir/a - atf_check -s eq:0 -o empty -e empty touch dir/b + atf_check -s exit:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty touch dir/a + atf_check -s exit:0 -o empty -e empty touch dir/b echo 'mv dir/a dir/b' | kqueue_monitor 3 dir dir/a dir/b kqueue_check dir/a NOTE_RENAME kqueue_check dir NOTE_WRITE kqueue_check dir/b NOTE_DELETE - atf_check -s eq:0 -o empty -e empty rm dir/b - atf_check -s eq:0 -o empty -e empty rmdir dir + atf_check -s exit:0 -o empty -e empty rm dir/b + atf_check -s exit:0 -o empty -e empty rmdir dir - atf_check -s eq:0 -o empty -e empty mkdir dir1 - atf_check -s eq:0 -o empty -e empty mkdir dir2 - atf_check -s eq:0 -o empty -e empty touch dir1/a + atf_check -s exit:0 -o empty -e empty mkdir dir1 + atf_check -s exit:0 -o empty -e empty mkdir dir2 + atf_check -s exit:0 -o empty -e empty touch dir1/a echo 'mv dir1/a dir2/a' | kqueue_monitor 3 dir1 dir1/a dir2 kqueue_check dir1/a NOTE_RENAME kqueue_check dir1 NOTE_WRITE kqueue_check dir2 NOTE_WRITE - atf_check -s eq:0 -o empty -e empty rm dir2/a - atf_check -s eq:0 -o empty -e empty rmdir dir1 - atf_check -s eq:0 -o empty -e empty rmdir dir2 + atf_check -s exit:0 -o empty -e empty rm dir2/a + atf_check -s exit:0 -o empty -e empty rmdir dir1 + atf_check -s exit:0 -o empty -e empty rmdir dir2 test_unmount } diff --git a/tests/fs/tmpfs/t_rmdir.sh b/tests/fs/tmpfs/t_rmdir.sh index 9e5d761edf6c..fa5ae6835c3d 100644 --- a/tests/fs/tmpfs/t_rmdir.sh +++ b/tests/fs/tmpfs/t_rmdir.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_rmdir.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_rmdir.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,7 +38,7 @@ mntpt_head() { mntpt_body() { test_mount - atf_check -s eq:1 -o empty -e ignore rmdir ${Mount_Point} + atf_check -s exit:1 -o empty -e ignore rmdir ${Mount_Point} test_unmount } @@ -52,7 +52,7 @@ non_existent_head() { non_existent_body() { test_mount - atf_check -s eq:1 -o empty -e ignore rmdir non-existent + atf_check -s exit:1 -o empty -e ignore rmdir non-existent test_unmount } @@ -65,11 +65,11 @@ single_head() { single_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty mkdir a eval $(stat -s ${Mount_Point}) [ ${st_nlink} = 3 ] || \ atf_fail "Incorrect number of links after creation" - atf_check -s eq:0 -o empty -e empty rmdir a + atf_check -s exit:0 -o empty -e empty rmdir a eval $(stat -s ${Mount_Point}) [ ${st_nlink} = 2 ] || \ atf_fail "Incorrect number of links after removal" @@ -85,10 +85,10 @@ nested_head() { nested_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir -p a/b/c - atf_check -s eq:0 -o empty -e empty rmdir a/b/c - atf_check -s eq:0 -o empty -e empty rmdir a/b - atf_check -s eq:0 -o empty -e empty rmdir a + atf_check -s exit:0 -o empty -e empty mkdir -p a/b/c + atf_check -s exit:0 -o empty -e empty rmdir a/b/c + atf_check -s exit:0 -o empty -e empty rmdir a/b + atf_check -s exit:0 -o empty -e empty rmdir a test_unmount } @@ -101,10 +101,10 @@ dots_head() { dots_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:1 -o empty -e ignore rmdir a/. - atf_check -s eq:1 -o empty -e ignore rmdir a/.. - atf_check -s eq:0 -o empty -e empty rmdir a + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:1 -o empty -e ignore rmdir a/. + atf_check -s exit:1 -o empty -e ignore rmdir a/.. + atf_check -s exit:0 -o empty -e empty rmdir a test_unmount } @@ -117,13 +117,13 @@ non_empty_head() { non_empty_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty mkdir a/b - atf_check -s eq:0 -o empty -e empty mkdir a/c - atf_check -s eq:1 -o empty -e ignore rmdir a - atf_check -s eq:0 -o empty -e empty rmdir a/b - atf_check -s eq:0 -o empty -e empty rmdir a/c - atf_check -s eq:0 -o empty -e empty rmdir a + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty mkdir a/b + atf_check -s exit:0 -o empty -e empty mkdir a/c + atf_check -s exit:1 -o empty -e ignore rmdir a + atf_check -s exit:0 -o empty -e empty rmdir a/b + atf_check -s exit:0 -o empty -e empty rmdir a/c + atf_check -s exit:0 -o empty -e empty rmdir a test_unmount } @@ -136,13 +136,13 @@ links_head() { links_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a - atf_check -s eq:0 -o empty -e empty mkdir a/b - atf_check -s eq:0 -o empty -e empty mkdir c + atf_check -s exit:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty mkdir a/b + atf_check -s exit:0 -o empty -e empty mkdir c - atf_check -s eq:0 -o empty -e empty rmdir c - atf_check -s eq:0 -o empty -e empty rmdir a/b - atf_check -s eq:0 -o empty -e empty rmdir a + atf_check -s exit:0 -o empty -e empty rmdir c + atf_check -s exit:0 -o empty -e empty rmdir a/b + atf_check -s exit:0 -o empty -e empty rmdir a eval $(stat -s ${Mount_Point}) [ ${st_nlink} = 2 ] || atf_fail "Incorrect number of links" @@ -158,12 +158,12 @@ curdir_head() { curdir_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a + atf_check -s exit:0 -o empty -e empty mkdir a # Catch a bug that would panic the system when accessing the # current directory after being deleted: vop_open cannot assume # that open files are still linked to a directory. - atf_check -s eq:1 -o empty -e ignore -x '( cd a && rmdir ../a && ls )' - atf_check -s eq:1 -o empty -e empty test -e a + atf_check -s exit:1 -o empty -e ignore -x '( cd a && rmdir ../a && ls )' + atf_check -s exit:1 -o empty -e empty test -e a test_unmount } @@ -177,13 +177,13 @@ kqueue_head() { kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir dir - atf_check -s eq:0 -o empty -e empty mkdir dir/a + atf_check -s exit:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty mkdir dir/a echo 'rmdir dir/a' | kqueue_monitor 3 dir dir/a kqueue_check dir/a NOTE_DELETE kqueue_check dir NOTE_LINK kqueue_check dir NOTE_WRITE - atf_check -s eq:0 -o empty -e empty rmdir dir + atf_check -s exit:0 -o empty -e empty rmdir dir test_unmount } diff --git a/tests/fs/tmpfs/t_setattr.sh b/tests/fs/tmpfs/t_setattr.sh index f64344646e48..a5a2e3c9d984 100644 --- a/tests/fs/tmpfs/t_setattr.sh +++ b/tests/fs/tmpfs/t_setattr.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_setattr.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_setattr.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,9 +38,9 @@ chown_head() { chown_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir own + atf_check -s exit:0 -o empty -e empty mkdir own eval $(stat -s own | sed -e 's|st_|ost_|g') - atf_check -s eq:0 -o empty -e empty chown 1234 own + atf_check -s exit:0 -o empty -e empty chown 1234 own eval $(stat -s own) [ ${st_uid} -eq 1234 ] || atf_fail "uid was not set" [ ${st_gid} -eq ${ost_gid} ] || atf_fail "gid was modified" @@ -57,7 +57,7 @@ chown_kqueue_head() { chown_kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir ownq + atf_check -s exit:0 -o empty -e empty mkdir ownq echo 'chown 1234 ownq' | kqueue_monitor 1 ownq kqueue_check ownq NOTE_ATTRIB @@ -72,9 +72,9 @@ chgrp_head() { chgrp_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir grp + atf_check -s exit:0 -o empty -e empty mkdir grp eval $(stat -s grp | sed -e 's|st_|ost_|g') - atf_check -s eq:0 -o empty -e empty chgrp 5678 grp + atf_check -s exit:0 -o empty -e empty chgrp 5678 grp eval $(stat -s grp) [ ${st_uid} -eq ${ost_uid} ] || atf_fail "uid was modified" [ ${st_gid} -eq 5678 ] || atf_fail "gid was not set" @@ -91,7 +91,7 @@ chgrp_kqueue_head() { chgrp_kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir grpq + atf_check -s exit:0 -o empty -e empty mkdir grpq echo 'chgrp 1234 grpq' | kqueue_monitor 1 grpq kqueue_check grpq NOTE_ATTRIB @@ -107,8 +107,8 @@ chowngrp_head() { chowngrp_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir owngrp - atf_check -s eq:0 -o empty -e empty chown 1234:5678 owngrp + atf_check -s exit:0 -o empty -e empty mkdir owngrp + atf_check -s exit:0 -o empty -e empty chown 1234:5678 owngrp eval $(stat -s owngrp) [ ${st_uid} -eq 1234 ] || atf_fail "uid was not modified" [ ${st_gid} -eq 5678 ] || atf_fail "gid was not modified" @@ -125,7 +125,7 @@ chowngrp_kqueue_head() { chowngrp_kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir owngrpp + atf_check -s exit:0 -o empty -e empty mkdir owngrpp echo 'chown 1234:5678 owngrpp' | kqueue_monitor 1 owngrpp kqueue_check owngrpp NOTE_ATTRIB @@ -140,8 +140,8 @@ chmod_head() { chmod_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir mode - atf_check -s eq:0 -o empty -e empty chmod 0000 mode + atf_check -s exit:0 -o empty -e empty mkdir mode + atf_check -s exit:0 -o empty -e empty chmod 0000 mode eval $(stat -s mode) [ ${st_mode} -eq 40000 ] || af_fail "mode was not set" @@ -157,7 +157,7 @@ chmod_kqueue_head() { chmod_kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir modeq + atf_check -s exit:0 -o empty -e empty mkdir modeq echo 'chmod 0000 modeq' | kqueue_monitor 1 modeq kqueue_check modeq NOTE_ATTRIB @@ -172,8 +172,8 @@ chtimes_head() { chtimes_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir times - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty mkdir times + atf_check -s exit:0 -o empty -e empty \ -x 'TZ=GMT touch -t 200501010101 times' eval $(stat -s times) [ ${st_atime} = ${st_mtime} ] || \ @@ -192,7 +192,7 @@ chtimes_kqueue_head() { chtimes_kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir timesq + atf_check -s exit:0 -o empty -e empty mkdir timesq echo 'touch timesq' | kqueue_monitor 1 timesq kqueue_check timesq NOTE_ATTRIB diff --git a/tests/fs/tmpfs/t_sizes.sh b/tests/fs/tmpfs/t_sizes.sh index b23881167c29..782ededa3107 100644 --- a/tests/fs/tmpfs/t_sizes.sh +++ b/tests/fs/tmpfs/t_sizes.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_sizes.sh,v 1.6 2018/01/17 00:23:17 maya Exp $ +# $NetBSD: t_sizes.sh,v 1.7 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -41,7 +41,7 @@ small_body() { eval $($(atf_get_srcdir)/h_tools statvfs .) f_bused=$((${f_blocks} - ${f_bfree})) [ ${f_bused} -gt 1 ] || atf_fail "Incorrect bused count" - atf_check -s eq:0 -o empty -e empty rm a + atf_check -s exit:0 -o empty -e empty rm a test_unmount } @@ -58,7 +58,7 @@ big_body() { eval $($(atf_get_srcdir)/h_tools statvfs . | sed -e 's|^f_|cf_|') cf_bused=$((${cf_blocks} - ${cf_bfree})) - atf_check -s eq:0 -o ignore -e ignore \ + atf_check -s exit:0 -o ignore -e ignore \ dd if=/dev/zero of=a bs=1m count=5 eval $($(atf_get_srcdir)/h_tools statvfs .) f_bused=$((${f_blocks} - ${f_bfree})) @@ -66,7 +66,7 @@ big_body() { [ ${f_bused} -gt $((5 * 1024 * 1024 / ${pagesize})) ] || \ atf_fail "bused too big" of_bused=${f_bused} - atf_check -s eq:0 -o empty -e empty rm a + atf_check -s exit:0 -o empty -e empty rm a eval $($(atf_get_srcdir)/h_tools statvfs .) f_bused=$((${f_blocks} - ${f_bfree})) [ ${f_bused} -lt ${of_bused} ] || \ @@ -84,13 +84,13 @@ overflow_head() { overflow_body() { test_mount -o -s10M - atf_check -s eq:0 -o empty -e empty touch a - atf_check -s eq:0 -o empty -e empty rm a + atf_check -s exit:0 -o empty -e empty touch a + atf_check -s exit:0 -o empty -e empty rm a eval $($(atf_get_srcdir)/h_tools statvfs .) of_bused=$((${f_blocks} - ${f_bfree})) - atf_check -s eq:1 -o ignore -e ignore \ + atf_check -s exit:1 -o ignore -e ignore \ dd if=/dev/zero of=a bs=1m count=15 - atf_check -s eq:0 -o empty -e empty rm a + atf_check -s exit:0 -o empty -e empty rm a eval $($(atf_get_srcdir)/h_tools statvfs .) f_bused=$((${f_blocks} - ${f_bfree})) [ ${f_bused} -ge ${of_bused} -a ${f_bused} -le $((${of_bused} + 1)) ] \ @@ -108,10 +108,10 @@ overwrite_head() { overwrite_body() { test_mount -o -s10M - atf_check -s eq:0 -o ignore -e ignore \ + atf_check -s exit:0 -o ignore -e ignore \ dd if=/dev/zero of=a bs=1024 count=10 sync - atf_check -s eq:0 -o ignore -e ignore \ + atf_check -s exit:0 -o ignore -e ignore \ dd if=/dev/zero of=a bs=1024 conv=notrunc seek=1 count=1 sync eval $(stat -s a) diff --git a/tests/fs/tmpfs/t_sockets.sh b/tests/fs/tmpfs/t_sockets.sh index 6b972483513c..4fdbdc73fa01 100644 --- a/tests/fs/tmpfs/t_sockets.sh +++ b/tests/fs/tmpfs/t_sockets.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_sockets.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_sockets.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -34,10 +34,10 @@ basic_head() { basic_body() { test_mount - atf_check -s eq:0 -o empty -e empty $(atf_get_srcdir)/h_tools sockets a - atf_check -s eq:0 -o empty -e empty rm a + atf_check -s exit:0 -o empty -e empty $(atf_get_srcdir)/h_tools sockets a + atf_check -s exit:0 -o empty -e empty rm a - atf_check -s eq:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty mkdir dir echo "$(atf_get_srcdir)/h_tools sockets dir/a" | kqueue_monitor 1 dir kqueue_check dir NOTE_WRITE diff --git a/tests/fs/tmpfs/t_symlink.sh b/tests/fs/tmpfs/t_symlink.sh index 2cc66c06b4a6..232ebbd8e46b 100644 --- a/tests/fs/tmpfs/t_symlink.sh +++ b/tests/fs/tmpfs/t_symlink.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_symlink.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_symlink.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,12 +37,12 @@ file_head() { file_body() { test_mount - atf_check -s eq:0 -o empty -e empty touch a - atf_check -s eq:0 -o empty -e empty ln -s a b + atf_check -s exit:0 -o empty -e empty touch a + atf_check -s exit:0 -o empty -e empty ln -s a b [ $(md5 b | cut -d ' ' -f 4) = d41d8cd98f00b204e9800998ecf8427e ] || \ atf_fail "Symlink points to an incorrect file" - atf_check -s eq:0 -o empty -e empty -x 'echo foo >a' + atf_check -s exit:0 -o empty -e empty -x 'echo foo >a' [ $(md5 b | cut -d ' ' -f 4) = d3b07384d113edec49eaa6238ad5ff00 ] || \ atf_fail "Symlink points to an incorrect file" @@ -58,10 +58,10 @@ exec_head() { exec_body() { test_mount - atf_check -s eq:0 -o empty -e empty touch b - atf_check -s eq:0 -o empty -e empty ln -s /bin/cp cp - atf_check -s eq:0 -o empty -e empty ./cp b c - atf_check -s eq:0 -o empty -e empty test -f c + atf_check -s exit:0 -o empty -e empty touch b + atf_check -s exit:0 -o empty -e empty ln -s /bin/cp cp + atf_check -s exit:0 -o empty -e empty ./cp b c + atf_check -s exit:0 -o empty -e empty test -f c test_unmount } @@ -74,13 +74,13 @@ dir_head() { dir_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir d - atf_check -s eq:1 -o empty -e empty test -f d/foo - atf_check -s eq:1 -o empty -e empty test -f e/foo - atf_check -s eq:0 -o empty -e empty ln -s d e - atf_check -s eq:0 -o empty -e empty touch d/foo - atf_check -s eq:0 -o empty -e empty test -f d/foo - atf_check -s eq:0 -o empty -e empty test -f e/foo + atf_check -s exit:0 -o empty -e empty mkdir d + atf_check -s exit:1 -o empty -e empty test -f d/foo + atf_check -s exit:1 -o empty -e empty test -f e/foo + atf_check -s exit:0 -o empty -e empty ln -s d e + atf_check -s exit:0 -o empty -e empty touch d/foo + atf_check -s exit:0 -o empty -e empty test -f d/foo + atf_check -s exit:0 -o empty -e empty test -f e/foo test_unmount } @@ -94,11 +94,11 @@ kqueue_head() { kqueue_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir dir + atf_check -s exit:0 -o empty -e empty mkdir dir echo 'ln -s non-existent dir/a' | kqueue_monitor 1 dir kqueue_check dir NOTE_WRITE - atf_check -s eq:0 -o empty -e empty rm dir/a - atf_check -s eq:0 -o empty -e empty rmdir dir + atf_check -s exit:0 -o empty -e empty rm dir/a + atf_check -s exit:0 -o empty -e empty rmdir dir test_unmount } diff --git a/tests/fs/tmpfs/t_times.sh b/tests/fs/tmpfs/t_times.sh index d8f4a62ebc51..6f3aaf91d322 100644 --- a/tests/fs/tmpfs/t_times.sh +++ b/tests/fs/tmpfs/t_times.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_times.sh,v 1.7 2024/04/04 16:58:35 christos Exp $ +# $NetBSD: t_times.sh,v 1.8 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,7 +38,7 @@ empty_head() { empty_body() { test_mount - atf_check -s eq:0 -o empty -e empty touch a + atf_check -s exit:0 -o empty -e empty touch a eval $(stat -s a | sed -e 's|st_|ost_|g') || atf_fail "stat failed" [ ${ost_birthtime} -eq ${ost_atime} ] || \ atf_fail "Incorrect atime: ${ost_birthtime} != ${ost_atime}" @@ -48,7 +48,7 @@ empty_body() { atf_fail "Incorrect mtime: ${ost_birthtime} != ${ost_mtime}" sleep 1 - atf_check -s eq:0 -o empty -e empty cat a + atf_check -s exit:0 -o empty -e empty cat a eval $(stat -s a) || atf_fail "stat failed" [ ${st_atime} -gt ${ost_atime} ] || \ atf_fail "Incorrect atime: ${st_atime} <= ${ost_atime}" @@ -83,7 +83,7 @@ non_empty_body() { eval $(stat -s b | sed -e 's|st_|ost_|g') || atf_fail "stat failed" sleep 1 - atf_check -s eq:0 -o inline:"foo\n" -e empty cat b + atf_check -s exit:0 -o inline:"foo\n" -e empty cat b eval $(stat -s b) || atf_fail "stat failed" [ ${st_atime} -gt ${ost_atime} ] || \ atf_fail "Incorrect atime: ${st_atime} <= ${ost_atime}" @@ -108,7 +108,7 @@ link_body() { eval $(stat -s c | sed -e 's|st_|ost_|g') || atf_fail "stat failed" sleep 1 - atf_check -s eq:0 -o empty -e empty ln c d + atf_check -s exit:0 -o empty -e empty ln c d eval $(stat -s c) || atf_fail "stat failed" [ ${st_atime} -eq ${ost_atime} ] || \ atf_fail "Incorrect atime: ${st_atime} != ${ost_atime}" @@ -129,12 +129,12 @@ rename_head() { rename_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir e + atf_check -s exit:0 -o empty -e empty mkdir e echo foo >e/a || atf_fail "Creation failed" eval $(stat -s e | sed -e 's|st_|dost_|g') || atf_fail "stat failed" eval $(stat -s e/a | sed -e 's|st_|ost_|g') || atf_fail "stat failed" sleep 1 - atf_check -s eq:0 -o empty -e empty mv e/a e/b + atf_check -s exit:0 -o empty -e empty mv e/a e/b eval $(stat -s e | sed -e 's|st_|dst_|g') || atf_fail "stat failed" eval $(stat -s e/b) || atf_fail "stat failed" [ ${st_atime} -eq ${ost_atime} ] || \ diff --git a/tests/fs/tmpfs/t_trail_slash.sh b/tests/fs/tmpfs/t_trail_slash.sh index df5b023711bb..038354c6917d 100644 --- a/tests/fs/tmpfs/t_trail_slash.sh +++ b/tests/fs/tmpfs/t_trail_slash.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_trail_slash.sh,v 1.5 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_trail_slash.sh,v 1.6 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,11 +35,11 @@ main_head() { main_body() { test_mount - atf_check -s eq:0 -o empty -e empty mkdir a/ - atf_check -s eq:0 -o empty -e empty touch a/b - atf_check -s eq:0 -o empty -e empty test -f a/b - atf_check -s eq:0 -o empty -e empty rm a/b - atf_check -s eq:0 -o empty -e empty rmdir a/ + atf_check -s exit:0 -o empty -e empty mkdir a/ + atf_check -s exit:0 -o empty -e empty touch a/b + atf_check -s exit:0 -o empty -e empty test -f a/b + atf_check -s exit:0 -o empty -e empty rm a/b + atf_check -s exit:0 -o empty -e empty rmdir a/ test_unmount } diff --git a/tests/fs/tmpfs/t_vnd.sh b/tests/fs/tmpfs/t_vnd.sh index bf9f5c3a026f..71cbadd0bc34 100644 --- a/tests/fs/tmpfs/t_vnd.sh +++ b/tests/fs/tmpfs/t_vnd.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_vnd.sh,v 1.13 2024/04/04 16:57:45 christos Exp $ +# $NetBSD: t_vnd.sh,v 1.14 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -40,14 +40,14 @@ basic_head() { basic_body() { test_mount - atf_check -s eq:0 -o ignore -e ignore \ + atf_check -s exit:0 -o ignore -e ignore \ dd if=/dev/zero of=disk.img bs=1m count=10 - atf_check -s eq:0 -o empty -e empty vndconfig -c ${vnddev} disk.img + atf_check -s exit:0 -o empty -e empty vndconfig -c ${vnddev} disk.img - atf_check -s eq:0 -o ignore -e ignore newfs -I ${rvnd} + atf_check -s exit:0 -o ignore -e ignore newfs -I ${rvnd} - atf_check -s eq:0 -o empty -e empty mkdir mnt - atf_check -s eq:0 -o empty -e empty mount ${vnd} mnt + atf_check -s exit:0 -o empty -e empty mkdir mnt + atf_check -s exit:0 -o empty -e empty mount ${vnd} mnt echo "Creating test files" for f in $(jot -w %u 100 | uniq); do @@ -61,8 +61,8 @@ basic_body() { atf_fail "Invalid checksum for file ${f}" done - atf_check -s eq:0 -o empty -e empty umount mnt - atf_check -s eq:0 -o empty -e empty vndconfig -u ${vnddev} + atf_check -s exit:0 -o empty -e empty umount mnt + atf_check -s exit:0 -o empty -e empty vndconfig -u ${vnddev} test_unmount touch done diff --git a/tests/fs/tmpfs/t_vnode_leak.sh b/tests/fs/tmpfs/t_vnode_leak.sh index 3f0dc5cc7c9e..7dd3fe8a37f7 100644 --- a/tests/fs/tmpfs/t_vnode_leak.sh +++ b/tests/fs/tmpfs/t_vnode_leak.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_vnode_leak.sh,v 1.7 2018/01/17 00:23:17 maya Exp $ +# $NetBSD: t_vnode_leak.sh,v 1.8 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,7 +37,7 @@ main_head() { main_body() { echo "Lowering kern.maxvnodes to 2000" sysctl -n kern.maxvnodes >oldvnodes - atf_check -s eq:0 -o ignore -e empty sysctl -w kern.maxvnodes=2000 + atf_check -s exit:0 -o ignore -e empty sysctl -w kern.maxvnodes=2000 test_mount -o -s$(((4000 + 2) * 4096)) echo "Creating 4000 directories" diff --git a/tests/games/t_factor.sh b/tests/games/t_factor.sh index 1452a7f1b6ee..fb0ec0d238d8 100644 --- a/tests/games/t_factor.sh +++ b/tests/games/t_factor.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_factor.sh,v 1.11 2020/10/11 18:43:50 christos Exp $ +# $NetBSD: t_factor.sh,v 1.12 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -31,7 +31,7 @@ expect() { if [ -n "$3" ] && [ $ncrypt -eq 0 ] ; then atf_skip "crypto needed for huge non-prime factors - PR bin/23663" fi - atf_check -s eq:0 -o file:expout -e empty /usr/games/factor ${1} + atf_check -s exit:0 -o file:expout -e empty /usr/games/factor ${1} } atf_test_case overflow1 diff --git a/tests/lib/librumphijack/t_tcpip.sh b/tests/lib/librumphijack/t_tcpip.sh index ea5ca958750f..ae51bf23ac0f 100644 --- a/tests/lib/librumphijack/t_tcpip.sh +++ b/tests/lib/librumphijack/t_tcpip.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_tcpip.sh,v 1.23 2023/08/05 13:13:37 riastradh Exp $ +# $NetBSD: t_tcpip.sh,v 1.24 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -88,8 +88,8 @@ start_sshd() { cp $(atf_get_srcdir)/ssh_host_key . atf_check -s ignore -o empty -e ignore \ cp $(atf_get_srcdir)/ssh_host_key.pub . - atf_check -s eq:0 -o empty -e empty chmod 400 ssh_host_key - atf_check -s eq:0 -o empty -e empty chmod 444 ssh_host_key.pub + atf_check -s exit:0 -o empty -e empty chmod 400 ssh_host_key + atf_check -s exit:0 -o empty -e empty chmod 444 ssh_host_key.pub # Start in debugging mode so we don't have parent<->child privsep stuff env LD_PRELOAD=/usr/lib/librumphijack.so \ @@ -101,14 +101,14 @@ start_sshd() { sleep 1 echo "Setting up SSH client configuration" - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ ssh-keygen -f ssh_user_key -t rsa -b 1024 -N "" -q - atf_check -s eq:0 -o empty -e empty \ + atf_check -s exit:0 -o empty -e empty \ cp ssh_user_key.pub authorized_keys echo "127.0.0.1,localhost,::1 " \ "$(cat $(atf_get_srcdir)/ssh_host_key.pub)" >known_hosts || \ atf_fail "Failed to create known_hosts" - atf_check -s eq:0 -o empty -e empty chmod 600 authorized_keys + atf_check -s exit:0 -o empty -e empty chmod 600 authorized_keys sed -e "s,@SRCDIR@,$(atf_get_srcdir),g" -e "s,@WORKDIR@,$(pwd),g" \ $(atf_get_srcdir)/ssh_config.in >ssh_config || \ atf_fail "Failed to create ssh_config" diff --git a/tests/modules/t_abi_uvm.sh b/tests/modules/t_abi_uvm.sh index b855bc831dac..dc89fb8345e4 100644 --- a/tests/modules/t_abi_uvm.sh +++ b/tests/modules/t_abi_uvm.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_abi_uvm.sh,v 1.3 2012/04/20 05:41:25 jruoho Exp $ +# $NetBSD: t_abi_uvm.sh,v 1.4 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -58,7 +58,7 @@ PAGE_SIZE_body() { echo "Module PAGE_SIZE: ${module_pagesize}" atf_check_equal "${kernel_pagesize}" "${module_pagesize}" - atf_check -s eq:0 -o empty -e empty modunload k_uvm + atf_check -s exit:0 -o empty -e empty modunload k_uvm } PAGE_SIZE_cleanup() { modunload k_uvm >/dev/null 2>&1 || true diff --git a/tests/modules/t_klua_pr_52864.sh b/tests/modules/t_klua_pr_52864.sh index d5bf58c4de56..50b97170035d 100644 --- a/tests/modules/t_klua_pr_52864.sh +++ b/tests/modules/t_klua_pr_52864.sh @@ -1,5 +1,5 @@ #! /usr/bin/atf-sh -# $NetBSD: t_klua_pr_52864.sh,v 1.3 2023/03/01 21:08:38 nia Exp $ +# $NetBSD: t_klua_pr_52864.sh,v 1.4 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2018 The NetBSD Foundation, Inc. # All rights reserved. @@ -41,10 +41,10 @@ luastate_body() { fi sysctl -q kern.lua.verbose if [ $? -eq 1 ]; then - atf_check -s eq:0 modload lua + atf_check -s exit:0 modload lua fi - atf_check -s eq:0 luactl -q create atfluastate - atf_check -s eq:0 -o ignore luactl + atf_check -s exit:0 luactl -q create atfluastate + atf_check -s exit:0 -o ignore luactl } luastate_cleanup() { diff --git a/tests/modules/t_modload.sh b/tests/modules/t_modload.sh index 561bb6f6d574..e7861ca9256f 100644 --- a/tests/modules/t_modload.sh +++ b/tests/modules/t_modload.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_modload.sh,v 1.13 2012/04/20 05:41:25 jruoho Exp $ +# $NetBSD: t_modload.sh,v 1.14 2024/04/28 07:27:41 rillig Exp $ # # Copyright (c) 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -27,7 +27,7 @@ check_sysctl() { echo "${1} = ${2}" >expout - atf_check -s eq:0 -o file:expout -e empty sysctl ${1} + atf_check -s exit:0 -o file:expout -e empty sysctl ${1} } atf_test_case plain cleanup @@ -49,14 +49,14 @@ plain_body() { cat >experr <expout - atf_check -s eq:0 -o file:expout -e empty sysctl ${1} + atf_check -s exit:0 -o file:expout -e empty sysctl ${1} } write_sysctl() { - atf_check -s eq:0 -o ignore -e empty sysctl -w "${1}=${2}" + atf_check -s exit:0 -o ignore -e empty sysctl -w "${1}=${2}" } write_sysctl_fail() { echo "${3}" >experr - atf_check -s eq:1 -o ignore -e file:experr sysctl -w "${1}=${2}" + atf_check -s exit:1 -o ignore -e file:experr sysctl -w "${1}=${2}" } atf_test_case unbound cleanup diff --git a/tests/sbin/newfs_msdos/t_create.sh b/tests/sbin/newfs_msdos/t_create.sh index f6f5e91cde93..765f78fda1a1 100644 --- a/tests/sbin/newfs_msdos/t_create.sh +++ b/tests/sbin/newfs_msdos/t_create.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_create.sh,v 1.4 2020/03/15 10:15:16 martin Exp $ +# $NetBSD: t_create.sh,v 1.5 2024/04/28 07:27:42 rillig Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -36,11 +36,11 @@ validfat32_body() { atf_skip "not enough free space in working directory" fi - atf_check -s eq:0 -o ignore -e ignore \ + atf_check -s exit:0 -o ignore -e ignore \ newfs_msdos -b 512 -C 33m -F 32 msdos.img # fsck_msdos/newfs_msdos have been fixed # atf_expect_fail "PR bin/46743" - atf_check -s eq:0 -o not-match:FIXED -e empty fsck_msdos -p msdos.img + atf_check -s exit:0 -o not-match:FIXED -e empty fsck_msdos -p msdos.img atf_expect_pass } diff --git a/tests/sys/rc/t_rc_d_cli.sh b/tests/sys/rc/t_rc_d_cli.sh index 271d02fa2648..237c5ff2e9eb 100644 --- a/tests/sys/rc/t_rc_d_cli.sh +++ b/tests/sys/rc/t_rc_d_cli.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_rc_d_cli.sh,v 1.5 2022/02/26 16:21:59 gson Exp $ +# $NetBSD: t_rc_d_cli.sh,v 1.6 2024/04/28 07:27:42 rillig Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -36,7 +36,7 @@ no_command_body() { export h_simple=YES rc_helper=$(atf_get_srcdir)/h_simple - atf_check -s eq:1 -o empty -e ignore ${rc_helper} + atf_check -s exit:1 -o empty -e ignore ${rc_helper} } atf_test_case default_start_no_args @@ -49,7 +49,7 @@ default_start_no_args_body() { rc_helper=$(atf_get_srcdir)/h_simple atf_expect_fail "PR bin/56506" - atf_check -s eq:0 -o ignore -e empty ${rc_helper} start + atf_check -s exit:0 -o ignore -e empty ${rc_helper} start ${rc_helper} forcestop atf_fail "random failure did not happen this time" } @@ -63,7 +63,7 @@ default_start_with_args_body() { export h_simple=YES rc_helper=$(atf_get_srcdir)/h_simple - atf_check -s eq:1 -o ignore -e ignore ${rc_helper} start foo + atf_check -s exit:1 -o ignore -e ignore ${rc_helper} start foo if ${rc_helper} status >/dev/null; then ${rc_helper} forcestop atf_fail 'extra argument to start did not error out' @@ -81,7 +81,7 @@ default_stop_no_args_body() { atf_expect_fail "PR bin/56506" ${rc_helper} start - atf_check -s eq:0 -o ignore -e empty ${rc_helper} stop + atf_check -s exit:0 -o ignore -e empty ${rc_helper} stop atf_fail "random failure did not happen this time" } @@ -95,7 +95,7 @@ default_stop_with_args_body() { rc_helper=$(atf_get_srcdir)/h_simple ${rc_helper} start - atf_check -s eq:1 -o ignore -e ignore ${rc_helper} stop foo + atf_check -s exit:1 -o ignore -e ignore ${rc_helper} stop foo if ${rc_helper} status >/dev/null; then ${rc_helper} forcestop else @@ -114,7 +114,7 @@ default_restart_no_args_body() { atf_expect_fail "PR bin/56506" ${rc_helper} start - atf_check -s eq:0 -o ignore -e empty ${rc_helper} restart + atf_check -s exit:0 -o ignore -e empty ${rc_helper} restart ${rc_helper} forcestop atf_fail "random failure did not happen this time" } @@ -129,7 +129,7 @@ default_restart_with_args_body() { rc_helper=$(atf_get_srcdir)/h_simple ${rc_helper} start - atf_check -s eq:1 -o ignore -e ignore ${rc_helper} restart foo + atf_check -s exit:1 -o ignore -e ignore ${rc_helper} restart foo ${rc_helper} forcestop } @@ -144,7 +144,7 @@ pre${command}:. ${command}:. post${command}:. EOF - atf_check -s eq:0 -o file:expout -e empty ${rc_helper} ${command} + atf_check -s exit:0 -o file:expout -e empty ${rc_helper} ${command} } do_overriden_with_args() { @@ -158,7 +158,7 @@ pre${command}:. ${command}: >arg1< > arg 2 < >arg3< >*<. post${command}:. EOF - atf_check -s eq:0 -o file:expout -e empty ${rc_helper} ${command} \ + atf_check -s exit:0 -o file:expout -e empty ${rc_helper} ${command} \ 'arg1' ' arg 2 ' 'arg3' '*' } diff --git a/tests/usr.bin/config/t_config.sh b/tests/usr.bin/config/t_config.sh index 3d9c86e72681..0cf066845ec3 100644 --- a/tests/usr.bin/config/t_config.sh +++ b/tests/usr.bin/config/t_config.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_config.sh,v 1.11 2021/10/21 13:21:55 andvar Exp $ +# $NetBSD: t_config.sh,v 1.12 2024/04/28 07:27:42 rillig Exp $ # # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -68,7 +68,7 @@ run_and_check_pass() run_and_check_prep "${name}" - atf_check -o ignore -s eq:0 \ + atf_check -o ignore -s exit:0 \ config -s "${supportdir}" -b "compile/${name}" "${config}" } @@ -80,7 +80,7 @@ run_and_check_warn() local stderr eval stderr=\$${name}_stderr - atf_check -o ignore -e "${stderr}" -s eq:0 \ + atf_check -o ignore -e "${stderr}" -s exit:0 \ config -s "${supportdir}" -b "compile/${name}" "${config}" } diff --git a/tests/usr.bin/id/t_groups.sh b/tests/usr.bin/id/t_groups.sh index 71121ab38e32..c345fd1d39fc 100644 --- a/tests/usr.bin/id/t_groups.sh +++ b/tests/usr.bin/id/t_groups.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_groups.sh,v 1.1 2012/03/17 16:33:14 jruoho Exp $ +# $NetBSD: t_groups.sh,v 1.2 2024/04/28 07:27:42 rillig Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -42,13 +42,13 @@ correct_body() { create_run_groups echo "users wheel" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_groups.sh - atf_check -s eq:0 -o file:expout -e empty ./run_groups.sh 100 - atf_check -s eq:0 -o file:expout -e empty ./run_groups.sh test + atf_check -s exit:0 -o file:expout -e empty ./run_groups.sh + atf_check -s exit:0 -o file:expout -e empty ./run_groups.sh 100 + atf_check -s exit:0 -o file:expout -e empty ./run_groups.sh test echo "wheel" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_groups.sh 0 - atf_check -s eq:0 -o file:expout -e empty ./run_groups.sh root + atf_check -s exit:0 -o file:expout -e empty ./run_groups.sh 0 + atf_check -s exit:0 -o file:expout -e empty ./run_groups.sh root } atf_test_case syntax @@ -60,8 +60,8 @@ syntax_body() { # Give an invalid flag but which is allowed by id (with which # groups shares code) when using the -Gn options. - atf_check -s eq:1 -o empty -e save:stderr ./run_groups.sh -r - atf_check -s eq:0 -o ignore -e empty grep '^usage:' stderr + atf_check -s exit:1 -o empty -e save:stderr ./run_groups.sh -r + atf_check -s exit:0 -o ignore -e empty grep '^usage:' stderr } atf_init_test_cases() diff --git a/tests/usr.bin/id/t_id.sh b/tests/usr.bin/id/t_id.sh index 9c877a6db7cf..dff902030e17 100644 --- a/tests/usr.bin/id/t_id.sh +++ b/tests/usr.bin/id/t_id.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_id.sh,v 1.1 2012/03/17 16:33:14 jruoho Exp $ +# $NetBSD: t_id.sh,v 1.2 2024/04/28 07:27:42 rillig Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -42,24 +42,24 @@ default_body() { create_run_id echo "uid=100(test) gid=100(users) groups=100(users),0(wheel)" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh test echo "uid=0(root) gid=0(wheel) groups=0(wheel)" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh 0 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh root + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh 0 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh root export LIBFAKE_EGID_ROOT=1 LIBFAKE_EUID_ROOT=1 echo "uid=100(test) gid=100(users) euid=0(root) egid=0(wheel) groups=100(users),0(wheel)" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh unset LIBFAKE_EGID_ROOT LIBFAKE_EUID_ROOT echo 'id: nonexistent: No such user' >experr - atf_check -s eq:1 -o empty -e file:experr ./run_id.sh nonexistent + atf_check -s exit:1 -o empty -e file:experr ./run_id.sh nonexistent - atf_check -s eq:1 -o empty -e save:stderr ./run_id.sh root nonexistent - atf_check -s eq:0 -o ignore -e empty grep ^usage: stderr + atf_check -s exit:1 -o empty -e save:stderr ./run_id.sh root nonexistent + atf_check -s exit:0 -o ignore -e empty grep ^usage: stderr } atf_test_case primaries @@ -73,9 +73,9 @@ primaries_body() { for p1 in -G -g -p -u; do for p2 in -G -g -p -u; do if [ ${p1} != ${p2} ]; then - atf_check -s eq:1 -o empty -e save:stderr \ + atf_check -s exit:1 -o empty -e save:stderr \ ./run_id.sh ${p1} ${p2} - atf_check -s eq:0 -o ignore -e empty \ + atf_check -s exit:0 -o ignore -e empty \ grep ^usage: stderr fi done @@ -90,28 +90,28 @@ Gflag_body() { create_run_id echo "100 0" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -G + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -G 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -G test echo "users wheel" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G -n - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G -n 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G -n test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -G -n + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -G -n 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -G -n test echo "0" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G 0 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G root + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -G 0 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -G root echo "wheel" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G -n 0 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -G -n root + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -G -n 0 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -G -n root echo 'id: nonexistent: No such user' >experr - atf_check -s eq:1 -o empty -e file:experr ./run_id.sh -G nonexistent + atf_check -s exit:1 -o empty -e file:experr ./run_id.sh -G nonexistent - atf_check -s eq:1 -o empty -e save:stderr ./run_id.sh -G root nonexistent - atf_check -s eq:0 -o ignore -e empty grep ^usage: stderr + atf_check -s exit:1 -o empty -e save:stderr ./run_id.sh -G root nonexistent + atf_check -s exit:0 -o ignore -e empty grep ^usage: stderr } atf_test_case gflag @@ -122,66 +122,66 @@ gflag_body() { create_run_id echo "100" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g test echo "users" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -n - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -n 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -n test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -n + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -n 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -n test echo "0" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g 0 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g root + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g 0 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g root echo "wheel" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -n 0 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -n root + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -n 0 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -n root echo "100" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r echo "users" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r -n + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r -n echo "100" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r test echo "users" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r -n 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r -n test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r -n 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r -n test export LIBFAKE_EGID_ROOT=1 LIBFAKE_EUID_ROOT=1 echo "0" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g echo "wheel" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -n + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -n echo "100" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r echo "users" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r -n + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r -n echo "100" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r test echo "users" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r -n 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -g -r -n test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r -n 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -g -r -n test unset LIBFAKE_EGID_ROOT LIBFAKE_EUID_ROOT echo 'id: nonexistent: No such user' >experr - atf_check -s eq:1 -o empty -e file:experr ./run_id.sh -g nonexistent + atf_check -s exit:1 -o empty -e file:experr ./run_id.sh -g nonexistent - atf_check -s eq:1 -o empty -e save:stderr ./run_id.sh -g root nonexistent - atf_check -s eq:0 -o ignore -e empty grep ^usage: stderr + atf_check -s exit:1 -o empty -e save:stderr ./run_id.sh -g root nonexistent + atf_check -s exit:0 -o ignore -e empty grep ^usage: stderr } atf_test_case pflag @@ -195,16 +195,16 @@ pflag_body() { uid test groups users wheel EOF - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -p - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -p 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -p test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -p + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -p 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -p test cat >expout <expout <experr - atf_check -s eq:1 -o empty -e file:experr ./run_id.sh -p nonexistent + atf_check -s exit:1 -o empty -e file:experr ./run_id.sh -p nonexistent - atf_check -s eq:1 -o empty -e save:stderr ./run_id.sh -p root nonexistent - atf_check -s eq:0 -o ignore -e empty grep ^usage: stderr + atf_check -s exit:1 -o empty -e save:stderr ./run_id.sh -p root nonexistent + atf_check -s exit:0 -o ignore -e empty grep ^usage: stderr } atf_test_case uflag @@ -231,67 +231,67 @@ uflag_body() { create_run_id echo "100" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u test echo "test" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -n - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -n 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -n test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -n + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -n 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -n test echo "0" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u 0 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u root + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u 0 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u root echo "root" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -n 0 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -n root + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -n 0 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -n root echo "100" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r echo "test" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r -n + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r -n echo "100" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r test echo "test" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r -n 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r -n test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r -n 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r -n test export LIBFAKE_EGID_ROOT=1 LIBFAKE_EUID_ROOT=1 echo "0" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u echo "root" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -n + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -n echo "100" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r echo "test" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r -n + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r -n echo "100" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r test echo "test" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r -n 100 - atf_check -s eq:0 -o file:expout -e empty ./run_id.sh -u -r -n test + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r -n 100 + atf_check -s exit:0 -o file:expout -e empty ./run_id.sh -u -r -n test unset LIBFAKE_EGID_ROOT LIBFAKE_EUID_ROOT echo 'id: nonexistent: No such user' >experr - atf_check -s eq:1 -o empty -e file:experr ./run_id.sh -u nonexistent + atf_check -s exit:1 -o empty -e file:experr ./run_id.sh -u nonexistent - atf_check -s eq:1 -o empty -e save:stderr \ + atf_check -s exit:1 -o empty -e save:stderr \ ./run_id.sh -u root nonexistent - atf_check -s eq:0 -o ignore -e empty grep ^usage: stderr + atf_check -s exit:0 -o ignore -e empty grep ^usage: stderr } atf_init_test_cases() diff --git a/tests/usr.bin/id/t_whoami.sh b/tests/usr.bin/id/t_whoami.sh index c8df7452e5ca..8729118c7395 100644 --- a/tests/usr.bin/id/t_whoami.sh +++ b/tests/usr.bin/id/t_whoami.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_whoami.sh,v 1.1 2012/03/17 16:33:14 jruoho Exp $ +# $NetBSD: t_whoami.sh,v 1.2 2024/04/28 07:27:42 rillig Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -43,12 +43,12 @@ correct_body() { echo "Checking with EUID=100" echo "test" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_whoami.sh + atf_check -s exit:0 -o file:expout -e empty ./run_whoami.sh echo "Checking with EUID=0" export LIBFAKE_EUID_ROOT=1 echo "root" >expout - atf_check -s eq:0 -o file:expout -e empty ./run_whoami.sh + atf_check -s exit:0 -o file:expout -e empty ./run_whoami.sh } atf_test_case syntax @@ -60,12 +60,12 @@ syntax_body() { # Give a user to the command. echo 'usage: whoami' >experr - atf_check -s eq:1 -o empty -e file:experr ./run_whoami.sh root + atf_check -s exit:1 -o empty -e file:experr ./run_whoami.sh root # Give an invalid flag but which is allowed by id (with which # whoami shares code) when using the -un options. echo 'usage: whoami' >experr - atf_check -s eq:1 -o empty -e file:experr ./run_whoami.sh -r + atf_check -s exit:1 -o empty -e file:experr ./run_whoami.sh -r } atf_init_test_cases() diff --git a/tests/usr.bin/mtree/t_sets.sh b/tests/usr.bin/mtree/t_sets.sh index c4c978bb1da3..6868ae614c92 100644 --- a/tests/usr.bin/mtree/t_sets.sh +++ b/tests/usr.bin/mtree/t_sets.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_sets.sh,v 1.4 2024/01/30 16:57:32 martin Exp $ +# $NetBSD: t_sets.sh,v 1.5 2024/04/28 07:27:42 rillig Exp $ # # Copyright (c) 2024 The NetBSD Foundation, Inc. # All rights reserved. @@ -30,7 +30,7 @@ check_mtree() local set=$1 cd / - atf_check -o empty -s eq:0 \ + atf_check -o empty -s exit:0 \ mtree -e # All rights reserved. @@ -58,30 +58,30 @@ expected33 expected34 expected35 ' -TESTSET_1_CASE_1="-s eq:0 -o file:1.expected -e empty b2e < 1.in" -TESTSET_1_CASE_2="-s eq:0 -o file:2.expected -e empty b2e < 2.in" +TESTSET_1_CASE_1="-s exit:0 -o file:1.expected -e empty b2e < 1.in" +TESTSET_1_CASE_2="-s exit:0 -o file:2.expected -e empty b2e < 2.in" -TESTSET_1_CASE_1="-s eq:0 -o file:expected16 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify b.gpg" -DISABLE_TESTSET_1_CASE_2="-s eq:0 -o file:expected17 -e empty netpgpverify -c verify a.gpg" -TESTSET_1_CASE_3="-s eq:0 -o file:expected18 -e empty env TZ=US/Pacific netpgpverify -c verify a.gpg" -TESTSET_1_CASE_4="-s eq:0 -o file:expected19 -e empty env TZ=US/Pacific netpgpverify -c verify NetBSD-6.0_RC2_hashes.asc" -TESTSET_1_CASE_5="-s eq:0 -o file:expected20 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat jj.asc" -TESTSET_1_CASE_6="-s eq:0 -o file:expected21 -e empty env TZ=US/Pacific netpgpverify < a.gpg" -TESTSET_1_CASE_7="-s eq:0 -o file:expected22 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < jj.asc" -TESTSET_1_CASE_8="-s eq:0 -o file:expected23 -e empty env TZ=US/Pacific netpgpverify < NetBSD-6.0_RC2_hashes.asc" -TESTSET_1_CASE_9="-s eq:0 -o file:expected24 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < b.gpg" -DISABLE_TESTSET_1_CASE_10="-s eq:0 -o file:expected25 -e empty netpgpverify NetBSD-6.0_RC1_hashes.gpg" -DISABLE_TESTSET_1_CASE_11="-s eq:0 -o file:expected26 -e empty netpgpverify < NetBSD-6.0_RC1_hashes.gpg" -TESTSET_1_CASE_12="-s eq:0 -o file:expected27 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < NetBSD-6.0_hashes.asc" -TESTSET_1_CASE_13="-s eq:0 -o file:expected28 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg NetBSD-6.0_hashes.asc" -DISABLE_TESTSET_1_CASE_14="-s eq:0 -o file:expected29 -e empty netpgpverify NetBSD-6.0_RC1_hashes_ascii.gpg" -DISABLE_TESTSET_1_CASE_15="-s eq:0 -o file:expected30 -e empty netpgpverify < NetBSD-6.0_RC1_hashes_ascii.gpg" -TESTSET_1_CASE_16="-s eq:0 -o file:expected31 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg b.gpg b.gpg" -TESTSET_1_CASE_17="-s eq:0 -o file:expected32 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg b.gpg b.gpg b.gpg" -TESTSET_1_CASE_18="-s eq:0 -o file:expected33 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg jj.asc b.gpg" -TESTSET_1_CASE_19="-s eq:0 -o file:expected34 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg det.sig" -TESTSET_1_CASE_20="-s eq:0 -o file:expected35 -e empty env TZ=US/Pacific netpgpverify -c cat -k pubring.gpg det.sig" -DISABLE_TESTSET_1_CASE_21="-s eq:0 -o file:expected46 -e empty netpgpverify -k problem-pubring.gpg NetBSD-6.0_hashes.asc" +TESTSET_1_CASE_1="-s exit:0 -o file:expected16 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify b.gpg" +DISABLE_TESTSET_1_CASE_2="-s exit:0 -o file:expected17 -e empty netpgpverify -c verify a.gpg" +TESTSET_1_CASE_3="-s exit:0 -o file:expected18 -e empty env TZ=US/Pacific netpgpverify -c verify a.gpg" +TESTSET_1_CASE_4="-s exit:0 -o file:expected19 -e empty env TZ=US/Pacific netpgpverify -c verify NetBSD-6.0_RC2_hashes.asc" +TESTSET_1_CASE_5="-s exit:0 -o file:expected20 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat jj.asc" +TESTSET_1_CASE_6="-s exit:0 -o file:expected21 -e empty env TZ=US/Pacific netpgpverify < a.gpg" +TESTSET_1_CASE_7="-s exit:0 -o file:expected22 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < jj.asc" +TESTSET_1_CASE_8="-s exit:0 -o file:expected23 -e empty env TZ=US/Pacific netpgpverify < NetBSD-6.0_RC2_hashes.asc" +TESTSET_1_CASE_9="-s exit:0 -o file:expected24 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < b.gpg" +DISABLE_TESTSET_1_CASE_10="-s exit:0 -o file:expected25 -e empty netpgpverify NetBSD-6.0_RC1_hashes.gpg" +DISABLE_TESTSET_1_CASE_11="-s exit:0 -o file:expected26 -e empty netpgpverify < NetBSD-6.0_RC1_hashes.gpg" +TESTSET_1_CASE_12="-s exit:0 -o file:expected27 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < NetBSD-6.0_hashes.asc" +TESTSET_1_CASE_13="-s exit:0 -o file:expected28 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg NetBSD-6.0_hashes.asc" +DISABLE_TESTSET_1_CASE_14="-s exit:0 -o file:expected29 -e empty netpgpverify NetBSD-6.0_RC1_hashes_ascii.gpg" +DISABLE_TESTSET_1_CASE_15="-s exit:0 -o file:expected30 -e empty netpgpverify < NetBSD-6.0_RC1_hashes_ascii.gpg" +TESTSET_1_CASE_16="-s exit:0 -o file:expected31 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg b.gpg b.gpg" +TESTSET_1_CASE_17="-s exit:0 -o file:expected32 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg b.gpg b.gpg b.gpg" +TESTSET_1_CASE_18="-s exit:0 -o file:expected33 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg jj.asc b.gpg" +TESTSET_1_CASE_19="-s exit:0 -o file:expected34 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg det.sig" +TESTSET_1_CASE_20="-s exit:0 -o file:expected35 -e empty env TZ=US/Pacific netpgpverify -c cat -k pubring.gpg det.sig" +DISABLE_TESTSET_1_CASE_21="-s exit:0 -o file:expected46 -e empty netpgpverify -k problem-pubring.gpg NetBSD-6.0_hashes.asc" TESTSET_2_NAME=dsa_signatures TESTSET_2_FILES=' @@ -102,13 +102,13 @@ expected44 expected45 expected46 ' -TESTSET_2_CASE_1="-s eq:0 -o file:expected36 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.gpg" -TESTSET_2_CASE_2="-s eq:0 -o file:expected37 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.gpg" -TESTSET_2_CASE_3="-s eq:0 -o file:expected38 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.asc" -TESTSET_2_CASE_4="-s eq:0 -o file:expected39 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.asc" -TESTSET_2_CASE_5="-s eq:0 -o file:expected40 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.gpg" -TESTSET_2_CASE_6="-s eq:0 -o file:expected41 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.gpg" -TESTSET_2_CASE_7="-s eq:0 -o file:expected42 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.asc" -TESTSET_2_CASE_8="-s eq:0 -o file:expected43 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.asc" -TESTSET_2_CASE_9="-s eq:0 -o file:expected44 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.gpg" -TESTSET_2_CASE_10="-s eq:0 -o file:expected45 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.asc" +TESTSET_2_CASE_1="-s exit:0 -o file:expected36 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.gpg" +TESTSET_2_CASE_2="-s exit:0 -o file:expected37 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.gpg" +TESTSET_2_CASE_3="-s exit:0 -o file:expected38 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.asc" +TESTSET_2_CASE_4="-s exit:0 -o file:expected39 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.asc" +TESTSET_2_CASE_5="-s exit:0 -o file:expected40 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.gpg" +TESTSET_2_CASE_6="-s exit:0 -o file:expected41 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.gpg" +TESTSET_2_CASE_7="-s exit:0 -o file:expected42 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.asc" +TESTSET_2_CASE_8="-s exit:0 -o file:expected43 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.asc" +TESTSET_2_CASE_9="-s exit:0 -o file:expected44 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.gpg" +TESTSET_2_CASE_10="-s exit:0 -o file:expected45 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.asc" diff --git a/tests/usr.bin/netpgpverify/t_netpgpverify.sh b/tests/usr.bin/netpgpverify/t_netpgpverify.sh index 2d532c0cb72d..051d1f9dd7ac 100644 --- a/tests/usr.bin/netpgpverify/t_netpgpverify.sh +++ b/tests/usr.bin/netpgpverify/t_netpgpverify.sh @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: t_netpgpverify.sh,v 1.4 2016/08/28 15:59:15 christos Exp $ +# $NetBSD: t_netpgpverify.sh,v 1.5 2024/04/28 07:27:42 rillig Exp $ # # Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -7193,26 +7193,26 @@ IGl0IHN0YXRpY2FsbHkgbGlua2VkIGFzIHdlbGw/Cm11bHRpcGxlIGZpbGVzIGlu IG5ldHBncHZlcmlmeQo= ==== EOF - atf_check -s eq:0 -o file:expected16 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify b.gpg - atf_check -s eq:0 -o file:expected18 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify a.gpg -# atf_check -s eq:0 -o file:expected19 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify NetBSD-6.0_RC2_hashes.asc - atf_check -s eq:0 -o file:expected20 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat jj.asc - atf_check -s eq:0 -o file:expected21 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < a.gpg - atf_check -s eq:0 -o file:expected22 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < jj.asc -# atf_check -s eq:0 -o file:expected23 -e empty env TZ=US/Pacific netpgpverify < NetBSD-6.0_RC2_hashes.asc - atf_check -s eq:0 -o file:expected24 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < b.gpg - #atf_check -s eq:0 -o file:expected25 -e empty netpgpverify NetBSD-6.0_RC1_hashes.gpg - #atf_check -s eq:0 -o file:expected26 -e empty netpgpverify < NetBSD-6.0_RC1_hashes.gpg - atf_check -s eq:0 -o file:expected27 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < NetBSD-6.0_hashes.asc - atf_check -s eq:0 -o file:expected28 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg NetBSD-6.0_hashes.asc - #atf_check -s eq:0 -o file:expected29 -e empty netpgpverify NetBSD-6.0_RC1_hashes_ascii.gpg - #atf_check -s eq:0 -o file:expected30 -e empty netpgpverify < NetBSD-6.0_RC1_hashes_ascii.gpg - atf_check -s eq:0 -o file:expected31 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg b.gpg b.gpg - atf_check -s eq:0 -o file:expected32 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg b.gpg b.gpg b.gpg - atf_check -s eq:0 -o file:expected33 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg jj.asc b.gpg - atf_check -s eq:0 -o file:expected34 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg det.sig - atf_check -s eq:0 -o file:expected35 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat det.sig - #atf_check -s eq:0 -o file:expected46 -e empty netpgpverify -k problem-pubring.gpg NetBSD-6.0_hashes.asc + atf_check -s exit:0 -o file:expected16 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify b.gpg + atf_check -s exit:0 -o file:expected18 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify a.gpg +# atf_check -s exit:0 -o file:expected19 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify NetBSD-6.0_RC2_hashes.asc + atf_check -s exit:0 -o file:expected20 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat jj.asc + atf_check -s exit:0 -o file:expected21 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < a.gpg + atf_check -s exit:0 -o file:expected22 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < jj.asc +# atf_check -s exit:0 -o file:expected23 -e empty env TZ=US/Pacific netpgpverify < NetBSD-6.0_RC2_hashes.asc + atf_check -s exit:0 -o file:expected24 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < b.gpg + #atf_check -s exit:0 -o file:expected25 -e empty netpgpverify NetBSD-6.0_RC1_hashes.gpg + #atf_check -s exit:0 -o file:expected26 -e empty netpgpverify < NetBSD-6.0_RC1_hashes.gpg + atf_check -s exit:0 -o file:expected27 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < NetBSD-6.0_hashes.asc + atf_check -s exit:0 -o file:expected28 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg NetBSD-6.0_hashes.asc + #atf_check -s exit:0 -o file:expected29 -e empty netpgpverify NetBSD-6.0_RC1_hashes_ascii.gpg + #atf_check -s exit:0 -o file:expected30 -e empty netpgpverify < NetBSD-6.0_RC1_hashes_ascii.gpg + atf_check -s exit:0 -o file:expected31 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg b.gpg b.gpg + atf_check -s exit:0 -o file:expected32 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg b.gpg b.gpg b.gpg + atf_check -s exit:0 -o file:expected33 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg jj.asc b.gpg + atf_check -s exit:0 -o file:expected34 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg det.sig + atf_check -s exit:0 -o file:expected35 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat det.sig + #atf_check -s exit:0 -o file:expected46 -e empty netpgpverify -k problem-pubring.gpg NetBSD-6.0_hashes.asc } # Test set 2 (dsa_signatures) for netpgpverify @@ -7407,16 +7407,16 @@ LTIzIFtFeHBpcnkgMjAxOS0wNi0yMV0KZmluZ2VycHJpbnQ6ICAxOTE1IDA4MDEg ZmJkOCBmNDVkIDg5ZjIgMDIwNSA5ZmYyIGMyNGYgZGYyYyBlNjIwIAoK ==== EOF - atf_check -s eq:0 -o file:expected36 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.gpg - atf_check -s eq:0 -o file:expected37 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.gpg - atf_check -s eq:0 -o file:expected38 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.asc - atf_check -s eq:0 -o file:expected39 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.asc - atf_check -s eq:0 -o file:expected40 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.gpg - atf_check -s eq:0 -o file:expected41 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.gpg - atf_check -s eq:0 -o file:expected42 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.asc - atf_check -s eq:0 -o file:expected43 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.asc - atf_check -s eq:0 -o file:expected44 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.gpg - atf_check -s eq:0 -o file:expected45 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.asc + atf_check -s exit:0 -o file:expected36 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.gpg + atf_check -s exit:0 -o file:expected37 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.gpg + atf_check -s exit:0 -o file:expected38 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.asc + atf_check -s exit:0 -o file:expected39 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.asc + atf_check -s exit:0 -o file:expected40 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.gpg + atf_check -s exit:0 -o file:expected41 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.gpg + atf_check -s exit:0 -o file:expected42 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.asc + atf_check -s exit:0 -o file:expected43 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.asc + atf_check -s exit:0 -o file:expected44 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.gpg + atf_check -s exit:0 -o file:expected45 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.asc } # all test sets diff --git a/tests/usr.bin/sdiff/t_sdiff.sh b/tests/usr.bin/sdiff/t_sdiff.sh index 2d6fc2dcc882..3d70c4a38a75 100644 --- a/tests/usr.bin/sdiff/t_sdiff.sh +++ b/tests/usr.bin/sdiff/t_sdiff.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_sdiff.sh,v 1.1 2012/03/17 16:33:15 jruoho Exp $ +# $NetBSD: t_sdiff.sh,v 1.2 2024/04/28 07:27:43 rillig Exp $ # # Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -32,13 +32,13 @@ flags_head() } flags_body() { - atf_check -o file:$(atf_get_srcdir)/d_flags_l.out -s eq:1 \ + atf_check -o file:$(atf_get_srcdir)/d_flags_l.out -s exit:1 \ sdiff -l "$(atf_get_srcdir)/d_input1" "$(atf_get_srcdir)/d_input2" - atf_check -o file:$(atf_get_srcdir)/d_flags_s.out -s eq:1 \ + atf_check -o file:$(atf_get_srcdir)/d_flags_s.out -s exit:1 \ sdiff -s "$(atf_get_srcdir)/d_input1" "$(atf_get_srcdir)/d_input2" - atf_check -o file:$(atf_get_srcdir)/d_flags_w.out -s eq:1 \ + atf_check -o file:$(atf_get_srcdir)/d_flags_w.out -s exit:1 \ sdiff -w 125 "$(atf_get_srcdir)/d_input1" "$(atf_get_srcdir)/d_input2" } @@ -52,14 +52,14 @@ iflags_body() tail1="-w 125 -I .*filename.* $(atf_get_srcdir)/d_input1 $(atf_get_srcdir)/d_input2" tail2="-w 125 -I .*filename.* $(atf_get_srcdir)/d_input2 $(atf_get_srcdir)/d_input1" - atf_check -o file:$(atf_get_srcdir)/d_iflags_a1.out -s eq:1 sdiff ${tail1} - atf_check -o file:$(atf_get_srcdir)/d_iflags_a2.out -s eq:1 sdiff ${tail2} - atf_check -o file:$(atf_get_srcdir)/d_iflags_b1.out -s eq:1 sdiff -s ${tail1} - atf_check -o file:$(atf_get_srcdir)/d_iflags_b2.out -s eq:1 sdiff -s ${tail2} - atf_check -o file:$(atf_get_srcdir)/d_iflags_c1.out -s eq:1 sdiff -l ${tail1} - atf_check -o file:$(atf_get_srcdir)/d_iflags_c2.out -s eq:1 sdiff -l ${tail2} - atf_check -o file:$(atf_get_srcdir)/d_iflags_d1.out -s eq:1 sdiff -s ${tail1} - atf_check -o file:$(atf_get_srcdir)/d_iflags_d2.out -s eq:1 sdiff -s ${tail2} + atf_check -o file:$(atf_get_srcdir)/d_iflags_a1.out -s exit:1 sdiff ${tail1} + atf_check -o file:$(atf_get_srcdir)/d_iflags_a2.out -s exit:1 sdiff ${tail2} + atf_check -o file:$(atf_get_srcdir)/d_iflags_b1.out -s exit:1 sdiff -s ${tail1} + atf_check -o file:$(atf_get_srcdir)/d_iflags_b2.out -s exit:1 sdiff -s ${tail2} + atf_check -o file:$(atf_get_srcdir)/d_iflags_c1.out -s exit:1 sdiff -l ${tail1} + atf_check -o file:$(atf_get_srcdir)/d_iflags_c2.out -s exit:1 sdiff -l ${tail2} + atf_check -o file:$(atf_get_srcdir)/d_iflags_d1.out -s exit:1 sdiff -s ${tail1} + atf_check -o file:$(atf_get_srcdir)/d_iflags_d2.out -s exit:1 sdiff -s ${tail2} } atf_test_case tabs @@ -69,7 +69,7 @@ tabs_head() } tabs_body() { - atf_check -o file:$(atf_get_srcdir)/d_tabs.out -s eq:1 \ + atf_check -o file:$(atf_get_srcdir)/d_tabs.out -s exit:1 \ sdiff "$(atf_get_srcdir)/d_tabs1.in" "$(atf_get_srcdir)/d_tabs2.in" } @@ -80,13 +80,13 @@ tabends_head() } tabends_body() { - atf_check -o file:$(atf_get_srcdir)/d_tabends_a.out -s eq:1 \ + atf_check -o file:$(atf_get_srcdir)/d_tabends_a.out -s exit:1 \ sdiff -w30 "$(atf_get_srcdir)/d_tabends.in" /dev/null - atf_check -o file:$(atf_get_srcdir)/d_tabends_b.out -s eq:1 \ + atf_check -o file:$(atf_get_srcdir)/d_tabends_b.out -s exit:1 \ sdiff -w30 /dev/null "$(atf_get_srcdir)/d_tabends.in" - atf_check -o file:$(atf_get_srcdir)/d_tabends_c.out -s eq:1 \ + atf_check -o file:$(atf_get_srcdir)/d_tabends_c.out -s exit:1 \ sdiff -w19 "$(atf_get_srcdir)/d_tabends.in" /dev/null } @@ -142,10 +142,10 @@ oneline_head() } oneline_body() { - atf_check -o file:$(atf_get_srcdir)/d_oneline_a.out -s eq:1 \ + atf_check -o file:$(atf_get_srcdir)/d_oneline_a.out -s exit:1 \ sdiff /dev/null "$(atf_get_srcdir)/d_oneline.in" - atf_check -o file:$(atf_get_srcdir)/d_oneline_b.out -s eq:1 \ + atf_check -o file:$(atf_get_srcdir)/d_oneline_b.out -s exit:1 \ sdiff "$(atf_get_srcdir)/d_oneline.in" /dev/null } @@ -157,10 +157,10 @@ dot_head() dot_body() { echo ". <" > expout - atf_check -o file:expout -s eq:1 sdiff "$(atf_get_srcdir)/d_dot.in" /dev/null + atf_check -o file:expout -s exit:1 sdiff "$(atf_get_srcdir)/d_dot.in" /dev/null echo " > ." > expout - atf_check -o file:expout -s eq:1 sdiff /dev/null "$(atf_get_srcdir)/d_dot.in" + atf_check -o file:expout -s exit:1 sdiff /dev/null "$(atf_get_srcdir)/d_dot.in" } atf_test_case stdin @@ -171,11 +171,11 @@ stdin_head() stdin_body() { echo " > stdin" > expout - atf_check -o file:expout -s eq:1 -x \ + atf_check -o file:expout -s exit:1 -x \ "echo stdin | sdiff /dev/null /dev/stdin" echo "stdin <" > expout - atf_check -o file:expout -s eq:1 -x \ + atf_check -o file:expout -s exit:1 -x \ "echo stdin | sdiff /dev/stdin /dev/null" }