diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-30 20:13:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 20:13:26 -0400 |
commit | f96c281f53cff68ac0715dac5da0f53eefa95b8b (patch) | |
tree | 63487a84d615c1624fef85b5b29b285da5ee3fb9 | |
parent | 6adf3293a02b84ed1060f87a36b3033f4a5357f5 (diff) | |
parent | cc423216973f2fa4d5006cd6f41a4b4de54676c6 (diff) | |
download | podman-f96c281f53cff68ac0715dac5da0f53eefa95b8b.tar.gz podman-f96c281f53cff68ac0715dac5da0f53eefa95b8b.tar.bz2 podman-f96c281f53cff68ac0715dac5da0f53eefa95b8b.zip |
Merge pull request #11815 from edsantiago/bats
sdnotify test: accept MAINPID anywhere
-rw-r--r-- | test/system/260-sdnotify.bats | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/system/260-sdnotify.bats b/test/system/260-sdnotify.bats index 0dae569a8..395e6f94f 100644 --- a/test/system/260-sdnotify.bats +++ b/test/system/260-sdnotify.bats @@ -70,7 +70,7 @@ function _stop_socat() { # Check that MAINPID=xxxxx points to a running conmon process function _assert_mainpid_is_conmon() { - local mainpid=$(expr "$1" : "MAINPID=\([0-9]\+\)") + local mainpid=$(expr "$1" : ".*MAINPID=\([0-9]\+\)") test -n "$mainpid" || die "Could not parse '$1' as 'MAINPID=nnnn'" test -d /proc/$mainpid || die "sdnotify MAINPID=$mainpid - but /proc/$mainpid does not exist" @@ -121,7 +121,7 @@ function _assert_mainpid_is_conmon() { # we look for READY=1 _anywhere_ in the output, not just the last line. is "$output" ".*READY=1.*" "sdnotify sent READY=1" - _assert_mainpid_is_conmon "${lines[0]}" + _assert_mainpid_is_conmon "$output" # Done. Stop container, clean up. run_podman exec $cid touch /stop @@ -163,7 +163,7 @@ function _assert_mainpid_is_conmon() { is "$output" ".*READY=1" "received READY=1 through notify socket" - _assert_mainpid_is_conmon "${lines[0]}" + _assert_mainpid_is_conmon "$output" # Done. Stop container, clean up. run_podman exec $cid touch /stop |