From 7d420d8c1d95e922b721d000a7fbf50e23b4812b Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 10 Aug 2022 18:04:33 -0700 Subject: [PATCH] Int test for #3551 v2: use daemon-reexec v3: require root to reload systemd v4: use exec -t Signed-off-by: Kir Kolyshkin --- tests/integration/dev.bats | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/integration/dev.bats b/tests/integration/dev.bats index 01f67785980..585b20750c4 100644 --- a/tests/integration/dev.bats +++ b/tests/integration/dev.bats @@ -128,3 +128,19 @@ function teardown() { runc exec test_allow_block sh -c 'fdisk -l '"$device"'' [ "$status" -eq 0 ] } + +# https://github.com/opencontainers/runc/issues/3551 +@test "runc exec vs systemctl daemon-reload" { + requires systemd root + + runc run -d --console-socket "$CONSOLE_SOCKET" test_exec + [ "$status" -eq 0 ] + + runc exec -t test_exec sh -c "ls -l /proc/self/fd/0; echo 123" + [ "$status" -eq 0 ] + + systemctl daemon-reload + + runc exec test_exec -t sh -c "ls -l /proc/self/fd/0; echo 123" + [ "$status" -eq 0 ] +}