Verified Commit e76609d1 authored by Karel Koci's avatar Karel Koci 🤘

Test what happens if postinst hangs

We should timeout and report script run as failure.
parent c33f9154
......@@ -829,6 +829,13 @@ PKG_ROOT=
result, stderr = B.script_run("xyz", "postrm", "remove")
assert_equal("test\n", stderr)
-- This one hangs and should timeout, we set shorter timeout just to make test faster
local old_cmd_timeout = B.cmd_timeout
B.cmd_timeout = 1000
result, stderr = B.script_run("hang", "postinst", "install")
assert_equal("", stderr)
B.cmd_timeout = old_cmd_timeout
function test_root_dir_set()
# Lets sleep for very long time
sleep 3600
echo We don\'t want to see this >&2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment