aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests
diff options
context:
space:
mode:
authorRob Norris <[email protected]>2024-11-27 11:28:19 +1100
committerGitHub <[email protected]>2024-11-26 19:28:19 -0500
commit0ffa6f3464278993d30c6e98b53af4ced0ed9ab7 (patch)
tree49f0b0cee49371f9267e30525f711b5f44877c89 /tests/zfs-tests
parentd2b0ca953f16d7b33f747369fceb55a89eb51b2e (diff)
zdb: show dedup table and log attributesHEADmaster
There's interesting info in there that is going to help with understanding dedup behavior at any given moment. Since this is a format change, tests that rely on that output have been modified to match. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Rob Norris <[email protected]> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes #16755
Diffstat (limited to 'tests/zfs-tests')
-rwxr-xr-xtests/zfs-tests/tests/functional/dedup/dedup_fdt_create.ksh4
-rwxr-xr-xtests/zfs-tests/tests/functional/dedup/dedup_fdt_import.ksh4
-rwxr-xr-xtests/zfs-tests/tests/functional/dedup/dedup_legacy_create.ksh4
-rwxr-xr-xtests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_mixed.ksh4
-rwxr-xr-xtests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_upgrade.ksh6
-rwxr-xr-xtests/zfs-tests/tests/functional/dedup/dedup_legacy_import.ksh4
6 files changed, 13 insertions, 13 deletions
diff --git a/tests/zfs-tests/tests/functional/dedup/dedup_fdt_create.ksh b/tests/zfs-tests/tests/functional/dedup/dedup_fdt_create.ksh
index 4f6e5805b..3b17de5a4 100755
--- a/tests/zfs-tests/tests/functional/dedup/dedup_fdt_create.ksh
+++ b/tests/zfs-tests/tests/functional/dedup/dedup_fdt_create.ksh
@@ -70,7 +70,7 @@ log_must zpool sync
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "active"
# four entries in the unique table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
# single containing object in the MOS
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256 | wc -l) -eq 1
@@ -84,7 +84,7 @@ log_must cp /$TESTPOOL/file1 /$TESTPOOL/file2
log_must zpool sync
# now four entries in the duplicate table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate:.*entries=4'"
# now two DDT ZAPs in the container object; DDT ZAPs aren't cleaned up until
# the entire logical table is destroyed
diff --git a/tests/zfs-tests/tests/functional/dedup/dedup_fdt_import.ksh b/tests/zfs-tests/tests/functional/dedup/dedup_fdt_import.ksh
index 259eaddc0..faa9b7e04 100755
--- a/tests/zfs-tests/tests/functional/dedup/dedup_fdt_import.ksh
+++ b/tests/zfs-tests/tests/functional/dedup/dedup_fdt_import.ksh
@@ -70,7 +70,7 @@ log_must zpool sync
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "active"
# four entries in the unique table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
# single containing object in the MOS
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256 | wc -l) -eq 1
@@ -107,7 +107,7 @@ log_must zpool sync
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "active"
# four entries in the unique table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
# single containing object in the MOS
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256 | wc -l) -eq 1
diff --git a/tests/zfs-tests/tests/functional/dedup/dedup_legacy_create.ksh b/tests/zfs-tests/tests/functional/dedup/dedup_legacy_create.ksh
index e3efcf5c8..9e524ddbe 100755
--- a/tests/zfs-tests/tests/functional/dedup/dedup_legacy_create.ksh
+++ b/tests/zfs-tests/tests/functional/dedup/dedup_legacy_create.ksh
@@ -63,7 +63,7 @@ log_must zpool sync
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "disabled"
# should be four entries in the unique table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
# should be just one DDT ZAP in the MOS
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256-zap- | wc -l) -eq 1
@@ -73,7 +73,7 @@ log_must cp /$TESTPOOL/file1 /$TESTPOOL/file2
log_must zpool sync
# now four entries in the duplicate table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate:.*entries=4'"
# now two DDT ZAPs in the MOS; DDT ZAPs aren't cleaned up until the entire
# logical table is destroyed
diff --git a/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_mixed.ksh b/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_mixed.ksh
index 114cf0266..fd3b01e8c 100755
--- a/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_mixed.ksh
+++ b/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_mixed.ksh
@@ -71,7 +71,7 @@ log_must dd if=/dev/urandom of=/$TESTPOOL/ds1/file1 bs=128k count=4
log_must zpool sync
# should be four entries in the skein unique table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-skein-zap-unique: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-skein-zap-unique:.*entries=4'"
# should be just one DDT ZAP in the MOS
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-.*-zap- | wc -l) -eq 1
@@ -90,7 +90,7 @@ log_must zpool sync
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "active"
# now also four entries in the blake3 unique table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-blake3-zap-unique: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-blake3-zap-unique:.*entries=4'"
# two entries in the MOS: the legacy skein DDT ZAP, and the containing dir for
# the blake3 FDT table
diff --git a/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_upgrade.ksh b/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_upgrade.ksh
index c36463134..7a1e8006d 100755
--- a/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_upgrade.ksh
+++ b/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_upgrade.ksh
@@ -71,7 +71,7 @@ log_must zpool sync
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "disabled"
# should be four entries in the unique table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
# should be just one DDT ZAP in the MOS
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256-zap- | wc -l) -eq 1
@@ -90,7 +90,7 @@ log_must zpool sync
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "enabled"
# now four entries in the duplicate table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-duplicate:.*entries=4'"
# now two DDT ZAPs in the MOS; DDT ZAPs aren't cleaned up until the entire
# logical table is destroyed
@@ -117,7 +117,7 @@ log_must zpool sync
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "active"
# four entries in the unique table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
# single containing object in the MOS
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256 | wc -l) -eq 1
diff --git a/tests/zfs-tests/tests/functional/dedup/dedup_legacy_import.ksh b/tests/zfs-tests/tests/functional/dedup/dedup_legacy_import.ksh
index a7b667eaf..4de46e89f 100755
--- a/tests/zfs-tests/tests/functional/dedup/dedup_legacy_import.ksh
+++ b/tests/zfs-tests/tests/functional/dedup/dedup_legacy_import.ksh
@@ -63,7 +63,7 @@ log_must zpool sync
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "disabled"
# should be four entries in the unique table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
# should be just one DDT ZAP in the MOS
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256-zap- | wc -l) -eq 1
@@ -96,7 +96,7 @@ log_must zpool sync
log_must test $(get_pool_prop feature@fast_dedup $TESTPOOL) = "disabled"
# should be four entries in the unique table
-log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique: 4 entries'"
+log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=4'"
# should be just one DDT ZAP in the MOS
log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256-zap- | wc -l) -eq 1