]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Add testcases for -t cd9660 -o isolevel=[1-3]
authorngie <ngie@FreeBSD.org>
Mon, 2 Nov 2015 09:16:51 +0000 (09:16 +0000)
committerngie <ngie@FreeBSD.org>
Mon, 2 Nov 2015 09:16:51 +0000 (09:16 +0000)
-- -o isolevel=1 currently fails because of path comparison issues,
   so mark it as an expected failure.
-- -o isolevel=3 is not implemented, so expect it to fail as an out
   of bounds value [*].

PR: 203645
MFC after: 1 week
X-MFC with: r290264
Sponsored by: EMC / Isilon Storage Division

usr.sbin/makefs/tests/makefs_cd9660_tests.sh

index e476cf1bf8dd98770599852a9e616e978a9c2f9b..214ae2b4d133de74dd8223e7b0fe582dc582b383 100755 (executable)
@@ -208,6 +208,61 @@ o_flag_allow_max_name_cleanup()
        common_cleanup
 }
 
+atf_test_case o_flag_isolevel_1 cleanup
+o_flag_isolevel_1_body()
+{
+       atf_expect_fail "this testcase needs work; the filenames generated seem incorrect/corrupt"
+
+       create_test_inputs
+
+       atf_check -e empty -o empty -s exit:0 \
+           $MAKEFS -o isolevel=1 $TEST_IMAGE $TEST_INPUTS_DIR
+
+       mount_image
+       check_base_iso9660_image_contents
+}
+o_flag_isolevel_1_cleanup()
+{
+       common_cleanup
+}
+
+atf_test_case o_flag_isolevel_2 cleanup
+o_flag_isolevel_2_body()
+{
+       create_test_inputs
+
+       atf_check -e empty -o empty -s exit:0 \
+           $MAKEFS -o isolevel=2 $TEST_IMAGE $TEST_INPUTS_DIR
+
+       mount_image
+       check_base_iso9660_image_contents
+}
+o_flag_isolevel_2_cleanup()
+{
+       common_cleanup
+}
+
+atf_test_case o_flag_isolevel_3 cleanup
+o_flag_isolevel_3_body()
+{
+       create_test_inputs
+
+       # XXX: isolevel=3 isn't implemented yet. See FreeBSD bug # 203645
+       if true; then
+       atf_check -e match:'makefs: ISO Level 3 is greater than 2\.' -o empty -s not-exit:0 \
+           $MAKEFS -o isolevel=3 $TEST_IMAGE $TEST_INPUTS_DIR
+       else
+       atf_check -e empty -o empty -s exit:0 \
+           $MAKEFS -o isolevel=3 $TEST_IMAGE $TEST_INPUTS_DIR
+       mount_image
+       check_base_iso9660_image_contents
+       fi
+}
+o_flag_isolevel_3_cleanup()
+{
+       common_cleanup
+}
+
 atf_test_case o_flag_preparer
 o_flag_preparer_body()
 {
@@ -308,6 +363,9 @@ atf_init_test_cases()
 
        atf_add_test_case o_flag_allow_deep_trees
        atf_add_test_case o_flag_allow_max_name
+       atf_add_test_case o_flag_isolevel_1
+       atf_add_test_case o_flag_isolevel_2
+       atf_add_test_case o_flag_isolevel_3
        atf_add_test_case o_flag_preparer
        atf_add_test_case o_flag_publisher
        atf_add_test_case o_flag_rockridge