Skip to content

Commit

Permalink
Fxi tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Mar 1, 2023
1 parent b14da2a commit 72e7f3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/frontend/lua.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ EOF
}

script_execute_body() {
atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
atf_check -s exit:1 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
cat << EOF >> test.ucl
lua_scripts: {
post-install: [ <<EOS
Expand All @@ -216,12 +216,12 @@ pkg: lua script failed\n"
atf_check \
-o empty \
-e empty \
-s exit:0 \
-s exit:1 \
pkg create -M test.ucl
mkdir -p ${TMPDIR}/target
atf_check \
-e inline:"${ERR}" \
-s exit:0 \
-s exit:1 \
pkg -o REPOS_DIR=/dev/null -r ${TMPDIR}/target install -qfy ${TMPDIR}/test-1.pkg
}

Expand Down
4 changes: 2 additions & 2 deletions tests/lib/lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 72e7f3b

Please sign in to comment.