Page MenuHomeFreeBSD

D54429.1782968265.diff
No OneTemporary

Size
8 KB
Referenced Files
None
Subscribers
None

D54429.1782968265.diff

diff --git a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh
--- a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh
+++ b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh
@@ -37,6 +37,8 @@
. "$(dirname "$0")/makefs_tests_common.sh"
+MTREE="mtree -k $DEFAULT_MTREE_KEYWORDS"
+
common_cleanup()
{
if ! test_md_device=$(cat $TEST_MD_DEVICE_FILE); then
@@ -86,7 +88,7 @@
{
create_test_inputs
- mtree -cp $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
atf_check -e empty -o empty -s exit:0 \
$MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR
@@ -104,7 +106,7 @@
{
create_test_inputs
- mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
cd $TEST_INPUTS_DIR
atf_check -e empty -o empty -s exit:0 \
$MAKEFS $TEST_IMAGE $TEST_SPEC_FILE
@@ -374,22 +376,21 @@
atf_test_case T_flag_F_flag cleanup
T_flag_F_flag_body()
{
- atf_expect_fail "-F doesn't take precedence over -T"
timestamp_F=1742574909
timestamp_T=1742574910
create_test_dirs
mkdir -p $TEST_INPUTS_DIR/dir1
- mtree -c -k "type,time" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F
- atf_check -e empty -o not-empty -s exit:0 \
+ atf_check -e empty -o empty -s exit:0 \
$MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR
mount_image
eval $(stat -s $TEST_MOUNT_DIR/dir1)
atf_check_equal $st_atime $timestamp_F
atf_check_equal $st_mtime $timestamp_F
- atf_check_equal $st_ctime $timestamp_F
+ # atf_check_equal $st_ctime $timestamp_F
}
T_flag_F_flag_cleanup()
@@ -404,7 +405,7 @@
create_test_dirs
mkdir -p $TEST_INPUTS_DIR/dir1
- mtree -c -k "type" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
atf_check -e empty -o empty -s exit:0 \
$MAKEFS -T $timestamp -o rockridge $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
--- a/usr.sbin/makefs/tests/makefs_ffs_tests.sh
+++ b/usr.sbin/makefs/tests/makefs_ffs_tests.sh
@@ -29,6 +29,7 @@
. "$(dirname "$0")/makefs_tests_common.sh"
+MTREE="mtree -k $DEFAULT_MTREE_KEYWORDS"
TEST_TUNEFS_OUTPUT=$TMPDIR/tunefs.output
common_cleanup()
@@ -56,7 +57,7 @@
{
create_test_inputs
- mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
cd $TEST_INPUTS_DIR
atf_check -e empty -o not-empty -s exit:0 \
@@ -99,7 +100,7 @@
{
create_test_inputs
- mtree -cp $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
atf_check -e empty -o not-empty -s exit:0 \
$MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR
@@ -117,7 +118,7 @@
{
create_test_inputs
- mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
cd $TEST_INPUTS_DIR
atf_check -e empty -o not-empty -s exit:0 \
@@ -259,13 +260,12 @@
atf_test_case T_flag_F_flag cleanup
T_flag_F_flag_body()
{
- atf_expect_fail "-F doesn't take precedence over -T"
timestamp_F=1742574909
timestamp_T=1742574910
create_test_dirs
mkdir -p $TEST_INPUTS_DIR/dir1
- mtree -c -k "type,time" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F
atf_check -e empty -o not-empty -s exit:0 \
$MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -M 1m $TEST_IMAGE $TEST_INPUTS_DIR
@@ -274,7 +274,7 @@
eval $(stat -s $TEST_MOUNT_DIR/dir1)
atf_check_equal $st_atime $timestamp_F
atf_check_equal $st_mtime $timestamp_F
- atf_check_equal $st_ctime $timestamp_F
+ # atf_check_equal $st_ctime $timestamp_F
}
T_flag_F_flag_cleanup()
@@ -289,7 +289,7 @@
create_test_dirs
mkdir -p $TEST_INPUTS_DIR/dir1
- mtree -c -k "type" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
atf_check -e empty -o not-empty -s exit:0 \
$MAKEFS -M 1m -T $timestamp $TEST_IMAGE $TEST_SPEC_FILE
diff --git a/usr.sbin/makefs/tests/makefs_msdos_tests.sh b/usr.sbin/makefs/tests/makefs_msdos_tests.sh
--- a/usr.sbin/makefs/tests/makefs_msdos_tests.sh
+++ b/usr.sbin/makefs/tests/makefs_msdos_tests.sh
@@ -30,8 +30,11 @@
MAKEFS="makefs -t msdos"
MOUNT="mount_msdosfs"
+
. "$(dirname "$0")/makefs_tests_common.sh"
+MTREE="mtree -k $DEFAULT_MTREE_KEYWORDS"
+
common_cleanup()
{
if ! test_md_device=$(cat $TEST_MD_DEVICE_FILE); then
@@ -46,10 +49,7 @@
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
+ timestamp=1742574908 # Even value, timestamp precision is 2s.
create_test_dirs
mkdir -p $TEST_INPUTS_DIR/dir1
@@ -58,7 +58,8 @@
mount_image
eval $(stat -s $TEST_MOUNT_DIR/dir1)
- atf_check_equal $st_atime $timestamp
+ # FAT directory entries don't have an access time, just a date.
+ #atf_check_equal $st_atime $timestamp
atf_check_equal $st_mtime $timestamp
atf_check_equal $st_ctime $timestamp
}
@@ -71,20 +72,20 @@
atf_test_case T_flag_F_flag cleanup
T_flag_F_flag_body()
{
- atf_expect_fail "-F doesn't take precedence over -T"
- timestamp_F=1742574909
+ timestamp_F=1742574908 # Even value, timestamp precision is 2s.
timestamp_T=1742574910
create_test_dirs
mkdir -p $TEST_INPUTS_DIR/dir1
- mtree -c -k "type,time" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F
atf_check -e empty -o not-empty -s exit:0 \
$MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -s 1m $TEST_IMAGE $TEST_INPUTS_DIR
mount_image
eval $(stat -s $TEST_MOUNT_DIR/dir1)
- atf_check_equal $st_atime $timestamp_F
+ # FAT directory entries don't have an access time, just a date.
+ #atf_check_equal $st_atime $timestamp
atf_check_equal $st_mtime $timestamp_F
atf_check_equal $st_ctime $timestamp_F
}
@@ -101,7 +102,7 @@
create_test_dirs
mkdir -p $TEST_INPUTS_DIR/dir1
- mtree -c -k "type" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
atf_check -e empty -o not-empty -s exit:0 \
$MAKEFS -T $timestamp -s 1m $TEST_IMAGE $TEST_SPEC_FILE
diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh
--- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh
+++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh
@@ -34,6 +34,8 @@
. "$(dirname "$0")/makefs_tests_common.sh"
+MTREE="mtree -k $DEFAULT_MTREE_KEYWORDS"
+
common_cleanup()
{
local pool md
@@ -973,7 +975,8 @@
create_test_dirs
mkdir -p $TEST_INPUTS_DIR/dir1
- atf_check $MAKEFS -T $timestamp -s 10g -o rootpath=/ -o poolname=$ZFS_POOL_NAME \
+ atf_check -e empty -o empty -s exit:0 \
+ $MAKEFS -T $timestamp -s 10g -o rootpath=/ -o poolname=$ZFS_POOL_NAME \
$TEST_IMAGE $TEST_INPUTS_DIR
import_image
@@ -991,23 +994,22 @@
atf_test_case T_flag_F_flag cleanup
T_flag_F_flag_body()
{
- atf_expect_fail "-F doesn't take precedence over -T"
timestamp_F=1742574909
timestamp_T=1742574910
create_test_dirs
mkdir -p $TEST_INPUTS_DIR/dir1
- mtree -c -k "type,time" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F
- atf_check -e empty -o not-empty -s exit:0 \
+ atf_check -e empty -o empty -s exit:0 \
$MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -s 10g -o rootpath=/ \
-o poolname=$ZFS_POOL_NAME $TEST_IMAGE $TEST_INPUTS_DIR
- mount_image
+ import_image
eval $(stat -s $TEST_MOUNT_DIR/dir1)
atf_check_equal $st_atime $timestamp_F
atf_check_equal $st_mtime $timestamp_F
- atf_check_equal $st_ctime $timestamp_F
+ # atf_check_equal $st_ctime $timestamp_F
}
T_flag_F_flag_cleanup()
@@ -1022,7 +1024,7 @@
create_test_dirs
mkdir -p $TEST_INPUTS_DIR/dir1
- mtree -c -k "type" -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
+ $MTREE -c -p $TEST_INPUTS_DIR > $TEST_SPEC_FILE
atf_check $MAKEFS -T $timestamp -s 10g -o rootpath=/ -o poolname=$ZFS_POOL_NAME \
$TEST_IMAGE $TEST_SPEC_FILE

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 2, 4:57 AM (7 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29004220
Default Alt Text
D54429.1782968265.diff (8 KB)

Event Timeline