summaryrefslogtreecommitdiff
path: root/test/system/helpers.bash
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2019-08-01 19:38:56 -0600
committerEd Santiago <santiago@redhat.com>2019-08-01 20:19:54 -0600
commit6eee9ab080ead50587f5a4272353a9b21cfd55b3 (patch)
tree99727574b945d0a8e9bacdd78866035f10036b6f /test/system/helpers.bash
parente48dc506d18335b36d1ffbbc8df1890ee3b99e2c (diff)
downloadpodman-6eee9ab080ead50587f5a4272353a9b21cfd55b3.tar.gz
podman-6eee9ab080ead50587f5a4272353a9b21cfd55b3.tar.bz2
podman-6eee9ab080ead50587f5a4272353a9b21cfd55b3.zip
System tests: resolve hang in rawhide rootless
Fedora CI tests are failing on rawhide under kernel 5.3.0-0.rc1.git3.1.fc31 (rhbz#1736758). But there's another insidious failure, a 4-hour hang in the rootless tests on the same CI system. The culprit line is in the podman build test, but it's actually BATS itself that hangs, not the build command -- which suggests that it's the usual FD 3 problem (see BATS README). It would seem that podman is forking a process that inherits fd 3 but that process is not getting cleaned up when podman crashes upon encountering the kernel bug. Today it's podman build, tomorrow it might be something else. Let's just run all podman invocations in run_podman with a non-bats FD 3. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r--test/system/helpers.bash4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 1db80f111..fe0a25b37 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -133,7 +133,9 @@ function run_podman() {
# stdout is only emitted upon error; this echo is to help a debugger
echo "\$ $PODMAN $*"
- run timeout --foreground -v --kill=10 $PODMAN_TIMEOUT $PODMAN "$@"
+ # BATS hangs if a subprocess remains and keeps FD 3 open; this happens
+ # if podman crashes unexpectedly without cleaning up subprocesses.
+ run timeout --foreground -v --kill=10 $PODMAN_TIMEOUT $PODMAN "$@" 3>/dev/null
# without "quotes", multiple lines are glommed together into one
if [ -n "$output" ]; then
echo "$output"