ctdb: Introduce output before and after the 10-second timeout
authorVolker Lendecke <vl@samba.org>
Tue, 18 May 2021 06:28:16 +0000 (08:28 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 25 May 2021 08:09:12 +0000 (08:09 +0000)
This will lead to a crash in run_event_test.c soon

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14475
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit f320d1a7ab0f81eefdb28b36bfe346eacb8980de)

ctdb/tests/UNIT/cunit/run_event_001.sh

index 50051bfaab20689953380391e695eb3d5cfb7913..4df3b4bdad61bf21ff0b191184bc0f0813acca34 100755 (executable)
@@ -113,7 +113,9 @@ unit_test run_event_test "$scriptdir" run 10 monitor
 cat > "$scriptdir/22.bar.script" <<EOF
 #!/bin/sh
 
+echo before sleep
 sleep 10
+echo after sleep
 EOF
 
 # Timed out script
@@ -124,6 +126,7 @@ unit_test run_event_test "$scriptdir" enable 22.bar
 
 ok <<EOF
 11.foo: hello
+22.bar: before sleep
 Event monitor completed with result=-$(errcode ETIMEDOUT)
 11.foo result=0
 22.bar result=-$(errcode ETIMEDOUT)