mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
tests: create/remove improvements for lvmlockd testing
This commit is contained in:
parent
d310e1f907
commit
1f27c9f6a4
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user