From nobody Thu Jan 15 19:45:04 2026 X-Original-To: dev-commits-src-branches@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 4dsYNd0Z7Jz6PMJb for ; Thu, 15 Jan 2026 19:45:05 +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 4dsYNc3L0vz412w for ; Thu, 15 Jan 2026 19:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768506304; 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=G1S3Pr5UzYrEJO+TRDwufDwZ4clOonQF+1OkjW+sv08=; b=R2siG7v9c5H/70F+xFNItQuuP/rkAzmgtTH1jBUuPZpWrFDnFKLcsuMMWp7eN0ttokiUPl Ql3JVIX2CZFGhtveJl4u02lOS8jAoJ21/ahQGjz1uLQJw2fZ3sCNuIbRSCCL25XFb8qyeS uYsbeWPleXgOs4wwX7Kl2eslER/UhFP+B8uAqVK+dvJ32T13ABoPzaM4+EgtHZUYGQ0RIn TLXXmkIKxydMpH22wUEEWW8ozjtpUa7/UA7W/ql/YrFDZIhNKHXK7ia6hbDECSiuRJm26p KC+llHivUQzFwrZAUNQAlG8bp9sfMEWhAprD8wSaAnyWwix3RvmGHNkuSsQBMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768506304; 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=G1S3Pr5UzYrEJO+TRDwufDwZ4clOonQF+1OkjW+sv08=; b=JRLQMQbQEdBTOy3jMBbPaPaBFoeZ8kXoIyvRdQX9SLZR1KxpyD+0TMGf1hJ6OWtRPGsjBr AZMvjM9ei6+PwZ/3nkL7w1t9w33eCferyCf+hAlpEJIEvT7N5L/Wmi7pDHPHfVGTblGHoj qL2bQbsJPmSBX/jgPYU07wx2NN/dWj4IQtWbIRP/uhTHj/zf59si+I+r3F+0Jl+PTmDtuY /wNKtcH5L9BHz4JMOcigG9RcYb27+N6A8PlWg9C18R/eiy/VbSj1Rp9ds2InncinL8LLjC szeda0NDsuslXHP4uRawqwjZ63HZ+d1zWxXQhc92fvVO9DqbSoPBjyuqjpc4oA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768506304; a=rsa-sha256; cv=none; b=LaZvDUfD+DQP85NP/7cwa5HDF0kTp/oIhT7bK3om2g/XUvNLdoEnOk/pLq9JqLPIWUjhb3 RulSIJbPH3QQD5nPNceqTgsa4f+rThods34MEj4dhudPzKTT0AaMViAhHHPJmsWyTWPqMZ Jrq+8FiaOBcnWTEwxzcJjvsvbOqxAf4cp2C++hNwmRlO3pM5feKD7sf2OvO4zLKCX/LaIp 74AqGbFt5O5RfbCgzpAOM/6wJ0rpOp3d72yznj5C3hmnHvfwt1gz6vc+TDKKwOTmE6p+w2 um7uZW4RZ6HLHXlKv+7tQXp64Lq9ACDHy//8ps8HFBrfyWlKqXuCM7C1faZgtA== 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 4dsYNc2PrlzjVJ for ; Thu, 15 Jan 2026 19:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47d2a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 15 Jan 2026 19:45:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 99d4a01be578 - stable/15 - makefs: tests: Fix timestamp-related tests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 99d4a01be578406e8fad2b9e137ff75498a5d9a9 Auto-Submitted: auto-generated Date: Thu, 15 Jan 2026 19:45:04 +0000 Message-Id: <696943c0.47d2a.5c509f58@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=99d4a01be578406e8fad2b9e137ff75498a5d9a9 commit 99d4a01be578406e8fad2b9e137ff75498a5d9a9 Author: Jose Luis Duran AuthorDate: 2026-01-05 20:34:03 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-15 19:38:41 +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 (cherry picked from commit 93b15dbc1fbc3c33c9bd53091b28c3b629d0abe1) --- 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