[parted-devel] [PATCH 2/8] tests: t3310-flags.sh: Stop excluding certain flags from being tested
Mike Fleetwood
mike.fleetwood at googlemail.com
Tue Aug 16 19:42:36 UTC 2016
Grep for whole words, grep -w, to avoid flag 'boot' being matched as a
substring of flag 'legacy_boot'.
---
tests/t3310-flags.sh | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/tests/t3310-flags.sh b/tests/t3310-flags.sh
index 368ec13..ba73147 100644
--- a/tests/t3310-flags.sh
+++ b/tests/t3310-flags.sh
@@ -48,15 +48,10 @@ for table_type in msdos gpt; do
for mode in on_only on_and_off ; do
for flag in $flags; do
-
- # Exclude the supplemental flags.
- # These are not boolean, like the others.
- case $flag in boot|lba|hidden) continue;; esac
-
# Turn on each flag, one at a time.
parted -m -s $dev set 1 $flag on unit s print > raw 2> err || fail=1
extract_flags raw > out
- grep -F "$flag" out \
+ grep -w "$flag" out \
|| { warn_ "$ME_: $table_type: flag '$flag' not turned on: $(cat out)"; fail=1; }
compare /dev/null err || fail=1
@@ -64,7 +59,7 @@ for table_type in msdos gpt; do
# Turn it off
parted -m -s $dev set 1 $flag off unit s print > raw 2> err || fail=1
extract_flags raw > out
- grep -F "$flag" out \
+ grep -w "$flag" out \
&& { warn_ "$ME_: $table_type: flag '$flag' not turned off: $(cat out)"; fail=1; }
compare /dev/null err || fail=1
fi
--
1.7.1
More information about the parted-devel
mailing list