summaryrefslogtreecommitdiff
path: root/test/system/130-kill.bats
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2020-01-29 11:08:43 -0500
committerChris Evich <cevich@redhat.com>2020-02-25 12:34:26 -0500
commit9f69c4ecafca52e986fe7469d9087131a082a432 (patch)
tree820bb70f06fa888290902a725fd6649778486c6f /test/system/130-kill.bats
parent9b9789c207d8b84ee37e9c37c613879369a8690c (diff)
downloadpodman-9f69c4ecafca52e986fe7469d9087131a082a432.tar.gz
podman-9f69c4ecafca52e986fe7469d9087131a082a432.tar.bz2
podman-9f69c4ecafca52e986fe7469d9087131a082a432.zip
System Tests: Force default signal handlers
Recommended as part of: https://github.com/containers/libpod/issues/5004 and https://github.com/containers/crun/issues/230 Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'test/system/130-kill.bats')
-rw-r--r--test/system/130-kill.bats9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/system/130-kill.bats b/test/system/130-kill.bats
index 5e098d754..e6a77222a 100644
--- a/test/system/130-kill.bats
+++ b/test/system/130-kill.bats
@@ -8,7 +8,14 @@ load helpers
@test "podman kill - test signal handling in containers" {
# Start a container that will handle all signals by emitting 'got: N'
local -a signals=(1 2 3 4 5 6 8 10 12 13 14 15 16 20 21 22 23 24 25 26 64)
- run_podman run -d $IMAGE sh -c "for i in ${signals[*]}; do trap \"echo got: \$i\" \$i; done; echo READY; while ! test -e /stop; do sleep 0.05; done;echo DONE"
+ # The --default-signal option not available in busybox implementation of 'env' in $IMAGE
+ # needed here to ensure handling of SIGINT inside container uses the default handler
+ _IMAGE=quay.io/libpod/fedora-minimal:latest
+ run_podman run -d $_IMAGE env --default-signal sh -c \
+ "for i in ${signals[*]}; do trap \"echo got: \$i\" \$i; done;
+ echo READY;
+ while ! test -e /stop; do sleep 0.05; done;
+ echo DONE"
cid="$output"
# Run 'logs -f' on that container, but run it in the background with