Index: usr.sbin/makefs/tests/makefs_cd9660_tests.sh =================================================================== --- usr.sbin/makefs/tests/makefs_cd9660_tests.sh +++ usr.sbin/makefs/tests/makefs_cd9660_tests.sh @@ -61,23 +61,27 @@ 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() { atf_skip "makefs crashes with SIGBUS with dupe mtree entries; see FreeBSD bug # 192839" create_test_inputs atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ mtree -cp $TEST_INPUTS_DIR atf_check -e empty -o not-empty -s exit:0 \ $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR atf_check -e empty -o empty -s exit:0 \ cp $TEST_SPEC_FILE spec2.mtree atf_check -e empty -o save:dupe_$TEST_SPEC_FILE -s exit:0 \ cat $TEST_SPEC_FILE spec2.mtree atf_check -e empty -o not-empty -s not-exit:0 \ $MAKEFS -F dupe_$TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR atf_check -e empty -o not-empty -s exit:0 \ @@ -91,14 +95,16 @@ atf_test_case F_flag cleanup F_flag_body() { + check_cd9660_support + create_test_inputs atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ mtree -cp $TEST_INPUTS_DIR atf_check -e empty -o empty -s exit:0 \ $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_base_iso9660_image_contents } @@ -110,15 +116,17 @@ atf_test_case from_mtree_spec_file cleanup from_mtree_spec_file_body() { + check_cd9660_support + create_test_inputs atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR atf_check -e empty -o empty -s exit:0 \ $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE cd - mount_image check_base_iso9660_image_contents } @@ -130,17 +138,19 @@ atf_test_case from_multiple_dirs cleanup from_multiple_dirs_body() { + check_cd9660_support + test_inputs_dir2=$TMPDIR/inputs2 create_test_inputs atf_check -e empty -o empty -s exit:0 mkdir -p $test_inputs_dir2 atf_check -e empty -o empty -s exit:0 \ touch $test_inputs_dir2/multiple_dirs_test_file atf_check -e empty -o empty -s exit:0 \ $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR $test_inputs_dir2 mount_image check_base_iso9660_image_contents -d $test_inputs_dir2 } @@ -152,11 +162,13 @@ atf_test_case from_single_dir cleanup from_single_dir_body() { + check_cd9660_support + create_test_inputs atf_check -e empty -o empty -s exit:0 \ $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR mount_image check_base_iso9660_image_contents }