diff options
author | Gerrit Pape <pape@smarden.org> | 2004-03-08 12:37:10 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2004-03-08 12:37:10 +0000 |
commit | de9ec7ad46f26d2f4eb06f23223ccecec40d7b9c (patch) | |
tree | f9c37620237729fc074832f76fb49f793c5cbffd /src/runsv.check | |
parent | 0843f9bd30895d35e16028fbd1bdeae08492d1ae (diff) | |
download | runit-de9ec7ad46f26d2f4eb06f23223ccecec40d7b9c.tar.gz runit-de9ec7ad46f26d2f4eb06f23223ccecec40d7b9c.tar.xz runit-de9ec7ad46f26d2f4eb06f23223ccecec40d7b9c.zip |
* check-diff, check-dist, check-local, package/check: new; run checks on
programs. * package/install: run package/check. * chpst.check, runit-init.check, runit.check, runsv.check, runsvchdir.check, runsvctrl.check, runsvdir.check, runsvstat.check, svlogd.check, svwaitdown.check, svwaitup.check, utmpset.check: new; check program. * chpst.dist, runit-init.dist, runit.dist, runsv.dist, runsvchdir.dist, runsvctrl.dist, runsvdir.dist, runsvstat.dist, svlogd.dist, svwaitdown.dist, svwaitup.dist, utmpset.dist: new; dist check program output. 1.0.1
Diffstat (limited to 'src/runsv.check')
-rwxr-xr-x | src/runsv.check | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/runsv.check b/src/runsv.check new file mode 100755 index 0000000..40fc7b2 --- /dev/null +++ b/src/runsv.check @@ -0,0 +1,45 @@ +#!/bin/sh +rm -rf "${ctmp}" + +runsv +echo $? + +mkdir "${ctmp}" +echo '#!/bin/sh' >"${ctmp}"/run +echo 'echo starting' >>"${ctmp}"/run +echo 'exec sleep 14' >>"${ctmp}"/run +chmod 700 "${ctmp}"/run +runsv "${ctmp}" & +sleep 1 +test -r "${ctmp}"/supervise/stat || sleep 2 +cat "${ctmp}"/supervise/stat +echo x >"${ctmp}"/supervise/control +wait +echo $? + +mkdir "${ctmp}"/log +echo '#!/bin/sh' >"${ctmp}"/log/run +echo 'exec cat >foo' >>"${ctmp}"/log/run +chmod 700 "${ctmp}"/log/run +runsv "${ctmp}" & +sleep 1 +test -r "${ctmp}"/log/supervise/stat || sleep 2 +echo x >"${ctmp}"/supervise/control +wait +echo $? +cat "${ctmp}"/log/foo + +rm -rf "${ctmp}"/supervise +rm -rf "${ctmp}"/log/supervise +rm -f "${ctmp}"/log/foo +ln -s foo "${ctmp}"/supervise +ln -s bar "${ctmp}"/log/supervise +runsv "${ctmp}" & +sleep 1 +test -r "${ctmp}"/supervise/stat || sleep 2 +test -r "${ctmp}"/log/supervise/stat || sleep 2 +echo x >"${ctmp}"/foo/control +wait +echo $? +cat "${ctmp}"/log/foo +rm -rf "${ctmp}" |