git: 26e31700fc7d - main - sysctl_test: Print standard error if sysctl -ao fails

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 08 Jul 2025 12:56:50 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=26e31700fc7d9bd033cb157f534c67bf9bc697dd

commit 26e31700fc7d9bd033cb157f534c67bf9bc697dd
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-07-08 12:48:40 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-07-08 12:56:00 +0000

    sysctl_test: Print standard error if sysctl -ao fails
    
    MFC after:      1 week
---
 sbin/sysctl/tests/sysctl_test.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sbin/sysctl/tests/sysctl_test.sh b/sbin/sysctl/tests/sysctl_test.sh
index dfc32a87b212..b4cc7180a0f9 100644
--- a/sbin/sysctl/tests/sysctl_test.sh
+++ b/sbin/sysctl/tests/sysctl_test.sh
@@ -41,6 +41,7 @@ sysctl_aflag_body()
 	# output and it would all otherwise be saved.
 	sysctl -ao >/dev/null 2>stderr
 	if [ $? -ne 0 ]; then
+		cat stderr
 		atf_fail "sysctl -ao failed"
 	elif [ -s stderr ]; then
 		cat stderr