From nobody Tue Nov 17 13:49:15 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 4jTR0q5ytDz713F7 for ; Tue, 17 Nov 2026 13:49:15 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jTR0q4tC1z4ZDV for ; Tue, 17 Nov 2026 13:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794923355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p/D3DLdt8JLfBwjVp5FFd2VUa9SQVju9Csy0GlPXyFg=; b=lj0FcFibfTlga3u6X1DDkboAQ9g5pxZrsD/JWJtTfY8MsrpGfywmige4zlur6iudRNvx6i qiGEdaeahNm6U4WyEIlBb7eGKFLYPiOIBvmCgABPlAw0i+6na4pTWWeJQ2J67gLJaJIakR V9Mahp/rlLgKpM5lxEWXzGZAGfETbkGyeReWNC0e/AUJTfg/UPTOvxrAaE0mhpyBV0YJcE Bjm1qhG3YxTSVg+nNlc9XYW44NPIHeCB4vcTqa5ppDYxQyY7blJ9aG5CKm/GX7qWGfXWJc vQLE1R7XaZqgxSYxCDjUVUKEOuTWCwDdPIZHJKUUJzhYxHWWVGDRBpkujkOCLg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794923355; b=CIS6wXkoISAYz7F8glMEguGAwnbpvuHNwSL2coBOq1eqBG233mFDA+t0+nOOP8DfkXvnFX wuilTs4M4McDs83jDrvbZNnlFj/XvXpFeSnXr5q8yKa8cGLMeDYppwQjB+H1tKMafjad69 h1PbBs0VVeA4byR3XWV5UNFAftRsYrJwu6XuAMYrskBQ1MbJt1zxHjLLVytRvPCBJ6lLQa VONzUAusxSBenM7s5yunwpjYRl71+KQnEv9/A9Vo+l5kINiGiWie6jsmqaeoKE2TU8DuFT kZ+JEOnv8RnhTTak1m2h4aE0NX+sW61HbZMkFnekMt4oY1zk7ES47l1jrG1rEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794923355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p/D3DLdt8JLfBwjVp5FFd2VUa9SQVju9Csy0GlPXyFg=; b=djOEuh1QRdxslWAHzYbRf0auJDNE6n954BIcr2R4rKS2ZLFMDIZRQjPPBVLQrawVXNdYEu LZL1xP07a/v8b/MjPGSnkX7+aPpN3rwCE9g/EtSjORV78ckhzRrnuBFV3rnACc2/Xdcwnb VhreXHtkd2K8K//jETM/0THbmYs32EFhe2kCVfnmrekCZKyYWoFt4Kf1l61lDZF3Xtefmj QLCKsv7G0asub1+qhnHF9NnK3FvPbCwowUi5YpIhM7DaUrCdJGiovpIzO+GXUCzCU5a285 XdSAyKdqinkX9jFhUCqPXF3ooBnCMEg9yOdHZMulo4kCxmdlDF0gtWsNRNC43g== 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 4jTR0q4R49zkhm for ; Tue, 17 Nov 2026 13:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9ca5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 17 Nov 2026 13:49:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Osvaldo Janeri Filho From: Mitchell Horne Subject: git: a1100e795ef1 - main - tests/sys/pmc: Keep atf_fail reasons on a single line List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1100e795ef1e15df416a8d822f42e731783fe84 Auto-Submitted: auto-generated Date: Tue, 17 Nov 2026 13:49:15 +0000 Message-Id: <6afc5b5b.9ca5.1957c296@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a1100e795ef1e15df416a8d822f42e731783fe84 commit a1100e795ef1e15df416a8d822f42e731783fe84 Author: Osvaldo Janeri Filho AuthorDate: 2026-11-17 13:47:29 +0000 Commit: Mitchell Horne CommitDate: 2026-11-17 13:49:08 +0000 tests/sys/pmc: Keep atf_fail reasons on a single line Several tests put the output of pmc record, pmc info or pmcstat into the atf_fail reason. That output spans several lines, and ATF reports a multi-line reason as a broken test instead of a failed one, with the captured output mangled into the error. Copy the output to stderr, where kyua keeps it in the report, and use a single-line reason. Reviewed by: mhorne Fixes: 546a76463123 ("tests/sys/pmc: add pidtrack, callchain, ...") Sponsored by: Advanced Micro Devices, Inc. Signed-off-by: Osvaldo Janeri Filho Differential Revision: https://reviews.freebsd.org/D61459 --- tests/sys/pmc/amd/pmc_frontend_test.sh | 6 ++++-- tests/sys/pmc/pmc_cli_test.sh | 9 ++++++--- tests/sys/pmc/pmcstat_tsc_test.sh | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/sys/pmc/amd/pmc_frontend_test.sh b/tests/sys/pmc/amd/pmc_frontend_test.sh index 97964bebead0..36f33a3b641a 100644 --- a/tests/sys/pmc/amd/pmc_frontend_test.sh +++ b/tests/sys/pmc/amd/pmc_frontend_test.sh @@ -36,8 +36,10 @@ pmc_frontend_ibs_body() rc=$? kill "$load" 2>/dev/null wait - [ "$rc" -eq 0 ] || \ - atf_fail "pmc record -s frontend failed: $(cat record.out)" + if [ "$rc" -ne 0 ]; then + cat record.out >&2 + atf_fail "pmc record -s frontend failed" + fi # Each decoded sample row of the analysis carries miss percentages. atf_check -s exit:0 -o save:frontend.txt -e ignore \ diff --git a/tests/sys/pmc/pmc_cli_test.sh b/tests/sys/pmc/pmc_cli_test.sh index e59e83370709..00e6fe56470c 100644 --- a/tests/sys/pmc/pmc_cli_test.sh +++ b/tests/sys/pmc/pmc_cli_test.sh @@ -76,7 +76,8 @@ pmc_record_then_info_body() if ! pmc_record -c instructions -t 2 record.pmc; then grep -q "Cannot allocate event" record.out && \ atf_skip "no instructions event on this CPU" - atf_fail "pmc record failed: $(cat record.out)" + cat record.out >&2 + atf_fail "pmc record failed" fi atf_check -s exit:0 -o save:info.txt -e ignore pmc info record.pmc @@ -84,8 +85,10 @@ pmc_record_then_info_body() # listed under the name libpmc resolved it to. awk '/^Counter/ { t = 1; next } t && $NF ~ /^[0-9]+$/ && $NF > 0 { found = 1 } - END { exit(found ? 0 : 1) }' info.txt || \ - atf_fail "pmc info shows no samples: $(tail -5 info.txt)" + END { exit(found ? 0 : 1) }' info.txt || { + cat info.txt >&2 + atf_fail "pmc info shows no samples" + } } atf_init_test_cases() diff --git a/tests/sys/pmc/pmcstat_tsc_test.sh b/tests/sys/pmc/pmcstat_tsc_test.sh index b4c589634d4a..e7c398ab9364 100644 --- a/tests/sys/pmc/pmcstat_tsc_test.sh +++ b/tests/sys/pmc/pmcstat_tsc_test.sh @@ -21,7 +21,8 @@ pmc_capture() 2> pmcstat.err; then grep -q "Cannot allocate system-mode pmc" pmcstat.err && \ atf_skip "cannot allocate a system-mode instructions PMC" - atf_fail "pmcstat failed: $(cat pmcstat.err)" + cat pmcstat.err >&2 + atf_fail "pmcstat failed" fi [ -s "$1" ] || atf_fail "pmcstat produced an empty log" }