mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
tests: Fix weird error on centos-9
centos-9 unit test sometimes fails with:
=== RUN TestPodSkipDevicesUpdate
systemd_test.go:114: container stderr not empty: basename: missing operand
Try 'basename --help' for more information.
--- FAIL: TestPodSkipDevicesUpdate (0.11s)
I'm not sure why the container output is an error in basename. It seems
likely that the bashrc in that distro is kind of broken. Let's just run
a sleep command and forget about bash.
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
(cherry picked from commit 4d0a60ca7f)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
committed by
Kir Kolyshkin
parent
abd6addeb2
commit
3ce9c1e24b
@@ -127,7 +127,7 @@ func TestPodSkipDevicesUpdate(t *testing.T) {
|
||||
|
||||
// Create a "container" within the "pod" cgroup.
|
||||
// This is not a real container, just a process in the cgroup.
|
||||
cmd := exec.Command("bash", "-c", "while true; do echo > /dev/null; done")
|
||||
cmd := exec.Command("sleep", "infinity")
|
||||
cmd.Env = append(os.Environ(), "LANG=C")
|
||||
var stderr bytes.Buffer
|
||||
cmd.Stderr = &stderr
|
||||
|
||||
Reference in New Issue
Block a user