Skip to contentSkip to conversation

master - tests: metadata-zero-space long vgnames

PATCH David Teigland 1 participant 1 message Oct 16, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=55bf692bff777e3beefed5b89a28c1fb1ebe1d32
Commit:        55bf692bff777e3beefed5b89a28c1fb1ebe1d32
Parent:        998e7b107513697b3ea966ba49aeef3fe115d908
Author:        David Teigland <[email protected]>
AuthorDate:    Wed Oct 16 09:46:48 2019 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Wed Oct 16 09:46:48 2019 -0500

tests: metadata-zero-space long vgnames

In the hex dump output, grep for the vgname followed by one space. This allows for test pids with up to seven digits, which are used to contruct the variable vgname used by the test. Otherwise the long vgname wraps to the next line and fails to match in grep.

---
 test/shell/metadata-zero-space.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
test/shell/metadata-zero-space.sh +3 -3
index d037ab2..f04de48 100644
@@ -39,9 +39,9 @@ xxd meta.raw > meta.txt
 # to help debug if the next grep fails
 ls -l meta.txt
 head -n 100 meta.txt
-grep -A4 -B4 1200 meta.txt
+grep -A4 -B4 '01200:' meta.txt
 
-grep -B1 "$vg {" meta.txt > meta.vg
+grep -B1 "$vg " meta.txt > meta.vg
 
 cat meta.vg
 
@@ -73,7 +73,7 @@ dd if="$dev1" of=meta.raw bs=1M seek=15 count=1
 
 xxd meta.raw > meta.txt
 
-grep -B1 "$vg {" meta.txt > meta.vg
+grep -B1 "$vg " meta.txt > meta.vg
 
 cat meta.vg