diff options
author | ngie <ngie@FreeBSD.org> | 2015-11-02 10:08:00 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-11-02 10:08:00 +0000 |
commit | 347666c81e1ddb63c07fcad31777aafc2d50fed6 (patch) | |
tree | 2e46397dd8024b663330a456b260e99642ee3a8f /usr.sbin/makefs | |
parent | de9b219b0a549aeb1e2f48effef11266eb44c8ba (diff) | |
download | FreeBSD-src-347666c81e1ddb63c07fcad31777aafc2d50fed6.zip FreeBSD-src-347666c81e1ddb63c07fcad31777aafc2d50fed6.tar.gz |
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
Diffstat (limited to 'usr.sbin/makefs')
-rwxr-xr-x | usr.sbin/makefs/tests/makefs_cd9660_tests.sh | 2 | ||||
-rwxr-xr-x | usr.sbin/makefs/tests/makefs_ffs_tests.sh | 2 | ||||
-rwxr-xr-x | usr.sbin/makefs/tests/makefs_tests_common.sh | 9 |
3 files changed, 10 insertions, 3 deletions
diff --git a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh index 214ae2b..161b56b 100755 --- a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh +++ b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh @@ -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 diff --git a/usr.sbin/makefs/tests/makefs_ffs_tests.sh b/usr.sbin/makefs/tests/makefs_ffs_tests.sh index 4bc3f5c..4dc2fd9 100755 --- a/usr.sbin/makefs/tests/makefs_ffs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_ffs_tests.sh @@ -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 \ diff --git a/usr.sbin/makefs/tests/makefs_tests_common.sh b/usr.sbin/makefs/tests/makefs_tests_common.sh index d0099fd..add0b88 100755 --- a/usr.sbin/makefs/tests/makefs_tests_common.sh +++ b/usr.sbin/makefs/tests/makefs_tests_common.sh @@ -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 |