1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-09 09:57:48 +03:00
samba-mirror/ctdb/tests/tool/ctdb.process-exists.001.sh
Martin Schwenke 032c9f10ac ctdb-tests: Add "ctdb process-exists" tool test
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:45 +02:00

23 lines
475 B
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
define_test "ctdbd process on node 0"
setup_ctdbd <<EOF
NODEMAP
0 192.168.20.41 0x0 CURRENT RECMASTER
1 192.168.20.42 0x0
2 192.168.20.43 0x0
EOF
pid=$(ctdbd_getpid)
ok "PID $pid exists"
simple_test "$pid"
# Use a PID that is probably impossible. It must fit into 32 bits but
# should be larger than most settings for pid_max.
required_result 1 "PID 99999999 does not exist"
simple_test "99999999"