summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-10-16 09:46:48 -0500
committerDavid Teigland <teigland@redhat.com>2019-10-16 09:46:48 -0500
commit55bf692bff777e3beefed5b89a28c1fb1ebe1d32 (patch)
tree12196e0732e3ad3d2c2c05bd69b5e31d36d9088b
parent998e7b107513697b3ea966ba49aeef3fe115d908 (diff)
downloadlvm2-55bf692bff777e3beefed5b89a28c1fb1ebe1d32.tar.gz
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.
-rw-r--r--test/shell/metadata-zero-space.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/shell/metadata-zero-space.sh b/test/shell/metadata-zero-space.sh
index d037ab2cf..f04de48d7 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