diff --git a/tests/frontend/install.sh b/tests/frontend/install.sh index 8a9034a561..7620d93c42 100644 --- a/tests/frontend/install.sh +++ b/tests/frontend/install.sh @@ -6,7 +6,7 @@ tests_init \ metalog \ reinstall \ pre_script_fail \ - post_script_ignored \ + post_script_fail \ install_missing_dep test_setup() @@ -150,7 +150,7 @@ EOF pkg -o REPOS_DIR="/dev/null" install -y ${TMPDIR}/test-1.pkg } -post_script_ignored_body() +post_script_fail_body() { atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg test test 1 cat << EOF >> test.ucl @@ -167,7 +167,7 @@ EOF atf_check -o ignore \ -e inline:"${PROGNAME}: POST-INSTALL script failed\n" \ - -s exit:0 \ + -s exit:r \ pkg -o REPOS_DIR="/dev/null" install -y ${TMPDIR}/test-1.pkg } diff --git a/tests/frontend/lua.sh b/tests/frontend/lua.sh index fdf49958b8..4946f81470 100644 --- a/tests/frontend/lua.sh +++ b/tests/frontend/lua.sh @@ -221,7 +221,7 @@ pkg: lua script failed\n" mkdir -p ${TMPDIR}/target atf_check \ -e inline:"${ERR}" \ - -s exit:0 \ + -s exit:3 \ pkg -o REPOS_DIR=/dev/null -r ${TMPDIR}/target install -qfy ${TMPDIR}/test-1.pkg } diff --git a/tests/lib/lua.c b/tests/lib/lua.c index c48d18c519..7c475c3722 100644 --- a/tests/lib/lua.c +++ b/tests/lib/lua.c @@ -301,7 +301,7 @@ ATF_TC_BODY(override, tc) } exit(lua_tonumber(L, -1)); } - atf_utils_wait(p, 0, "[string \"os.execute(\"/usr/bin/true\")\"]:1: os.execute not available\n", ""); + atf_utils_wait(p, 1, "[string \"os.execute(\"/usr/bin/true\")\"]:1: os.execute not available\n", ""); p = atf_utils_fork(); if (p == 0) { @@ -310,7 +310,7 @@ ATF_TC_BODY(override, tc) } exit(lua_tonumber(L, -1)); } - atf_utils_wait(p, 0, "[string \"os.exit(1)\"]:1: os.exit not available\n", ""); + atf_utils_wait(p, 1, "[string \"os.exit(1)\"]:1: os.exit not available\n", ""); int rootfd = open(getcwd(NULL, 0), O_DIRECTORY); lua_pushinteger(L, rootfd); @@ -342,7 +342,7 @@ ATF_TC_BODY(override, tc) } exit(lua_tonumber(L, -1)); } - atf_utils_wait(p, 0, "[string \"os.remove(\"/bob\")...\"]:2: /bob: No such file or directory\n", ""); + atf_utils_wait(p, 1, "[string \"os.remove(\"/bob\")...\"]:2: /bob: No such file or directory\n", ""); } ATF_TC_BODY(fileops, tc)