1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00
samba-mirror/ctdb/tests/eventd/eventd_021.sh
Amitay Isaacs ca0894e932 ctdb-tests: Add tests for event daemon
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-12-18 14:23:23 +01:00

41 lines
610 B
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
define_test "debug script"
cat > "$eventd_scriptdir/01.test" <<EOF
#!/bin/sh
sleep 99
EOF
chmod +x "$eventd_scriptdir/01.test"
cat > "$eventd_scriptdir/debug.sh" <<EOF
#!/bin/sh
echo "args: \$*" > "$eventd_debug"
EOF
chmod +x "$eventd_scriptdir/debug.sh"
setup_eventd "$eventd_scriptdir/debug.sh"
result_filter ()
{
_pid="[0-9][0-9]*"
sed -e "s| ${_pid}| PID|"
}
required_result 62 <<EOF
Event startup timed out
EOF
simple_test run startup 5
# wait for debug hung script
sleep 5
required_result 0 <<EOF
args: PID startup
EOF
unit_test cat "$eventd_debug"