Skip to content

Commit 6e5479f

Browse files
committed
Fix tests
1 parent b14da2a commit 6e5479f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/frontend/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tests_init \
66
metalog \
77
reinstall \
88
pre_script_fail \
9-
post_script_ignored \
9+
post_script_fail \
1010
install_missing_dep
1111

1212
test_setup()
@@ -150,7 +150,7 @@ EOF
150150
pkg -o REPOS_DIR="/dev/null" install -y ${TMPDIR}/test-1.pkg
151151
}
152152

153-
post_script_ignored_body()
153+
post_script_fail_body()
154154
{
155155
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg test test 1
156156
cat << EOF >> test.ucl
@@ -167,7 +167,7 @@ EOF
167167

168168
atf_check -o ignore \
169169
-e inline:"${PROGNAME}: POST-INSTALL script failed\n" \
170-
-s exit:0 \
170+
-s exit:r \
171171
pkg -o REPOS_DIR="/dev/null" install -y ${TMPDIR}/test-1.pkg
172172
}
173173

tests/frontend/lua.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ pkg: lua script failed\n"
221221
mkdir -p ${TMPDIR}/target
222222
atf_check \
223223
-e inline:"${ERR}" \
224-
-s exit:0 \
224+
-s exit:3 \
225225
pkg -o REPOS_DIR=/dev/null -r ${TMPDIR}/target install -qfy ${TMPDIR}/test-1.pkg
226226
}
227227

tests/lib/lua.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ ATF_TC_BODY(override, tc)
301301
}
302302
exit(lua_tonumber(L, -1));
303303
}
304-
atf_utils_wait(p, 0, "[string \"os.execute(\"/usr/bin/true\")\"]:1: os.execute not available\n", "");
304+
atf_utils_wait(p, 1, "[string \"os.execute(\"/usr/bin/true\")\"]:1: os.execute not available\n", "");
305305

306306
p = atf_utils_fork();
307307
if (p == 0) {
@@ -310,7 +310,7 @@ ATF_TC_BODY(override, tc)
310310
}
311311
exit(lua_tonumber(L, -1));
312312
}
313-
atf_utils_wait(p, 0, "[string \"os.exit(1)\"]:1: os.exit not available\n", "");
313+
atf_utils_wait(p, 1, "[string \"os.exit(1)\"]:1: os.exit not available\n", "");
314314

315315
int rootfd = open(getcwd(NULL, 0), O_DIRECTORY);
316316
lua_pushinteger(L, rootfd);
@@ -342,7 +342,7 @@ ATF_TC_BODY(override, tc)
342342
}
343343
exit(lua_tonumber(L, -1));
344344
}
345-
atf_utils_wait(p, 0, "[string \"os.remove(\"/bob\")...\"]:2: /bob: No such file or directory\n", "");
345+
atf_utils_wait(p, 1, "[string \"os.remove(\"/bob\")...\"]:2: /bob: No such file or directory\n", "");
346346
}
347347

348348
ATF_TC_BODY(fileops, tc)

0 commit comments

Comments
 (0)