ctdb-common: Add async version of startup in sock_daemon
[vlendec/samba-autobuild/.git] / ctdb / tests / cunit / sock_daemon_test_001.sh
index 036b6ac6f26f25cf935198de97d36ab4a28bd031..aa1d6b471db49e6dc81fdae297568fc2b690105f 100755 (executable)
@@ -23,23 +23,33 @@ result_filter ()
 
 
 ok <<EOF
+test1[PID]: daemon started, pid=PID
+test1[PID]: startup failed, ret=1
+test1[PID]: daemon started, pid=PID
+test1[PID]: startup failed, ret=2
+test1[PID]: daemon started, pid=PID
+test1[PID]: startup completed successfully
 test1[PID]: listening on $sockpath
+test1[PID]: Shutting down
 EOF
 unit_test sock_daemon_test "$pidfile" "$sockpath" 1
 
 ok <<EOF
-test2[PID]: listening on $sockpath
 test2[PID]: daemon started, pid=PID
+test2[PID]: startup completed successfully
+test2[PID]: listening on $sockpath
 test2[PID]: Received signal 1
+test2[PID]: reconfigure failed, ret=1
 test2[PID]: Received signal 10
+test2[PID]: reconfigure completed successfully
 test2[PID]: Received signal 15
 test2[PID]: Shutting down
 EOF
 unit_test sock_daemon_test "$pidfile" "$sockpath" 2
 
 ok <<EOF
-test3[PID]: listening on $sockpath
 test3[PID]: daemon started, pid=PID
+test3[PID]: listening on $sockpath
 test3[PID]: PID PID gone away, exiting
 test3[PID]: Shutting down
 EOF
@@ -47,19 +57,63 @@ unit_test sock_daemon_test "$pidfile" "$sockpath" 3
 
 ok <<EOF
 test4[PID]: daemon started, pid=PID
+test4[PID]: Shutting down
 EOF
 unit_test sock_daemon_test "$pidfile" "$sockpath" 4
 
 ok <<EOF
-test5[PID]: listening on $sockpath
 test5[PID]: daemon started, pid=PID
+test5[PID]: listening on $sockpath
 test5[PID]: Received signal 15
 test5[PID]: Shutting down
 EOF
 unit_test sock_daemon_test "$pidfile" "$sockpath" 5
 
 ok <<EOF
-test6[PID]: listening on $sockpath
 test6[PID]: daemon started, pid=PID
+test6[PID]: listening on $sockpath
+test6[PID]: Shutting down
 EOF
 unit_test sock_daemon_test "$pidfile" "$sockpath" 6
+
+ok <<EOF
+test7[PID]: daemon started, pid=PID
+test7[PID]: startup completed successfully
+test7[PID]: Received signal 15
+test7[PID]: Shutting down
+EOF
+unit_test sock_daemon_test "$pidfile" "$sockpath" 7
+
+ok <<EOF
+test8[PID]: daemon started, pid=PID
+test8[PID]: startup completed successfully
+test8[PID]: Received signal 15
+test8[PID]: Shutting down
+test8[PID]: daemon started, pid=PID
+test8[PID]: startup completed successfully
+test8[PID]: Received signal 15
+test8[PID]: Shutting down
+EOF
+unit_test sock_daemon_test "$pidfile" "$sockpath" 8
+
+ok <<EOF
+test9[PID]: daemon started, pid=PID
+test9[PID]: startup completed successfully
+test9[PID]: Received signal 15
+test9[PID]: Shutting down
+test9[PID]: daemon started, pid=PID
+test9[PID]: startup completed successfully
+test9[PID]: Received signal 15
+test9[PID]: Shutting down
+EOF
+unit_test sock_daemon_test "$pidfile" "$sockpath" 9
+
+ok <<EOF
+test10[PID]: daemon started, pid=PID
+test10[PID]: listening on $sockpath
+test10[PID]: daemon started, pid=PID
+test10[PID]: listening on $sockpath
+test10[PID]: Received signal 15
+test10[PID]: Shutting down
+EOF
+unit_test sock_daemon_test "$pidfile" "$sockpath" 10