The branch main has been updated by siva:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=3e946566c134e039f9c777eaa1232a32e383692c

commit 3e946566c134e039f9c777eaa1232a32e383692c
Author:     Siva Mahadevan <[email protected]>
AuthorDate: 2026-07-22 01:27:11 +0000
Commit:     Siva Mahadevan <[email protected]>
CommitDate: 2026-07-22 13:40:53 +0000

    tests/exterr_test: use ATF_REQUIRE_FEATURE to check exterr_strings
    
    This keeps the skipped test message consistent with others.
    
    Reviewed by:    netchild
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
---
 tests/sys/kern/Makefile      | 2 ++
 tests/sys/kern/exterr_test.c | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile
index f7f5d1825e01..f025172c8388 100644
--- a/tests/sys/kern/Makefile
+++ b/tests/sys/kern/Makefile
@@ -153,6 +153,8 @@ SRCS.subr_physmem_test+= subr_physmem_test.c subr_physmem.c
 CFLAGS.subr_unit.c+=   -Wno-missing-prototypes
 SRCS.subr_unit_test+=  subr_unit.c
 
+CFLAGS.exterr_test+=   -I${SRCTOP}/tests
+
 WARNS?=        3
 
 TESTS_SUBDIRS+=        acct
diff --git a/tests/sys/kern/exterr_test.c b/tests/sys/kern/exterr_test.c
index 316b5b66b0e0..bde7654fecfc 100644
--- a/tests/sys/kern/exterr_test.c
+++ b/tests/sys/kern/exterr_test.c
@@ -34,6 +34,8 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "freebsd_test_suite/macros.h"
+
 /*
  * Pin the message format by clearing EXTERROR_VERBOSE, which would
  * otherwise change the output shape.
@@ -66,8 +68,7 @@ ATF_TC_BODY(gettext_extended, tc)
        r = uexterr_gettext(exterr, sizeof(exterr));
        ATF_CHECK_EQ(0, r);
        printf("Extended error: %s\n", exterr);
-       if (feature_present("exterr_strings") == 0)
-               atf_tc_skip("kernel built without EXTERR_STRINGS");
+       ATF_REQUIRE_FEATURE("exterr_strings");
        /* Note: error string may need to be updated due to kernel changes */
        ATF_CHECK(strstr(exterr, " is not subset of ") != NULL);
 }

Reply via email to