Author: ngie
Date: Mon Nov  2 10:08:00 2015
New Revision: 290267
URL: https://svnweb.freebsd.org/changeset/base/290267

Log:
  Clean up mtree keyword support a slight bit and add a few more default 
keywords
  
  - Parameterize the mtree keywords as $DEFAULT_MTREE_KEYWORDS
  - Test with the extra mtree keywords, `mode,gid,uid`.
  - Add a note about mtrees with time support not working with makefs right now
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh
  head/usr.sbin/makefs/tests/makefs_ffs_tests.sh
  head/usr.sbin/makefs/tests/makefs_tests_common.sh

Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh
==============================================================================
--- head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh   Mon Nov  2 10:07:21 
2015        (r290266)
+++ head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh   Mon Nov  2 10:08:00 
2015        (r290267)
@@ -113,7 +113,7 @@ from_mtree_spec_file_body()
        create_test_inputs
 
        atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \
-           mtree -c -k type,link,size -p $TEST_INPUTS_DIR
+           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

Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh
==============================================================================
--- head/usr.sbin/makefs/tests/makefs_ffs_tests.sh      Mon Nov  2 10:07:21 
2015        (r290266)
+++ head/usr.sbin/makefs/tests/makefs_ffs_tests.sh      Mon Nov  2 10:08:00 
2015        (r290267)
@@ -105,7 +105,7 @@ from_mtree_spec_file_body()
        create_test_inputs
 
        atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \
-           mtree -c -k type,link,size -p $TEST_INPUTS_DIR
+           mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR
 
        cd $TEST_INPUTS_DIR
        atf_check -e empty -o not-empty -s exit:0 \

Modified: head/usr.sbin/makefs/tests/makefs_tests_common.sh
==============================================================================
--- head/usr.sbin/makefs/tests/makefs_tests_common.sh   Mon Nov  2 10:07:21 
2015        (r290266)
+++ head/usr.sbin/makefs/tests/makefs_tests_common.sh   Mon Nov  2 10:08:00 
2015        (r290267)
@@ -29,6 +29,13 @@
 
 KB=1024
 : ${TMPDIR=/tmp}
+# TODO: add mtree `time` support; get a lot of errors like this right now when
+# passing generating disk images with keyword mtree support, like:
+#
+# `[...]/mtree.spec:8: error: time: invalid value '1446458503'`
+#
+#DEFAULT_MTREE_KEYWORDS="type,mode,gid,uid,size,link,time"
+DEFAULT_MTREE_KEYWORDS="type,mode,gid,uid,size,link"
 TEST_IMAGE="$TMPDIR/test.img"
 TEST_INPUTS_DIR="$TMPDIR/inputs"
 TEST_MD_DEVICE_FILE="$TMPDIR/md.output"
@@ -39,7 +46,7 @@ check_image_contents()
 {
        local directories=$TEST_INPUTS_DIR
        local excludes mtree_excludes_arg mtree_file
-       local mtree_keywords="type,link,size"
+       local mtree_keywords="$DEFAULT_MTREE_KEYWORDS"
 
        while getopts "d:f:m:X:" flag; do
                case "$flag" in
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to