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:15:48 -0600 |
commit | 7c4c5d62b6400c3a30294cfa2d5f7b8fa1d37aec (patch) | |
tree | 30f7e95523ba5056ef7e66d5862a40a9f65a52b0 /docs | |
parent | 71e2394fdbc511f15a6e698d95979bd2ef9cb6f5 (diff) | |
download | mock-7c4c5d62b6400c3a30294cfa2d5f7b8fa1d37aec.tar.gz mock-7c4c5d62b6400c3a30294cfa2d5f7b8fa1d37aec.tar.xz mock-7c4c5d62b6400c3a30294cfa2d5f7b8fa1d37aec.zip |
fixup explicit orphankill unit test.
Diffstat (limited to 'docs')
-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 29a0fa8..0d2caa5 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." |