git: d4a5d7a15544 - stable/14 - makefs/zfs tests: Run zdb prior to importing makefs-created pools

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 04 Oct 2023 13:43:48 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=d4a5d7a15544d5e561f4235b9b40457e2c52626a

commit d4a5d7a15544d5e561f4235b9b40457e2c52626a
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-09-27 15:58:34 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-10-04 13:42:07 +0000

    makefs/zfs tests: Run zdb prior to importing makefs-created pools
    
    zdb contains quite a few assertions that can help catch bugs.
    
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 87534f95dd2ed51e01165e0072cb1c7790809a8b)
---
 usr.sbin/makefs/tests/makefs_zfs_tests.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh
index 250a313481d9..e8da4cc87055 100644
--- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh
+++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh
@@ -56,6 +56,8 @@ import_image()
 {
 	atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \
 	    mdconfig -a -f $TEST_IMAGE
+	atf_check -o ignore -e empty -s exit:0 \
+            zdb -e -p /dev/$(cat $TEST_MD_DEVICE_FILE) -mmm -ddddd $ZFS_POOL_NAME
 	atf_check zpool import -R $TEST_MOUNT_DIR $ZFS_POOL_NAME
 	echo "$ZFS_POOL_NAME" > $TEST_ZFS_POOL_NAME
 }