Skip to content

Commit 532b9b1

Browse files
Umer Saleemlundman
authored andcommitted
ZTS: Fix skipping over comment lines in zpool_create.shlib
In zpool_create.shlib, check_feature_set iterates over all features mentioned in provided compatibility file to check if only those features are enabled on the pool. This commit fixes skipping over comment lines correctly. Otherwise, the test case fails as comment lines are also treated as feature names by check_feature_set function. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Umer Saleem <[email protected]> Closes openzfs#15909
1 parent eb9ca48 commit 532b9b1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.shlib

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,8 @@ function check_feature_set
119119
while read line; do
120120
typeset flag=1
121121

122-
if [[ "$line" == "#*" ]]; then
123-
continue
124-
fi
122+
# Skip comments
123+
[[ $line = \#* ]] && continue
125124

126125
for set in "$@"; do
127126
if ! grep -q "$line" $ZPOOL_COMPAT_DIR/$set; then

0 commit comments

Comments
 (0)