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.

Signed-off-by: Umer Saleem <[email protected]>
  • Loading branch information
usaleem-ix committed Sep 21, 2024
1 parent 4ff461e commit 45a1d46
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 45a1d46

Please sign in to comment.