[lvm-devel] master - tests: metadata-zero-space long vgnames

David Teigland teigland at sourceware.org
Wed Oct 16 14:51:01 UTC 2019


Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=55bf692bff777e3beefed5b89a28c1fb1ebe1d32
Commit:        55bf692bff777e3beefed5b89a28c1fb1ebe1d32
Parent:        998e7b107513697b3ea966ba49aeef3fe115d908
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Wed Oct 16 09:46:48 2019 -0500
Committer:     David Teigland <teigland at redhat.com>
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(-)

diff --git a/test/shell/metadata-zero-space.sh b/test/shell/metadata-zero-space.sh
index d037ab2..f04de48 100644
--- a/test/shell/metadata-zero-space.sh
+++ b/test/shell/metadata-zero-space.sh
@@ -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
 




More information about the lvm-devel mailing list