diff options
author | Michael E Brown <michael_e_brown@dell.com> | 2007-12-10 14:15:48 -0600 |
---|---|---|
committer | Michael E Brown <michael_e_brown@dell.com> | 2007-12-10 14:13:37 -0600 |
commit | d91271d37a6155fd45f82f2d4c7289acbef0674b (patch) | |
tree | 1f7a11dbbe0e5320eb4c07d2e8e78f2778d3a989 | |
parent | 14ec47a8cd431e65d0ccab1be35cbf9e156190eb (diff) | |
download | mock-d91271d37a6155fd45f82f2d4c7289acbef0674b.tar.gz mock-d91271d37a6155fd45f82f2d4c7289acbef0674b.tar.xz mock-d91271d37a6155fd45f82f2d4c7289acbef0674b.zip |
fixup explicit orphankill unit test.
-rwxr-xr-x | docs/releasetests.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/releasetests.sh b/docs/releasetests.sh index d18d2af..78240d8 100755 --- a/docs/releasetests.sh +++ b/docs/releasetests.sh @@ -82,8 +82,16 @@ fi time $MOCKCMD --offline --init cp docs/daemontest $CHROOT/tmp echo -e "#!/bin/sh\n/tmp/daemontest\nsleep 60\n" >> $CHROOT/tmp/try -$MOCKCMD --offline --chroot -- /tmp/try & -kill -9 $! +# the following should launch about three processes in the chroot: bash, sleep, daemontest +$MOCKCMD --offline --chroot -- bash /tmp/try & +mockpid=$! +sleep 1 +# now we 'prematurely' kill mock. This should leave the three orphans above +sudo kill -9 $mockpid +if ! pgrep daemontest; then + echo "Daemontest failed. daemontest should be running now but is not." + exit 1 +fi $MOCKCMD --offline --orphanskill if pgrep daemontest; then echo "Daemontest FAILED. found a daemontest process running after exit." |