summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-06-05 13:30:52 -0500
committerDavid Teigland <teigland@redhat.com>2015-06-23 17:08:53 -0500
commitf9265f9a15a169782bf03807065161d15ea9d64c (patch)
tree155c5e855b9fc2ead50abde9c7db7b6b07916e66
parente2e45d3fc703a110d7b5951e103b390e821b2b4c (diff)
downloadlvm2-f9265f9a15a169782bf03807065161d15ea9d64c.tar.gz
lvmlockd test suite update
These both now work: make check_lvmlockd_sanlock T=shell/sanlock-hello-world.sh make check_lvmlockd_dlm T=shell/dlm-hello-world.sh
-rw-r--r--test/lib/inittest.sh1
-rw-r--r--test/shell/dlm-prepare.sh8
-rw-r--r--test/shell/dlm-remove.sh7
-rw-r--r--test/shell/sanlock-hello-world.sh4
-rw-r--r--test/shell/sanlock-prepare.sh4
5 files changed, 9 insertions, 15 deletions
diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh
index 656deb22b..e509ae425 100644
--- a/test/lib/inittest.sh
+++ b/test/lib/inittest.sh
@@ -110,6 +110,7 @@ if test -n "$LVM_TEST_LVMLOCKD" ; then
if test -n "$LVM_TEST_LOCK_TYPE_SANLOCK" ; then
aux lvmconf 'local/host_id = 1'
fi
+#alias vgcreate='vgcreate --shared'
fi
echo "<======== Processing test: \"$TESTNAME\" ========>"
diff --git a/test/shell/dlm-prepare.sh b/test/shell/dlm-prepare.sh
index 825899ffe..c4f02a480 100644
--- a/test/shell/dlm-prepare.sh
+++ b/test/shell/dlm-prepare.sh
@@ -17,7 +17,7 @@ test_description='Set up things to run tests with dlm'
[ -z "$LVM_TEST_LOCK_TYPE_DLM" ] && skip;
COROSYNC_CONF="/etc/corosync/corosync.conf"
-COROSYNC_NODE=`hostname`
+COROSYNC_NODE="$(hostname)"
create_corosync_conf() {
if test -a $COROSYNC_CONF; then
if ! grep "created by lvm test suite" $COROSYNC_CONF; then
@@ -27,7 +27,7 @@ create_corosync_conf() {
fi
fi
- sed -e "s/@LOCAL_NODE@/$(COROSYNC_NODE)/" lib/test-corosync-conf > $COROSYNC_CONF
+ sed -e "s/@LOCAL_NODE@/$COROSYNC_NODE/" lib/test-corosync-conf > $COROSYNC_CONF
echo "created new $COROSYNC_CONF"
}
@@ -88,7 +88,3 @@ prepare_lvmlockd_dlm() {
prepare_lvmlockd_dlm
-# FIXME: make this work
-alias vgcreate="vgcreate --lock-type dlm"
-
-
diff --git a/test/shell/dlm-remove.sh b/test/shell/dlm-remove.sh
index 5151968ae..d7af46f67 100644
--- a/test/shell/dlm-remove.sh
+++ b/test/shell/dlm-remove.sh
@@ -15,7 +15,6 @@ test_description='Remove the dlm test setup'
[ -z "$LVM_TEST_LOCK_TYPE_DLM" ] && skip;
-# FIXME: reverse prepare_lvmlockd_dlm
-killall dlm_controld
-killall corosync
-
+systemctl stop dlm
+systemctl stop corosync
+killall lvmlockd
diff --git a/test/shell/sanlock-hello-world.sh b/test/shell/sanlock-hello-world.sh
index 1193f7d29..f9578ec0c 100644
--- a/test/shell/sanlock-hello-world.sh
+++ b/test/shell/sanlock-hello-world.sh
@@ -17,9 +17,11 @@ test_description='Hello world for vgcreate with sanlock'
aux prepare_pvs 1 1024
-vgcreate --lock-type sanlock --lock-opt wait $vg "$dev1"
+vgcreate --shared $vg "$dev1"
vgs -o+locktype,lockargs $vg
+check vg_field $vg vg_locktype sanlock
+
vgremove $vg
diff --git a/test/shell/sanlock-prepare.sh b/test/shell/sanlock-prepare.sh
index 4ef88f030..7cd91ea4e 100644
--- a/test/shell/sanlock-prepare.sh
+++ b/test/shell/sanlock-prepare.sh
@@ -83,7 +83,3 @@ vgcreate --config 'devices { global_filter=["a|GL_DEV|", "r|.*|"] filter=["a|GL_
vgs --config 'devices { global_filter=["a|GL_DEV|", "r|.*|"] filter=["a|GL_DEV|", "r|.*|"]}' -o+locktype,lockargs glvg
-# FIXME: make this work
-alias vgcreate="vgcreate --lock-type sanlock"
-
-