3sQpfH9Nsub9DIgDO1Qelw 1nHTGdfGbMS6ey8lVy/ImmreXFtYkY1e0mnBWo5PYHiZaS7Dgs5GDFOIvXqsAj6N88RBg7 AJvPtAe/1ky0H0SkmAPjRBQXBgLplw5vI8vDbHUqP/jGP3Qfs1B5R85Cc1XmLiw9sltkta HwbX4HPoqys2DNnvP8KwVzKiRkPDsAmVDJB6qadAGqnUVhRrq4Cilc0Wexe52g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765905253; a=rsa-sha256; cv=none; b=NRB29HHn/YDtqEuTcP0tcepL95VBqY5UIqEmYgQOZTaE916UwauJSt8S12FDZ6PmcmUIZY CWeD1RMOjQL5mlqIMxsp6kEKidCWG58Z3Kvq53ExmoGA5ZO4SZep+03DQ920FabyUXiSnP 47rkpSPRNsBNFZhmOUrLu7EhQeoJ0Wra9fj3rLCvBk0e1WOTmZQV7ABWgUrpYTx0TOZMEi O6TPuoMEVxJYWUqm0VzfxQSHACUTqirez5UHB9bliZDmog7qP1pLcunAQfmD/dzE3/uLkW 0P1cl8pig0I+m6UopkUUXOzmzz3ntXLJ2eHtgu7H8WZl3DQ9NrvnvpQeeKgvpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW3SP0QG2z1GS for ; Tue, 16 Dec 2025 17:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d435 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 17:14:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: 2cd31bd8fa68 - main - makefs/tests: Use require.kmods property instead of ad-hoc checks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2cd31bd8fa687922d2a571ae53456ecd2e9ba095 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 17:14:13 +0000 Message-Id: <69419365.d435.765a7211@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=2cd31bd8fa687922d2a571ae53456ecd2e9ba095 commit 2cd31bd8fa687922d2a571ae53456ecd2e9ba095 Author: Siva Mahadevan AuthorDate: 2025-07-24 12:13:56 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-16 17:13:47 +0000 makefs/tests: Use require.kmods property instead of ad-hoc checks Signed-off-by: Siva Mahadevan MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1870 --- usr.sbin/makefs/tests/Makefile | 2 ++ usr.sbin/makefs/tests/makefs_cd9660_tests.sh | 19 ------------------- usr.sbin/makefs/tests/makefs_msdos_tests.sh | 8 -------- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/usr.sbin/makefs/tests/Makefile b/usr.sbin/makefs/tests/Makefile index 748bafa06211..5c9ba983acdc 100644 --- a/usr.sbin/makefs/tests/Makefile +++ b/usr.sbin/makefs/tests/Makefile @@ -2,9 +2,11 @@ ATF_TESTS_SH+= makefs_cd9660_tests TEST_METADATA.makefs_cd9660_tests+= required_files="/sbin/mount_cd9660" +TEST_METADATA.makefs_cd9660_tests+= required_kmods="cd9660" ATF_TESTS_SH+= makefs_ffs_tests ATF_TESTS_SH+= makefs_msdos_tests TEST_METADATA.makefs_msdos_tests+= required_files="/sbin/mount_msdosfs" +TEST_METADATA.makefs_msdos_tests+= required_kmods="msdosfs" .if ${MK_ZFS} != "no" ATF_TESTS_SH+= makefs_zfs_tests .endif diff --git a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh index e058dfc57b7b..b36753de3393 100644 --- a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh +++ b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh @@ -58,11 +58,6 @@ check_base_iso9660_image_contents() atf_check -e empty -o empty -s exit:0 test -f $TEST_MOUNT_DIR/c } -check_cd9660_support() { - kldstat -m cd9660 || \ - atf_skip "Requires cd9660 filesystem support to be present in the kernel" -} - atf_test_case D_flag cleanup D_flag_body() { @@ -101,7 +96,6 @@ F_flag_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -122,7 +116,6 @@ from_mtree_spec_file_body() $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE cd - - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -145,7 +138,6 @@ from_multiple_dirs_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR $test_inputs_dir2 - check_cd9660_support mount_image check_base_iso9660_image_contents -d $test_inputs_dir2 } @@ -162,7 +154,6 @@ from_single_dir_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -183,7 +174,6 @@ o_flag_allow_deep_trees_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o allow-deep-trees $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -207,7 +197,6 @@ o_flag_allow_max_name_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o allow-max-name $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -226,7 +215,6 @@ o_flag_isolevel_1_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o isolevel=1 $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -243,7 +231,6 @@ o_flag_isolevel_2_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o isolevel=2 $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -265,7 +252,6 @@ o_flag_isolevel_3_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o isolevel=3 $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents fi @@ -333,7 +319,6 @@ o_flag_rockridge_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_image_contents -X .rr_moved @@ -365,7 +350,6 @@ o_flag_rockridge_dev_nodes_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_image_contents } @@ -378,7 +362,6 @@ atf_test_case T_flag_dir cleanup T_flag_dir_body() { timestamp=1742574909 - check_cd9660_support create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 @@ -436,7 +419,6 @@ T_flag_mtree_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -T $timestamp -o rockridge $TEST_IMAGE $TEST_SPEC_FILE - check_cd9660_support mount_image eval $(stat -s $TEST_MOUNT_DIR/dir1) atf_check_equal $st_atime $timestamp @@ -456,7 +438,6 @@ duplicate_names_head() } duplicate_names_body() { - check_cd9660_support create_test_dirs # Create three directories which are identical in the first 31 characters. diff --git a/usr.sbin/makefs/tests/makefs_msdos_tests.sh b/usr.sbin/makefs/tests/makefs_msdos_tests.sh index fb94429b477b..ce246f3d268c 100644 --- a/usr.sbin/makefs/tests/makefs_msdos_tests.sh +++ b/usr.sbin/makefs/tests/makefs_msdos_tests.sh @@ -43,12 +43,6 @@ common_cleanup() mdconfig -d -u $test_md_device || : } -check_msdosfs_support() -{ - kldstat -m msdosfs || \ - atf_skip "Requires msdosfs filesystem support to be present in the kernel" -} - atf_test_case T_flag_dir cleanup T_flag_dir_body() { @@ -56,7 +50,6 @@ T_flag_dir_body() "The msdos backend saves the wrong timestamp value" \ "(possibly due to the 2s resolution for FAT timestamp)" timestamp=1742574909 - check_msdosfs_support create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 @@ -106,7 +99,6 @@ atf_test_case T_flag_mtree cleanup T_flag_mtree_body() { timestamp=1742574908 # Even value, timestamp precision is 2s. - check_msdosfs_support create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1