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 <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #15909
This commit is contained in:
Umer Saleem 2024-09-20 23:06:19 +05:00 committed by Brian Behlendorf
parent 80645d6582
commit aeb79f2b29

View File

@ -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