1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

ctdb-tests: Factor out new local daemons functions ps_ctdbd

Useful for being able to ensure that tests are doing what is expected.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2016-09-13 13:44:04 +10:00 committed by Martin Schwenke
parent 7ec7d4f3c0
commit 3adf9cad47
2 changed files with 11 additions and 6 deletions

View File

@ -35,11 +35,6 @@ CTDB_EVENT_SCRIPT_DIR="$empty_dir" daemons_start
wait_until_ready
# If this fails to find processes then the tests fails, so look at
# full command-line so this will work with valgrind. Note that the
# output could be generated with pgrep's -a option but it doesn't
# exist in older versions.
ps -p $(pgrep -f '\<ctdbd\>' | xargs | sed -e 's| |,|g') -o args ww
ps_ctdbd
echo
echo "Good, that seems to work!"

View File

@ -173,3 +173,13 @@ _restart_ctdb_all ()
daemons_stop
daemons_start
}
ps_ctdbd ()
{
# If this fails to find processes then the tests fails, so
# look at full command-line so this will work with valgrind.
# Note that the output could be generated with pgrep's -a
# option but it doesn't exist in older versions.
ps -p $(pgrep -f '\<ctdbd\>' | xargs | sed -e 's| |,|g') -o args ww
echo
}