[parted-devel] [PATCH v2 2/8] tests: t3310-flags.sh: Stop excluding certain flags from being tested

Mike Fleetwood mike.fleetwood at googlemail.com
Sat Oct 1 15:40:17 UTC 2016


Also 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 85a673a..5cbf2da 100644
--- a/tests/t3310-flags.sh
+++ b/tests/t3310-flags.sh
@@ -49,15 +49,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
 
@@ -65,7 +60,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