1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00

tests: create/remove improvements for lvmlockd testing

This commit is contained in:
David Teigland 2015-08-20 16:10:36 -05:00
parent d310e1f907
commit 1f27c9f6a4
3 changed files with 18 additions and 2 deletions

View File

@ -15,6 +15,10 @@ test_description='Remove the dlm test setup'
[ -z "$LVM_TEST_LOCK_TYPE_DLM" ] && skip;
# FIXME: collect debug logs (only if a test failed?)
# lvmlockctl -d > lvmlockd-debug.txt
# dlm_tool dump > dlm-debug.txt
systemctl stop dlm
systemctl stop corosync
killall lvmlockd

View File

@ -73,6 +73,7 @@ prepare_lvmlockd_sanlock() {
GL_DEV="/dev/mapper/GL_DEV"
GL_FILE="$PWD/gl_file.img"
dmsetup remove GL_DEV || true
rm -f "$GL_FILE"
dd if=/dev/zero of="$GL_FILE" bs=$((1024*1024)) count=1024 2> /dev/null
GL_LOOP=$(losetup -f "$GL_FILE" --show)

View File

@ -15,14 +15,25 @@ test_description='Remove the sanlock test setup'
[ -z "$LVM_TEST_LOCK_TYPE_SANLOCK" ] && skip;
# FIMXME: get this to run after a test fails
# Removes the VG with the global lock that was created by
# the corresponding create script.
vgremove --config 'devices { global_filter=["a|GL_DEV|", "r|.*|"] filter=["a|GL_DEV|", "r|.*|"]}' glvg
# FIXME: collect debug logs (only if a test failed?)
# lvmlockctl -d > lvmlockd-debug.txt
# sanlock log_dump > sanlock-debug.txt
killall lvmlockd
killall sanlock
dmsetup remove GL_DEV
# dmsetup remove glvg-lvmlock
killall -9 lvmlockd
killall -9 sanlock
# FIXME: dmsetup remove LVMTEST*-lvmlock
dmsetup remove glvg-lvmlock || true
dmsetup remove GL_DEV || true