@@ -70,6 +70,8 @@ func TestRunWithSystemdTrueEnabled(t *testing.T) {
7070 testCase .Require = require .All (
7171 require .Amd64 ,
7272 require .Not (nerdtest .Docker ),
73+ // // runc exec can permanently fail with "exec: already started" (https://github.com/opencontainers/runc/issues/4437)
74+ // nerdtest.IsFlaky("https://github.com/opencontainers/runc/issues/4437"),
7375 )
7476
7577 testCase .Setup = func (data test.Data , helpers test.Helpers ) {
@@ -89,18 +91,11 @@ func TestRunWithSystemdTrueEnabled(t *testing.T) {
8991 Output : expect .Contains ("SIGRTMIN+3" ),
9092 })
9193
92- // waits for systemd to become ready and lists systemd jobs
93- return helpers .Command ("exec" , data .Identifier (), "sh" , "-c" , "--" , `tries=0
94- until systemctl is-system-running >/dev/null 2>&1; do
95- >&2 printf "Waiting for systemd to come up...\n"
96- sleep 1s
97- tries=$(( tries + 1))
98- [ $tries -lt 10 ] || {
99- >&2 printf "systemd failed to come up in a reasonable amount of time\n"
100- exit 1
101- }
102- done
103- systemctl list-jobs` )
94+ helpers .Command ("exec" , data .Identifier (), "sh" , "-c" , "--" , "ps" ).Run (& test.Expected {
95+ ExitCode : expect .ExitCodeSuccess ,
96+ })
97+
98+ return helpers .Command ("exec" , data .Identifier (), "sh" , "-c" , "--" , "systemctl list-jobs" )
10499 }
105100
106101 testCase .Expected = test .Expects (expect .ExitCodeSuccess , nil , expect .Contains ("jobs" ))
0 commit comments