From nobody Thu Jan 15 19:45:03 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 4dsYNb6JgLz6PMMh for ; Thu, 15 Jan 2026 19:45:03 +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 4dsYNb246Lz41P2 for ; Thu, 15 Jan 2026 19:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768506303; 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=wf2GlBHHcuXetkv9tQWC9c7hp38RY1NYC5bJssexH8c=; b=oPriGETzeqUfk27CNhJIMFRkBkp/npoRc5YPIIhcoPm7Dgowwlalkzw/MNpTP/uZYBXjtI dcZ8qbK8ayHhoHBihzl0ypZqgJiMXHPLH60c9pK8pKIGteG35veToWkmmqm8nYZdkKuXCC aByzyd2zBJaWAv8a2urNdAsFP/+S8Z8HBHgFsh2skDh5T2tLBvWTUIeeqr2ZYJ1fVoFPwQ qKkIQQp4yFvHEBgAALZSIgrUHKEQiLx7pHu5bFoU5pn7qRWOTRGpc2gSJ40ST9giJrj5bk SEtebhBtW6ZKLHZwFCQhYciijQZPNs1j4CXPBLAsUmyAVef3QKhUZR4xapEnAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768506303; 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=wf2GlBHHcuXetkv9tQWC9c7hp38RY1NYC5bJssexH8c=; b=JT24EEC+VwV7vaVDgaIsmXuTfLBqKSdX4H0uh46XzPU7VdUfNpuT/MRhSopug6QMLqCeJ2 SPRYyHBsqAj0tYXXihBC+c6Myj2aA2tTdpOPnxhlKosmAb/1bjd2aa/+YTDjyNiwAeaB2Z RJHNzUIy71htnZTEoenOiCGjss7Y9b5gcUeOx6VaHzCge0KvmFotdmhIIq5PiCfQfA8Y2v /DyiKfSXn7S8R0PdMZvz6B1mWhd2amBC3IzgXNIxQUOnSFZ2qCaltF3bGeLBFnfWS8qhUy vA+om0a62G8CvZXNWVkfoqllFAOtf9vPrtml2BHPoAIX6IAs3mb6p2AegkSXqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768506303; a=rsa-sha256; cv=none; b=CqK4d4aUtZ/UXVOwkSWEwSubwNBuSObLU+aip/cdpFGeHkIt9Phahs5cfuvAh/NJquMYxn 8B8plPdlz/ly6q0k8/0BgfcmjzJY+0Xz9pSer5QkD+/aCGWgSko+DAZLZZk9uCEGz9K1Ea zB3BJUHXYr8ZwadqfcuIoVO9IrnZk5TruEvBKG/r7M4ZRmALDRVezzlDht0lL1vZItoWoa wc0iPVz+3XHIjf0Dw+Ic3mmBv8fFDe/d6cQ2Sd8jW5VxzllzuJIvP39fH93QNazYiBYv9X kBGL962J8izmgW8LPjK4dOfLPgDDJ95x4rRdqccFJElGqtPeJ7/0NlMGJSHtIA== 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 4dsYNb1cpqzjhP for ; Thu, 15 Jan 2026 19:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4697b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 15 Jan 2026 19:45:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: b10369daede7 - stable/15 - makefs: tests: Fix -D flag test 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/stable/15 X-Git-Reftype: branch X-Git-Commit: b10369daede76cc5c83d599f68a9c129dfa174a4 Auto-Submitted: auto-generated Date: Thu, 15 Jan 2026 19:45:03 +0000 Message-Id: <696943bf.4697b.33867830@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=b10369daede76cc5c83d599f68a9c129dfa174a4 commit b10369daede76cc5c83d599f68a9c129dfa174a4 Author: Jose Luis Duran AuthorDate: 2026-01-05 20:33:27 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-15 19:38:28 +0000 makefs: tests: Fix -D flag test As stated in the manual page: -F is almost certainly not the option you are looking for. To create an image from a list of files in an mtree format manifest, specify it as the last argument on the command line, not as the argument to -F. This change does exactly that. Also bug #192839 has already been fixed. Reviewed by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54428 (cherry picked from commit 96efda9cd55689ef3fa067281d8b0a42a7122536) --- usr.sbin/makefs/tests/makefs_cd9660_tests.sh | 24 +++++++++++++----------- usr.sbin/makefs/tests/makefs_ffs_tests.sh | 24 +++++++++++++----------- usr.sbin/makefs/tests/makefs_tests_common.sh | 8 ++++++++ 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh index 5b1a53443290..21382684a96c 100644 --- a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh +++ b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh @@ -61,21 +61,23 @@ check_base_iso9660_image_contents() atf_test_case D_flag D_flag_body() { - atf_skip "makefs crashes with SIGBUS with dupe mtree entries; see FreeBSD bug # 192839" - create_test_inputs - atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR - atf_check -o not-empty \ - $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + create_manifest_file + + # Check that it works + atf_check $MAKEFS -M 1m $TEST_IMAGE $TEST_SPEC_FILE - atf_check cp $TEST_SPEC_FILE spec2.mtree - atf_check -o save:${TEST_SPEC_FILE}_dupe cat $TEST_SPEC_FILE spec2.mtree + # Duplicate entries in the manifest file + cp $TEST_SPEC_FILE spec2.mtree + cat $TEST_SPEC_FILE spec2.mtree | sort > "${TEST_SPEC_FILE}_dupe" - atf_check -o not-empty -s not-exit:0 \ - $MAKEFS -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -o not-empty \ - $MAKEFS -D -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + # Check that it errors + atf_check -e not-empty -s not-exit:0 \ + $MAKEFS -M 1m $TEST_IMAGE ${TEST_SPEC_FILE}_dupe + # Check that it warns + atf_check -e not-empty \ + $MAKEFS -D -M 1m $TEST_IMAGE ${TEST_SPEC_FILE}_dupe } atf_test_case F_flag cleanup diff --git a/usr.sbin/makefs/tests/makefs_ffs_tests.sh b/usr.sbin/makefs/tests/makefs_ffs_tests.sh index 6b8fb4afd707..e1db5fa1b997 100644 --- a/usr.sbin/makefs/tests/makefs_ffs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_ffs_tests.sh @@ -74,21 +74,23 @@ autocalculate_image_size_cleanup() atf_test_case D_flag D_flag_body() { - atf_skip "makefs crashes with SIGBUS with dupe mtree entries; see FreeBSD bug # 192839" - create_test_inputs - atf_check -o save:$TEST_SPEC_FILE mtree -cp $TEST_INPUTS_DIR - atf_check -o not-empty \ - $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + create_manifest_file - atf_check cp $TEST_SPEC_FILE spec2.mtree - atf_check -o save:${TEST_SPEC_FILE}_dupe cat $TEST_SPEC_FILE spec2.mtree + # Check that it works + atf_check -o not-empty $MAKEFS -M 1m $TEST_IMAGE $TEST_SPEC_FILE - atf_check -o not-empty -s not-exit:0 \ - $MAKEFS -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -o not-empty \ - $MAKEFS -D -F ${TEST_SPEC_FILE}_dupe -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + # Duplicate entries in the manifest file + cp $TEST_SPEC_FILE spec2.mtree + cat $TEST_SPEC_FILE spec2.mtree | sort > "${TEST_SPEC_FILE}_dupe" + + # Check that it errors + atf_check -e not-empty -s not-exit:0 \ + $MAKEFS -M 1m $TEST_IMAGE ${TEST_SPEC_FILE}_dupe + # Check that it warns + atf_check -e not-empty -o not-empty \ + $MAKEFS -D -M 1m $TEST_IMAGE ${TEST_SPEC_FILE}_dupe } atf_test_case F_flag cleanup diff --git a/usr.sbin/makefs/tests/makefs_tests_common.sh b/usr.sbin/makefs/tests/makefs_tests_common.sh index fa2cbaff9521..44b02557925a 100644 --- a/usr.sbin/makefs/tests/makefs_tests_common.sh +++ b/usr.sbin/makefs/tests/makefs_tests_common.sh @@ -79,6 +79,14 @@ check_image_contents() -p $TEST_MOUNT_DIR $mtree_excludes_arg } +create_manifest_file() +{ + # Prefer a specification format that is easier to parse (-C) + mtree -k "$DEFAULT_MTREE_KEYWORDS" -cp "$TEST_INPUTS_DIR" | \ + mtree -C > "$TEST_SPEC_FILE" + sed -i "" "s|^\.|.${TEST_INPUTS_DIR##$TMPDIR}|g" "$TEST_SPEC_FILE" +} + create_test_dirs() { atf_check mkdir -m 0777 -p $TEST_MOUNT_DIR