Skip to contentSkip to conversation

master - tests: fix systemid uname test

PATCH David Teigland 1 participant 1 message Mar 6, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=08371a8b8031b43394d80612d24029cfd4c710d4
Commit:        08371a8b8031b43394d80612d24029cfd4c710d4
Parent:        588b3bd7a16b19423f9c4d06b27a3cbe7ac9d623
Author:        David Teigland <[email protected]>
AuthorDate:    Fri Mar 6 09:55:24 2015 -0600
Committer:     David Teigland <[email protected]>
CommitterDate: Fri Mar 6 09:57:37 2015 -0600

tests: fix systemid uname test

The string reported by uname -n may include characters that lvm omits from the system id (like parens, as seen on a test machine.) Check against the final system id string that lvm uses.

---
 test/shell/system_id.sh |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
test/shell/system_id.sh +4 -3
index 6e80c1a..6aa367b 100644
@@ -38,12 +38,13 @@ fi
 
 ## uname
 
-SID=$(uname -n)
-if [ -n $SID ]; then
+SID1=$(uname -n)
+if [ -n $SID1 ]; then
 aux lvmconf "global/system_id_source = uname"
+SID2=$(lvm systemid | awk '{ print $3 }')
 vgcreate $vg1 "$dev1"
 vgs -o+systemid $vg1
-check vg_field $vg1 systemid $SID
+check vg_field $vg1 systemid $SID2
 vgremove $vg1
 fi