Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions usr.sbin/makefs/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 0 additions & 19 deletions usr.sbin/makefs/tests/makefs_cd9660_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down
8 changes: 0 additions & 8 deletions usr.sbin/makefs/tests/makefs_msdos_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,13 @@ 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()
{
atf_expect_fail \
"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
Expand Down Expand Up @@ -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
Expand Down
Loading