]>
Commit | Line | Data |
---|---|---|
c886eb9d AM |
1 | From cfcfadac1d61093f900d1903f580818d244479ad Mon Sep 17 00:00:00 2001 |
2 | From: Mike Fleetwood <mike.fleetwood@googlemail.com> | |
3 | Date: Sat, 1 Oct 2016 16:40:17 +0100 | |
4 | Subject: [PATCH 46/53] tests: t3310-flags.sh: Stop excluding certain flags | |
5 | from being tested | |
6 | ||
7 | Also grep for whole words, grep -w, to avoid flag 'boot' being matched | |
8 | as a substring of flag 'legacy_boot'. | |
9 | ||
10 | Signed-off-by: Brian C. Lane <bcl@redhat.com> | |
11 | --- | |
12 | tests/t3310-flags.sh | 9 ++------- | |
13 | 1 file changed, 2 insertions(+), 7 deletions(-) | |
14 | ||
15 | diff --git a/tests/t3310-flags.sh b/tests/t3310-flags.sh | |
16 | index 85a673a..5cbf2da 100644 | |
17 | --- a/tests/t3310-flags.sh | |
18 | +++ b/tests/t3310-flags.sh | |
19 | @@ -49,15 +49,10 @@ for table_type in msdos gpt; do | |
20 | ||
21 | for mode in on_only on_and_off ; do | |
22 | for flag in $flags; do | |
23 | - | |
24 | - # Exclude the supplemental flags. | |
25 | - # These are not boolean, like the others. | |
26 | - case $flag in boot|lba|hidden) continue;; esac | |
27 | - | |
28 | # Turn on each flag, one at a time. | |
29 | parted -m -s $dev set 1 $flag on unit s print > raw 2> err || fail=1 | |
30 | extract_flags raw > out | |
31 | - grep -F "$flag" out \ | |
32 | + grep -w "$flag" out \ | |
33 | || { warn_ "$ME_: $table_type: flag '$flag' not turned on: $(cat out)"; fail=1; } | |
34 | compare /dev/null err || fail=1 | |
35 | ||
36 | @@ -65,7 +60,7 @@ for table_type in msdos gpt; do | |
37 | # Turn it off | |
38 | parted -m -s $dev set 1 $flag off unit s print > raw 2> err || fail=1 | |
39 | extract_flags raw > out | |
40 | - grep -F "$flag" out \ | |
41 | + grep -w "$flag" out \ | |
42 | && { warn_ "$ME_: $table_type: flag '$flag' not turned off: $(cat out)"; fail=1; } | |
43 | compare /dev/null err || fail=1 | |
44 | fi | |
45 | -- | |
46 | 2.7.4 | |
47 |