Skip to contentSkip to conversation

master - tests: skip without xxd

PATCH David Teigland 1 participant 1 message Sep 11, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=447ba5f1c20161d2ca89e0673fc4b219f65209a9
Commit:        447ba5f1c20161d2ca89e0673fc4b219f65209a9
Parent:        31b6a04e4c1e851dc9d51c42a6cb54a82afeb4b4
Author:        David Teigland <[email protected]>
AuthorDate:    Wed Sep 11 13:59:16 2019 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Wed Sep 11 14:01:55 2019 -0500

tests: skip without xxd

---
 test/shell/metadata-bad-mdaheader.sh |    6 ++----
 test/shell/metadata-zero-space.sh    |    6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)
test/shell/metadata-bad-mdaheader.sh +2 -4
index cf24936..e9e303d 100644
@@ -12,6 +12,8 @@
 
 . lib/inittest
 
+xxd -v || skip
+
 aux prepare_devs 3
 get_devs
 
@@ -33,8 +35,6 @@ vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3"
 
 pvs
 
-if [ -e "/usr/bin/xxd" ]; then
-
 # read mda_header which is 4k from start of disk
 dd if="$dev1" of=meta1 bs=4k count=1 skip=1
 
@@ -54,8 +54,6 @@ dd if=meta1-bad of="$dev1" bs=4k seek=1
 pvs 2>&1 | tee out
 grep "bad metadata header" out
 
-fi
-
 pvs "$dev1"
 pvs "$dev2"
 pvs "$dev3"
test/shell/metadata-zero-space.sh +2 -4
index 847ef44..11c358b 100644
@@ -14,6 +14,8 @@ SKIP_WITH_LVMPOLLD=1
 
 . lib/inittest
 
+xxd -v || skip
+
 aux prepare_devs 1 256
 get_devs
 
@@ -27,8 +29,6 @@ vgcreate $SHARED "$vg" "$dev1"
 
 for i in `seq 1 50`; do lvcreate -l1 -an $vg; done
 
-if [ -e "/usr/bin/xxd" ]; then
-
 # Check metadata copies are separated by zeroes in the first mda
 
 dd if="$dev1" of=meta.raw bs=1M count=1
@@ -81,6 +81,4 @@ cat meta.count | wc -l
 
 test "$(cat meta.count | wc -l)" -gt 20
 
-fi
-
 vgremove -ff $vg