mirror of
https://github.com/troglobit/finit.git
synced 2026-10-12 10:12:32 +00:00
test: clean up properly between tests phases in notify.sh
To reset the crash counter of the 'serv' daemon we need to remove it from /etc/finit.conf (and reload) between each test phase. The repeated test phases can now be dropped, since the lack of reset was the root cause for it failing sometimes in extended runs. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+4
-12
@@ -73,6 +73,10 @@ test_one()
|
||||
assert_status "serv" "stopped"
|
||||
assert_nocond "service/serv/ready"
|
||||
|
||||
say "Cleaning up after test."
|
||||
texec sh -c "rm $FINIT_CONF"
|
||||
texec sh -c "initctl reload"
|
||||
|
||||
# sleep 2
|
||||
# num=$(texec sh -c "find /proc/1/fd |wc -l")
|
||||
# say "finit: number of open file descriptors after test: $num"
|
||||
@@ -88,16 +92,4 @@ test_one "native" "service log:stdout serv -np -- pid file
|
||||
test_one "s6" "service log:stdout notify:s6 serv -n -N %n -- s6 readiness"
|
||||
test_one "systemd" "service log:stdout notify:systemd serv -n -- systemd readiness"
|
||||
|
||||
test_one "native" "service log:stdout serv -np -- pid file readiness"
|
||||
test_one "s6" "service log:stdout notify:s6 serv -n -N %n -- s6 readiness"
|
||||
test_one "systemd" "service log:stdout notify:systemd serv -n -- systemd readiness"
|
||||
|
||||
test_one "native" "service log:stdout serv -np -- pid file readiness"
|
||||
test_one "s6" "service log:stdout notify:s6 serv -n -N %n -- s6 readiness"
|
||||
test_one "systemd" "service log:stdout notify:systemd serv -n -- systemd readiness"
|
||||
|
||||
test_one "native" "service log:stdout serv -np -- pid file readiness"
|
||||
test_one "s6" "service log:stdout notify:s6 serv -n -N %n -- s6 readiness"
|
||||
test_one "systemd" "service log:stdout notify:systemd serv -n -- systemd readiness"
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user