diff --git a/test/TEST-02-CRYPTSETUP/test.sh b/test/TEST-02-CRYPTSETUP/test.sh index 2dd2cce6e5c..16fda42754a 100755 --- a/test/TEST-02-CRYPTSETUP/test.sh +++ b/test/TEST-02-CRYPTSETUP/test.sh @@ -84,7 +84,7 @@ cleanup_root_var() { test_cleanup() { # ignore errors, so cleanup can continue - cleanup_root_var || true + cleanup_root_var || : _test_cleanup } diff --git a/test/test-functions b/test/test-functions index a970a5d6dc6..37bdfd58dce 100644 --- a/test/test-functions +++ b/test/test-functions @@ -4,9 +4,9 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin export PATH -LOOKS_LIKE_DEBIAN=$(source /etc/os-release && [[ "$ID" = "debian" || " $ID_LIKE " = *" debian "* ]] && echo yes || true) -LOOKS_LIKE_ARCH=$(source /etc/os-release && [[ "$ID" = "arch" || " $ID_LIKE " = *" arch "* ]] && echo yes || true) -LOOKS_LIKE_SUSE=$(source /etc/os-release && [[ " $ID_LIKE " = *" suse "* ]] && echo yes || true) +LOOKS_LIKE_DEBIAN=$(source /etc/os-release && [[ "$ID" = "debian" || " $ID_LIKE " = *" debian "* ]] && echo yes || :) +LOOKS_LIKE_ARCH=$(source /etc/os-release && [[ "$ID" = "arch" || " $ID_LIKE " = *" arch "* ]] && echo yes || :) +LOOKS_LIKE_SUSE=$(source /etc/os-release && [[ " $ID_LIKE " = *" suse "* ]] && echo yes || :) KERNEL_VER=${KERNEL_VER-$(uname -r)} KERNEL_MODS="/lib/modules/$KERNEL_VER/" QEMU_TIMEOUT="${QEMU_TIMEOUT:-infinity}" @@ -577,7 +577,7 @@ check_asan_reports() { journald_report=$(find "$root" -name "systemd-journald.*san.log*" -exec cat {} \;) if [[ ! -z "$journald_report" ]]; then printf "%s\n" "$journald_report" - cat "$root/systemd-journald.out" || true + cat "$root/systemd-journald.out" || : ret=$(($ret+1)) fi @@ -701,15 +701,15 @@ install_ld_so_conf() { } install_config_files() { - inst /etc/sysconfig/init || true + inst /etc/sysconfig/init || : inst /etc/passwd inst /etc/shadow inst /etc/login.defs inst /etc/group inst /etc/shells inst /etc/nsswitch.conf - inst /etc/pam.conf || true - inst /etc/securetty || true + inst /etc/pam.conf || : + inst /etc/securetty || : inst /etc/os-release inst /etc/localtime # we want an empty environment @@ -1692,7 +1692,7 @@ _test_cleanup() { fi rm -fr "$TESTDIR" rm -f "$STATEFILE" - ) || true + ) || : } # can be overridden in specific test