From nobody Mon Jan 5 20:38:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3N5MZsz6N1Wj for ; Mon, 05 Jan 2026 20:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlR3N1XvJz3Z3N for ; Mon, 05 Jan 2026 20:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9YwPYSywA4D273oQXe8u/NMNFi0uu/wL23DpSauy/U=; b=hWIh1bVo9l+OBw5M+fRIAi8yV5b4Ikr1+M0fkIsuaOYPHDDDpC4GHOv+uAf6bDY25Yx5ZS VGxxdLtGUISYlVh5y4NMi6bf/Ixs4wQvoO5A3FcTw9cR+YaS7DOWqUa/nVHvjaEKInOxdn HK1+jaU0g8wb6zFfg6jhyuH8cN4fEBpTygNDul2MycnVKr4rjI13tr2EANy+YRFVNw9n2f +WTVDUGpPjCgSimaxNB4nA5hqQGzfP20rvrJkkh8BdR4QquBP2eQLVJd+1t2cMvTfoAhaJ RFNYlogwiMwyX8N5HvdoDf4+xkQRde5MPGILGxcRtZriZgjCrL+5ECnfB7Guyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767645536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9YwPYSywA4D273oQXe8u/NMNFi0uu/wL23DpSauy/U=; b=bqYD1JXjH+P9R/jOz7samV22jDL5QciJSAZLFYXAxJaigmVVxbzRKiSCnlWeoqlkhVsM7k 6shI2axqzWGHlxHi3yo170vKqYbdAWYBogXEGNwLE4Lov9MMHNafZJvXT3UGBBAcinOkaU TEcPjYrRDE2lhJVFqmU8S2eYWA+I8tp4S6QYyVWHl1CD5aCU999s2Wnm0PIdnCNtbx5ygY D6nWLW0+zrDHG1JengNYvPmBW15wWeu2OgKqNrPsRvpyBSYbgSb6hCzeML7MrPgxVMs8KN MH1zD8J3QZmojzXDRIZ1Ho7rrR/lXN4cNtyhe83JP90ZYVL1MZg7QUR4R/o+8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767645536; a=rsa-sha256; cv=none; b=xGrq8c4qA8wdy+ADtuq9vEGmokvH9q2ptfMnoieZ2Wx4+L4LImE8rLrOdQ/Sda2yziHWn1 ghp4RzmJyIu68qLDNDaDD8pOXYDYSx2jBYV6yca318NQgS2iyu9TmTs/MWCPbs9YnwBTqf 3j+RpDAAkkTGXymosXl95Jmxv50cdo1tKkn3kQ4cSKpK+oKIWcmWfSuyv2/fTF21Oa8KzI 5egdQOv+BT2bYQQcICRQjItGZkV2H/+6gs2ns+71sTVJQanOfQFpv9B2U71mSel1xLR1T3 CsC6rOzb4SlVMubBvPfmjxEdQsG00PxNEC4X47RJW6IugHUlOzSli6vmN0KkJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlR3M6jPmzcXF for ; Mon, 05 Jan 2026 20:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ac5b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:38:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 93b15dbc1fbc - main - makefs: tests: Fix timestamp-related tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93b15dbc1fbc3c33c9bd53091b28c3b629d0abe1 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:38:55 +0000 Message-Id: <695c215f.ac5b.94e85f2@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=93b15dbc1fbc3c33c9bd53091b28c3b629d0abe1 commit 93b15dbc1fbc3c33c9bd53091b28c3b629d0abe1 Author: Jose Luis Duran AuthorDate: 2026-01-05 20:34:03 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-05 20:34:03 +0000 makefs: tests: Fix timestamp-related tests Use a variable for mtree that includes the DEFAULT_MTREE_KEYWORDS, in order to avoid missing the important "time" keyword or passing an unimplemented "nlink" keyword. Unskip the "failing" tests, and comment out the specific failing checks, these will be addressed (or at least discussed) in a different revision. For MS-DOS tests, use an even value timestamp, as precision is 2s. For ZFS tests, use import_image instead of mount_image consistently. Reviewed by: bnovkov, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54429 --- usr.sbin/makefs/tests/makefs_cd9660_tests.sh | 12 +++++------- usr.sbin/makefs/tests/makefs_ffs_tests.sh | 15 ++++++--------- usr.sbin/makefs/tests/makefs_msdos_tests.sh | 19 ++++++++----------- usr.sbin/makefs/tests/makefs_tests_common.sh | 1 + usr.sbin/makefs/tests/makefs_zfs_tests.sh | 12 +++++------- 5 files changed, 25 insertions(+), 34 deletions(-) diff --git a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh index 21382684a96c..719c2045305f 100644 --- a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh +++ b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh @@ -85,7 +85,7 @@ F_flag_body() { create_test_inputs - atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR @@ -102,8 +102,7 @@ from_mtree_spec_file_body() { create_test_inputs - atf_check -o save:$TEST_SPEC_FILE \ - mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR atf_check $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE cd - @@ -358,13 +357,12 @@ T_flag_dir_cleanup() 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 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type,time" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F atf_check \ $MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR @@ -373,7 +371,7 @@ T_flag_F_flag_body() 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() @@ -388,7 +386,7 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check $MAKEFS -T $timestamp -o rockridge $TEST_IMAGE $TEST_SPEC_FILE mount_image diff --git a/usr.sbin/makefs/tests/makefs_ffs_tests.sh b/usr.sbin/makefs/tests/makefs_ffs_tests.sh index e1db5fa1b997..ac078394bf03 100644 --- a/usr.sbin/makefs/tests/makefs_ffs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_ffs_tests.sh @@ -56,8 +56,7 @@ autocalculate_image_size_body() { create_test_inputs - atf_check -o save:$TEST_SPEC_FILE \ - mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR atf_check -o not-empty $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE @@ -98,7 +97,7 @@ F_flag_body() { create_test_inputs - atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR @@ -116,8 +115,7 @@ from_mtree_spec_file_body() { create_test_inputs - atf_check -o save:$TEST_SPEC_FILE \ - mtree -c -k "$DEFAULT_MTREE_KEYWORDS" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR cd $TEST_INPUTS_DIR atf_check -o not-empty $MAKEFS -M 1m $TEST_IMAGE $TEST_SPEC_FILE @@ -257,13 +255,12 @@ T_flag_dir_cleanup() 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 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type,time" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F atf_check -o not-empty \ $MAKEFS -F $TEST_SPEC_FILE -T $timestamp_T -M 1m $TEST_IMAGE $TEST_INPUTS_DIR @@ -272,7 +269,7 @@ T_flag_F_flag_body() 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() @@ -287,7 +284,7 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check -o not-empty \ $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 index 00ab1509ef55..f800bbcd6925 100644 --- a/usr.sbin/makefs/tests/makefs_msdos_tests.sh +++ b/usr.sbin/makefs/tests/makefs_msdos_tests.sh @@ -47,10 +47,7 @@ common_cleanup() 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 @@ -59,7 +56,8 @@ T_flag_dir_body() 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 } @@ -72,21 +70,20 @@ T_flag_dir_cleanup() 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 - atf_check -o save:$TEST_SPEC_FILE \ - mtree -c -k "type,time" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F atf_check -o not-empty \ $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 } @@ -103,7 +100,7 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check -o not-empty \ $MAKEFS -T $timestamp -s 1m $TEST_IMAGE $TEST_SPEC_FILE diff --git a/usr.sbin/makefs/tests/makefs_tests_common.sh b/usr.sbin/makefs/tests/makefs_tests_common.sh index 44b02557925a..27ab89ae26ec 100644 --- a/usr.sbin/makefs/tests/makefs_tests_common.sh +++ b/usr.sbin/makefs/tests/makefs_tests_common.sh @@ -27,6 +27,7 @@ KB=1024 : ${TMPDIR=/tmp} DEFAULT_MTREE_KEYWORDS="type,mode,gid,uid,size,link,time" +MTREE="mtree -k $DEFAULT_MTREE_KEYWORDS" TEST_IMAGE="$TMPDIR/test.img" TEST_INPUTS_DIR="$TMPDIR/inputs" TEST_MD_DEVICE_FILE="$TMPDIR/md.output" diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 7dd6005e49ec..9d5ce300843e 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -979,24 +979,22 @@ T_flag_dir_cleanup() 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 - atf_check -o save:$TEST_SPEC_FILE \ - mtree -c -k "type,time" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR change_mtree_timestamp $TEST_SPEC_FILE $timestamp_F - atf_check -o not-empty \ + atf_check \ $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() @@ -1011,7 +1009,7 @@ T_flag_mtree_body() create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 - atf_check -o save:$TEST_SPEC_FILE mtree -c -k "type" -p $TEST_INPUTS_DIR + atf_check -o save:$TEST_SPEC_FILE $MTREE -c -p $TEST_INPUTS_DIR atf_check $MAKEFS -T $timestamp -s 10g -o rootpath=/ -o poolname=$ZFS_POOL_NAME \ $TEST_IMAGE $TEST_SPEC_FILE