Skip to content

Commit 87791f9

Browse files
author
Umer Saleem
committed
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. Signed-off-by: Umer Saleem <[email protected]>
1 parent 0766c26 commit 87791f9

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)