]> git.proxmox.com Git - mirror_zfs.git/commitdiff
ZTS: Test for all known zpool feature sets
authorUmer Saleem <usaleem@ixsystems.com>
Wed, 8 Nov 2023 11:00:59 +0000 (16:00 +0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 9 Nov 2023 18:58:23 +0000 (10:58 -0800)
zpool_create_features_007_pos only tested for compat-2020 feature
set. It would be useful to test for all known features sets. If
any additional feature is found enabled that is not present in
compatibility list or feature set, it should be caught and
reported earlier.

This commit also removes encryption from openzfsonosx-1.8.1
compatibility list. Encryption enables bookmark_v2, since it is
a dependency of encryption, but not listed in openzfsonoxx-1.8.1
compatibility list.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #15505

cmd/zpool/compatibility.d/openzfsonosx-1.8.1
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_007_pos.ksh

index 162ff32a7803a365709a823e98b9652d7067e762..125c578344f99f50aaee64a9e159e153a30cfb35 100644 (file)
@@ -6,7 +6,6 @@ edonr
 embedded_data
 empty_bpobj
 enabled_txg
-encryption
 extensible_dataset
 filesystem_limits
 hole_birth
index c35ca8e8c92cec2fa574b42f3dc02228f7f00ae5..c7c133a219cdbb56b3b6aa2d7542bde2ca881ed0 100755 (executable)
@@ -34,6 +34,7 @@
 # STRATEGY:
 #      1. Create a pool with a known feature set.
 #      2. Verify only those features are active/enabled.
+#      3. Do this for all known feature sets
 #
 
 verify_runnable "global"
@@ -47,8 +48,11 @@ log_onexit cleanup
 
 log_assert "creates a pool with a specified feature set enabled"
 
-log_must zpool create -f -o compatibility=compat-2020 $TESTPOOL $DISKS
-check_feature_set $TESTPOOL compat-2020
-log_must zpool destroy -f $TESTPOOL
+for compat in "$ZPOOL_COMPAT_DIR"/*
+do
+       log_must zpool create -f -o compatibility="${compat##*/}" $TESTPOOL $DISKS
+       check_feature_set $TESTPOOL "${compat##*/}"
+       log_must zpool destroy -f $TESTPOOL
+done
 
 log_pass "creates a pool with a specified feature set enabled"