Skip to content

Commit

Permalink
ZTS: Fix skipping over comment lines in zpool_create.shlib
Browse files Browse the repository at this point in the history
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
  • Loading branch information
usaleem-ix authored and tonyhutter committed Nov 4, 2024
1 parent ca5652c commit e2bded2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@ function check_feature_set
while read line; do
typeset flag=1

if [[ "$line" == "#*" ]]; then
continue
fi
# Skip comments
[[ $line = \#* ]] && continue

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

0 comments on commit e2bded2

Please sign in to comment.