master - tests: skip part of test
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6d2609a232498802779...
Commit: 6d2609a2324988027795a757c1b387dd2ec3214b
Parent: 0747a6d0de8ccbf1586d392de29f4ab3b0fa7dbc
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Nov 18 22:01:27 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Nov 18 22:03:50 2018 +0100
tests: skip part of test
On kernel 4.8 this test piece oopses machine (fc23).
---
test/shell/lvconvert-raid.sh | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvconvert-raid.sh b/test/shell/lvconvert-raid.sh
index 3b7af97..6aaaf36 100644
--- a/test/shell/lvconvert-raid.sh
+++ b/test/shell/lvconvert-raid.sh
@@ -244,9 +244,16 @@ lvremove -ff $vg
###########################################
aux delay_dev "$dev2" 0 100
lvcreate --type raid1 -m 2 -aey -l 2 -n $lv1 $vg "$dev1" "$dev2" "$dev3"
+case "$(uname -r)" in
+4.8.14*)
+echo "Skippen test that kills this kernel"
+;;
+*)
lvconvert --yes -m 1 $vg/$lv1 "$dev3"
lvconvert --yes -m 0 $vg/$lv1 "$dev1"
aux enable_dev "$dev2"
+;;
+esac
lvremove -ff $vg
###########################################
5 years, 5 months
master - tests: skip portion of test for lvmpolld
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f7adcb5f6db7e7c1131...
Commit: f7adcb5f6db7e7c1131b5dfb9114235a908292b1
Parent: 14f24c217586a4544b911b5ea90e8b627a8efd01
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Nov 18 21:38:56 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Nov 18 22:03:50 2018 +0100
tests: skip portion of test for lvmpolld
lvmpolld ATM is not desingned to preserve interval checking
in the same way the 'lvconvert' tool is doing - so the passed
'-i 40' is not respected and lvmpolld autonomously checks
state of conversion and updates lvm2 metadata and dm tables
when needed.
So skip portion of test that relayed on this and preserve this logic
only for command line invocation and forking of polling process
where the interval of checking is under full control.
---
test/shell/mirror-names.sh | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/test/shell/mirror-names.sh b/test/shell/mirror-names.sh
index 6d46180..1019bd3 100644
--- a/test/shell/mirror-names.sh
+++ b/test/shell/mirror-names.sh
@@ -112,6 +112,17 @@ check_and_cleanup_lvs_
lvcreate -aey -l2 --type mirror -m1 -n $lv1 $vg
# Use large enough polling interval so mirror is keeping mimagetmp
LVM_TEST_TAG="kill_me_$PREFIX" lvconvert -m+1 -i+40 -b $vg/$lv1
+
+#
+# TODO: lvmpolld is not 'preserving' -i interval setting from
+# lvconvert initiating command - so there is not much to test
+# if the lvconvert is already finished at this point
+# and lvmpolld cleaned metadata and refreshed DM table
+#
+# It' unclear if this is undocumented feature of bug.
+#
+if test ! -f LOCAL_LVMPOLLD ; then
+
for i in $(seq 1 10) ; do
# check if background process already started
# this is recognized by presence of LV1_mimage_2
@@ -139,6 +150,7 @@ convlv=$(lv_convert_lv_ $vg/$lv2)
lv_devices_ $vg/$lv2 $convlv ${lv2}_mimage_2
lv_devices_ $vg/$convlv ${lv2}_mimage_0 ${lv2}_mimage_1
lv_mirror_log_ $vg/$convlv ${lv2}_mlog
+fi # ! -f LOCAL_LVMPOLLD
#COMM "cleanup"
check_and_cleanup_lvs_
5 years, 5 months
master - tests: create whole path with mkdir
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0747a6d0de8ccbf1586...
Commit: 0747a6d0de8ccbf1586d392de29f4ab3b0fa7dbc
Parent: f7adcb5f6db7e7c1131b5dfb9114235a908292b1
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Nov 18 21:42:27 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Nov 18 22:03:50 2018 +0100
tests: create whole path with mkdir
Create also 'lvm' upper this if such one is missing in /run dir
and use '-p' with mkdir.
---
test/shell/pvscan-autoactivate.sh | 2 +-
test/shell/pvscan-nomda-bg.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/shell/pvscan-autoactivate.sh b/test/shell/pvscan-autoactivate.sh
index c2fc36a..cd360e9 100644
--- a/test/shell/pvscan-autoactivate.sh
+++ b/test/shell/pvscan-autoactivate.sh
@@ -32,7 +32,7 @@ vgcreate $vg1 "$dev1" "$dev2"
lvcreate -n $lv1 -l 4 -a n $vg1
# the first pvscan scans all devs
-test -d "$ONLINEDIR" || mkdir "$ONLINEDIR"
+test -d "$ONLINEDIR" || mkdir -p "$ONLINEDIR"
_clear_online nofoo
pvscan --cache -aay
diff --git a/test/shell/pvscan-nomda-bg.sh b/test/shell/pvscan-nomda-bg.sh
index 1b6a176..42bd26f 100644
--- a/test/shell/pvscan-nomda-bg.sh
+++ b/test/shell/pvscan-nomda-bg.sh
@@ -28,7 +28,7 @@ RUNDIR="/run"
test -d "$RUNDIR" || RUNDIR="/var/run"
# create a file in pvs_online to disable the pvscan init
# case which scans everything when the first dev appears.
-mkdir "$RUNDIR/lvm/pvs_online" || true
+mkdir -p "$RUNDIR/lvm/pvs_online" || true
touch "$RUNDIR/lvm/pvs_online/foo"
pvscan --cache --background "$dev2" -aay
5 years, 5 months
master - tests: skip when gcore from gdb package is missing
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=14f24c217586a4544b9...
Commit: 14f24c217586a4544b911b5ea90e8b627a8efd01
Parent: 4021e88a31a440e64992742be76367f98fbc9400
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Nov 18 21:37:00 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sun Nov 18 22:03:50 2018 +0100
tests: skip when gcore from gdb package is missing
gcore is needed for gathering all userspace mappings.
---
test/shell/dmsecuretest.sh | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/test/shell/dmsecuretest.sh b/test/shell/dmsecuretest.sh
index 45abd00..fca72bf 100644
--- a/test/shell/dmsecuretest.sh
+++ b/test/shell/dmsecuretest.sh
@@ -21,6 +21,9 @@ SECURE="434e0cbab02ca68ffba9268222c3789d703fe62427b78b308518b3228f6a2122"
DMTEST="${PREFIX}-test-secure"
+# Test needs installed gdb package with gcore app
+which gcore || skip
+
aux driver_at_least 4 6 || skip
# ensure we can create devices (uses dmsetup, etc)
5 years, 5 months
master - tests: prefer internal header
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4021e88a31a440e6499...
Commit: 4021e88a31a440e64992742be76367f98fbc9400
Parent: 188bedf8de0c60a2269f76d99262c8892c5a2143
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Nov 17 01:38:39 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Nov 17 01:40:29 2018 +0100
tests: prefer internal header
Although we primarily want to check externally used libdevmapper
library, out internal all.h is still keeping all symbols
as the original library has - so for simpler compilation keep
using this private copy for defining needed symbols.
---
test/lib/dmsecuretest.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/lib/dmsecuretest.c b/test/lib/dmsecuretest.c
index 00d1e70..2ab7f81 100644
--- a/test/lib/dmsecuretest.c
+++ b/test/lib/dmsecuretest.c
@@ -10,7 +10,7 @@
*
*/
-#include "libdevmapper.h"
+#include "device_mapper/all.h"
#include <unistd.h>
#include <signal.h>
5 years, 5 months
master - tests: correcting header file enclosure
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=188bedf8de0c60a2269...
Commit: 188bedf8de0c60a2269f76d99262c8892c5a2143
Parent: ea001426af94d07ba1e787b36a0c325e33c6a3d9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Nov 17 01:11:13 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Nov 17 01:12:06 2018 +0100
tests: correcting header file enclosure
Use "" for internal header file.
---
test/lib/dmsecuretest.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/test/lib/dmsecuretest.c b/test/lib/dmsecuretest.c
index 0428fac..00d1e70 100644
--- a/test/lib/dmsecuretest.c
+++ b/test/lib/dmsecuretest.c
@@ -10,9 +10,10 @@
*
*/
+#include "libdevmapper.h"
+
#include <unistd.h>
#include <signal.h>
-#include <libdevmapper.h>
/* Comment out this define to get coredump instead of sleeping */
#define SLEEP 1
5 years, 5 months
master - tests: still more libs needs
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ea001426af94d07ba1e...
Commit: ea001426af94d07ba1e787b36a0c325e33c6a3d9
Parent: 2d89192935228cce019f8fc190a0060ca13b704e
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Nov 17 01:00:06 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Nov 17 01:01:48 2018 +0100
tests: still more libs needs
---
test/Makefile.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index ba8eea8..df61f0a 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -238,7 +238,7 @@ lib/runner: lib/runner.o .lib-dir-stamp
$(CXX) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $<
lib/dmsecuretest: lib/dmsecuretest.o .lib-dir-stamp $(INTERNAL_LIBS)
- $(CC) -g $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $< $(INTERNAL_LIBS) $(UDEV_LIBS) -lm
+ $(CC) -g $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $< $(INTERNAL_LIBS) $(LIBS)
lib/securetest: lib/dmsecuretest.o .lib-dir-stamp
$(CC) -g $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $< -L$(top_builddir)/libdm/ioctl -ldevmapper $(LIBS)
5 years, 5 months
master - tests: makefile fixes
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2d89192935228cce019...
Commit: 2d89192935228cce019f8fc190a0060ca13b704e
Parent: a23ed35f6c14e2f914796c34fea2404d54b08302
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Nov 17 00:52:19 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Nov 17 00:52:59 2018 +0100
tests: makefile fixes
New tests needs more options and libs.
---
test/Makefile.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index 6b6749a..ba8eea8 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -238,10 +238,10 @@ lib/runner: lib/runner.o .lib-dir-stamp
$(CXX) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $<
lib/dmsecuretest: lib/dmsecuretest.o .lib-dir-stamp $(INTERNAL_LIBS)
- $(CC) -g $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $< $(INTERNAL_LIBS) $(UDEV_LIBS) -lm
+ $(CC) -g $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $< $(INTERNAL_LIBS) $(UDEV_LIBS) -lm
lib/securetest: lib/dmsecuretest.o .lib-dir-stamp
- $(CC) -g $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $< -L$(top_builddir)/libdm/ioctl -ldevmapper
+ $(CC) -g $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $< -L$(top_builddir)/libdm/ioctl -ldevmapper $(LIBS)
lib/runner.o: $(wildcard $(srcdir)/lib/*.h)
5 years, 5 months
master - tests: drop unwanted backup
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a23ed35f6c14e2f9147...
Commit: a23ed35f6c14e2f914796c34fea2404d54b08302
Parent: 97a95f9648ffe2882ad7fadcea3f0908c8947c7d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Nov 12 17:57:40 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Nov 17 00:30:50 2018 +0100
tests: drop unwanted backup
---
test/shell/lvcreate-cache-no-tools.sh | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvcreate-cache-no-tools.sh b/test/shell/lvcreate-cache-no-tools.sh
index 253c8a5..bbab0fe 100644
--- a/test/shell/lvcreate-cache-no-tools.sh
+++ b/test/shell/lvcreate-cache-no-tools.sh
@@ -76,7 +76,6 @@ lvcreate -aey -l1 -n $lv1 $vg
lvcreate -H -l2 $vg/$lv1
check_change_ "Check is skipped"
-vgcfgbackup -f /dev/shm/back
# prepare fake version of cache_check tool that reports old version
make_fake_ "0.1.0"
5 years, 5 months
master - tests: extend
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=fd8001a9fc7ea3a49c2...
Commit: fd8001a9fc7ea3a49c2b9fc3c3e20367e5dcf401
Parent: 83d9ea73486c92a48725648d2ee2b5fac2fb6b5c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 16 16:01:39 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Nov 17 00:30:50 2018 +0100
tests: extend
---
test/shell/lvextend-thin-metadata-dmeventd.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvextend-thin-metadata-dmeventd.sh b/test/shell/lvextend-thin-metadata-dmeventd.sh
index 3731bf6..437a04e 100644
--- a/test/shell/lvextend-thin-metadata-dmeventd.sh
+++ b/test/shell/lvextend-thin-metadata-dmeventd.sh
@@ -171,7 +171,9 @@ wait_for_change_ $pre
lvchange -an $vg
#
-fake_metadata_ 350 2 >data
+DATA=300 # Newer version of thin-pool have hidden reserve, so use lower value
+aux target_at_least dm-thin-pool 1 20 0 || DATA=350
+fake_metadata_ $DATA 2 >data
lvchange -ay $vg/$lv1
"$LVM_TEST_THIN_RESTORE_CMD" -i data -o "$DM_DEV_DIR/mapper/$vg-$lv1"
5 years, 5 months