100 Commits
Author SHA1 Message Date
Siva Mahadevan d9d6e77965 tests/pf/igmp: fix attribute error with newer versions of scapy
This fixes the flaky testcase in CI[0].

While here:
* fix a typo in a comment
* remove an unnecessary import
* fix this deprecation warning:

  /usr/local/lib/python3.12/site-packages/scapy/contrib/igmp.py:12:
  DeprecationWarning: scapy.contrib.igmp is deprecated. Please use
  scapy.layers.igmp instead !

[0] https://ci.freebsd.org/job/FreeBSD-main-amd64-test/29813/testReport/junit/sys.netpfil.pf.igmp/py/TestIGMP__test_ip_opts/

Reviewed by:	kp
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-10-27 12:54:20 -04:00
Siva Mahadevan b45d14d3d6 sys.mk: CTFMERGE: don't assume objfiles always have CTF sections
There are many instances, e.g. in the kernel, where
object files don't have CTF sections, but still need
to be merged into one that does have a CTF section.

This fixes cases like the following:

--------------------------------------------------------------
>>> stage 3.1: building everything
--------------------------------------------------------------

linking kernel.full
ctfmerge -t -L VERSION -g -o kernel.full ...
ERROR: ctfmerge: Input file force-dynamic-hack.pico was partially built from C sources, but no CTF data was present
Removing kernel.full

    kernel.full ---
    [kernel.full] Error code 1

This partially reverts commit fdd3f6f788.

PR:		299013
Reported by:	markj
Reviewed by:	markj, emaste
Fixes:		fdd3f6f788 ("bsd.lib.mk: only ctfmerge if objfiles have a CTF section")
Differential Revision:	https://reviews.freebsd.org/D60378
2026-10-05 16:13:36 -04:00
Siva Mahadevan fdd3f6f788 bsd.lib.mk: only ctfmerge if objfiles have a CTF section
PR:		299013
Reported by:	[email protected]
Reviewed by:	emaste
Fixes:		222210c6a8 ("libgcc_s: add libgcc_s_asneeded.so wrapper for gcc 16")
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D60252
2026-10-05 10:07:44 -04:00
Siva Mahadevan 0be29268ae tests/pmc: annotate busy loop counters with __unused
This fixes the build with gcc 16 after the changes
to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	netchild
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-09-30 10:32:52 -04:00
Siva Mahadevan 222210c6a8 libgcc_s: add libgcc_s_asneeded.so wrapper for gcc 16
GCC 16[0][1] now requires a wrapper lib to handle
`--push-state --as-needed -lgcc_s --pop-state` logic[1]
for `gcc` invocations. `g++` will still unconditionally
use `-lgcc_s`.

This fixes buildworld with gcc16.

[0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8a99fdb70493df1294b53406913e5ea1fc971c13
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123396

Reviewed by:	jhb
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59511
2026-09-28 11:08:05 -04:00
Siva Mahadevan 188c455f3d OFED: add -Wunused-but-set-variable to OFED_C
This keeps it in sync with sys/modules/ibcore/Makefile and
fixes the build on GCC 16 after the changes to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	jhb
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59539
2026-09-28 11:07:29 -04:00
Siva Mahadevan 34c40126fd tarfs_test: split large file test into independent cases
This avoids globally set timeouts for the group of
tarfs_large tests on slower emulated architectures.

While here, lower each testcase's timeout to reflect
the reduction of work. On QEMU aarch64, the largest case
runs in ~500s on a modern desktop, so double that for a
conservative estimate.

Discussed with:		des
MFC after:		3 days
Sponsored by:		The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59033
2026-09-22 09:55:58 -04:00
Siva Mahadevan 1b9aea382e gh-bc/tests: run tests in parallel
Helps to mitigate failures due to timeout in CI on emulated architectures:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16565/testReport/usr.bin.gh-bc/

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59547
2026-09-21 14:22:08 -04:00
Siva Mahadevan a5dc51aa5f tests/truss: xfail accepted ABIs test if linux(4) not implemented
Split accepted ABIs test into separate case and conditionally
xfail it on archs that don't have linux(4) support.

This fixes a CI test failure[0].

[0] https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16706/testReport/usr.bin.truss/truss_test/unknown_syscall/

Reviewed by:	dteske
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59594
2026-09-14 12:57:57 -04:00
Siva Mahadevan 243bdaff75 lib/googletest: also use -O0 for internal tests with GCC
This fixes the build with gcc 16's aggressive inlining.

Reviewed by:	ngie
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59538
2026-09-12 14:29:18 -04:00
Siva Mahadevan b7e91f238c sctp: remove unused variable
This fixes the build with gcc 16 after the changes
to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	tuexen
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59590
2026-09-11 10:56:31 -04:00
Siva Mahadevan 8e75ea59b0 libctf: remove unused variable
This fixes the build with gcc 16 after the changes
to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59537
2026-09-10 10:40:28 -04:00
Siva Mahadevan 076c9db51f camcontrol: remove unused variable
This fixes the build with gcc 16 after the changes
to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	ken, imp
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59540
2026-09-10 10:40:03 -04:00
Siva Mahadevan e1a1206245 sbin/ifconfig: remove unused static function parameter
This fixes the build with gcc 16 after the changes
to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	glebius
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59541
2026-09-10 10:39:37 -04:00
Siva Mahadevan c65c63cf51 tests/kqueue: remove unused variable
This fixes the build with gcc 16 after the changes
to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59542
2026-09-10 10:39:11 -04:00
Siva Mahadevan fead44b3ed fsck_msdosfs: remove unused variable
This fixes the build with gcc 16 after the changes
to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	delphij
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59543
2026-09-10 10:38:44 -04:00
Siva Mahadevan d1ef616302 iflib: remove unused variables
This fixes the build with gcc 16 after the changes
to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	gallatin
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59544
2026-09-10 10:38:19 -04:00
Siva Mahadevan d5047ddedd cxgb(4): remove unused variable
This fixes the build with gcc 16 after the changes
to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	np
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59545
2026-09-10 10:37:06 -04:00
Siva Mahadevan 94f7019668 ipfilter: remove unused variable
This fixes the build with gcc 16 after the changes
to -Wunused*[0].

[0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused

Reviewed by:	cy
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-09-10 10:34:56 -04:00
Siva Mahadevan 0e3dae1ca8 tests/fusefs: fix the build with gcc 16
Reviewed by:	asomers
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-09-09 09:47:39 -04:00
Siva Mahadevan a73bb621ca contrib/kyua: fix -Wshadow error
This fixes the build with gcc 14:

/usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:56:16: error: declaration of 'handler' shadows a member of 'engine::prepare::prepare_all' [-Werror=shadow]
   56 |     for (auto& handler : prepare::handlers()) {
      |                ^~~~~~~
In file included from /usr/src/contrib/kyua/engine/prepare/prepare_all.hpp:35,
                 from /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:29:
/usr/src/contrib/kyua/engine/prepare/prepare.hpp:51:15: note: shadowed declaration is here
   51 | class handler {
      |               ^

Fixes:	edb230c4af

Reviewed by:	igoro, rlibby, ngie
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59346
2026-09-05 10:12:11 -04:00
Siva Mahadevan d7ed56b0fc lib/msun/tests: remove nearbyint test xfail on riscv
PR:		290099
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-09-05 09:53:54 -04:00
Siva Mahadevan 60d78908f5 dtrace/tests: compile D sources at runtime on test target
Previously, we would precompile D test dependencies using the
host's dtrace, which unconditionally outputs ELF files in the
host's format. This breaks the cross-compile build with errors
like the following:

dtrace: failed to link script: incorrect ELF machine type for
object file: tst.usdt.pieo
--- usdt.o ---
*** Failed target: usdt.o

This patch moves compilation to runtime for all C-based testcases
that have a dependent D source file.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D59030
2026-09-02 14:18:01 -04:00
Siva Mahadevan 8fab8b3ae3 tests/netpfil: xfail ipfnat_local_redirect testcase
PR:		296944
Reviewed by:	cy
MFC after:	3 days
MFC to:		stable/15
Sponsored by:	The FreeBSD Foundation
2026-09-02 12:01:14 -04:00
Siva Mahadevan ba99013a44 tarfs: allow mounting inside jails
Reviewed by:	des
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D58833
2026-08-20 00:19:40 -04:00
Siva Mahadevan 4d52491523 tarfs: remove PRIV_VFS_MOUNT_PERM check
The backing file is already opened successfully, so there is
no need to override the permissions.

Reviewed by:	des
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D58832
2026-08-20 00:19:40 -04:00
Siva Mahadevan 3c33729ce2 rc_subr_test: ignore stderr in no_cycles test
nuageinit_user_data_script references 'firstboot_freebsd_update'
and 'firstboot_pkg_upgrade', which are from Ports. In a default
base system test without sysutils/firstboot-freebsd-update and
sysutils/firstboot-pkg-upgrade, rcorder will warn on "unknown
provisions" to stderr, but is otherwise harmless.

Reviewed by:	arrowd
Fixes:		16e47f317c
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-08-13 09:29:43 -04:00
Siva Mahadevan afa048d159 powerpc64: enable extended error strings in GENERIC64* configs
These kernconfs were missed in the previous commit.

PR:		289236
Reviewed by:	kib
Fixes:		f38cbefef8
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-07-22 09:41:53 -04:00
Siva Mahadevan 3e946566c1 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
2026-07-22 09:40:53 -04:00
Siva Mahadevan afbb7dc0a5 tests/netpfil: start ipfilter for ipfnat firewall type
This requested fix[0] was not complete before the change
was committed.

Cleans up this error message when running tests[1]:
"Cannot 'start' ipfilter. Set ipfilter_enable to YES in
/etc/rc.conf or use 'onestart' instead of 'start'."

[0] https://reviews.freebsd.org/D21065?id=60288#inline-131488
[1] https://ci.freebsd.org/job/FreeBSD-main-amd64-test/28917/testReport/sys.netpfil.common/rdr/ipfnat_local_redirect/

Fixes:		f97a8a3615
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-07-22 09:35:51 -04:00
Siva Mahadevan d0b1a38900 awk/tests: xfail inf-nan-torture on riscv64
The fix for this is being tracked upstream here:
https://github.com/onetrueawk/awk/issues/269

While here, just cd into $SRCDIR while executing tests,
since the test engine isolates every testcase's working
directory. This ensures that the xfail actually applies
to the next command.

Reviewed by:	mhorne
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-07-17 09:50:33 -04:00
Siva Mahadevan c4b0b13cad bsdinstall/netconfig: use a better heuristic for wlan dev desc
For devices like the rtw88, they will show up in `ifconfig -l` as
rtw880, rtw881, etc. We want to query the rtw88.0 and rtw88.1 sysctl
respectively, not rtw.880.

Chances are that there aren't more than 9 wlan devices using the same
driver. Use a better heuristic to get the device description.

Reviewed by:	bz
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-07-13 17:09:43 -04:00
Siva Mahadevan f7f916d755 ping: Fix bell char ordering in -A test cases
Previously, these tests expected the bell chars to arrive
before the initial status line. This appeared to be ok because
ping(8) incorrectly mixed unbuffered and buffered writes by using
printf(3) calls for the initial status, but direct write(2) calls
for the bell chars. 141bb85798 revealed that the test's assertions
only passed because the buffered writes did not get flushed before
the direct writes in the test runs.

8bda488114 fixed ping(8) to use POSIX stdio buffered writes
in all cases and guarantee a deterministic output ordering to stdout
observers. This patch fixes the test to match the correct ordering.

Reviewed by:	des
Sponsored by:	The FreeBSD Foundation
2026-06-30 09:07:59 -04:00
Siva Mahadevan 7ac9995a06 Revert "ping/tests: expect bell chars from stderr after initial status"
This reverts commit 5b8c28adb8.

The commit message was wrong.

Reported by:	des
2026-06-30 09:07:47 -04:00
Siva Mahadevan 5b8c28adb8 ping/tests: expect bell chars from stderr after initial status
After 141bb85798 and 8bda488114, ping(8) first writes and flushes the
initial status to stdout, then writes notification bell characters to stderr.

This patch corrects the expected order of the output to stdout and stderr.
This is a temporary fix; the test should be rewritten to separate the output
streams and run expectations on each individually.

Reviewed by:	des
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-06-26 18:46:09 -04:00
Siva Mahadevan 9e2d8ec2df tests/test_rtsock_l3: fix flaky temporal route addition tests
If RTM_DELETE arrives before RTM_ADD, the test will skip the first
reply and then timeout after attempting to read another message from
the rtsock_fd.

See the CI test failure[0] for more details.

[0] https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16628/testReport/sys.net.routing/test_rtsock_l3/rtm_add_v6_temporal1_success/

Reviewed by:	pouria
Fixes:		e02d3fe70c
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-06-24 11:05:11 -04:00
Siva Mahadevan 52ad4f8834 lib/msun/tests: re-enable nan_test on riscv
Commit 1e25cda7f0 fixed it.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2026-06-20 22:03:27 -04:00
Siva Mahadevan 19af9c77ac msun/logarithm_test: expect_fail log1p_accuracy_tests in the correct spot
While here, remove the conditional on the "ci" config var to ensure that
this is reproducible locally as well.

This fixes a case where we are expecting a fail before the failing ATF_CHECK_*
assertion happens. Found in a CI failure here:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16608/testReport/lib.msun/logarithm_test/log1p_accuracy_tests/

PR:		253984
Fixes:		405188aeac
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D57351
2026-06-17 13:04:54 -04:00
Siva Mahadevan 1294f332ae tests/pf/route_to: check_random: rely on test timeout to fail
This test is known to be flaky if 10 attempts happens to be
not enough for the test to pass. Usually, this test passes in ~4-6 attempts.
See https://ci.freebsd.org/job/FreeBSD-main-amd64-test/28664/testReport/junit/sys.netpfil.pf/route_to/random_table/

Rely on the timeout (default 5 mins) to catch a failure here, rather than just 10
attempts. It's very unlikely that 5 mins worth of attempts still isn't enough.

For a history of flakiness, see
https://ci.freebsd.org/job/FreeBSD-main-amd64-test/lastSuccessfulBuild/testReport/junit/sys.netpfil.pf/route_to/random_table/history/

PR:		289477
Reviewed by:	kp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D57408
2026-06-17 12:53:14 -04:00
Siva Mahadevan f38cbefef8 GENERIC: enable extended error strings on all archs
This follows commit 3296fda0c3.

PR:		289236
Reviewed by:	kib
MFC after:	3 days
2026-06-16 11:01:32 -04:00
Siva Mahadevan 0010c4b8a0 tests/sigtramp_test: xfail on non-amd64
This test fail until at least https://reviews.llvm.org/D155066 is
rebased and picked up for aarch64 and more work is done for the other
archs.

PR:		289096
Reviewed by:	jlduran
Fixes:		fef84fd8ae
MFC after:	3 days
2026-06-15 23:21:10 -04:00
Siva Mahadevan 64b053f879 memfd_test: skip hugetlb testcase when large page requests are not supported
Fixes this CI test failure: https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16606/testReport/junit/sys.posixshm/memfd_test/hugetlb/

Reviewed by:	kevans
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D57289
2026-06-10 20:08:37 -04:00
Siva Mahadevan b61ab2d693 src.opts.mk: enable OPENSSL_KTLS by default on riscv64
1e649491b8 enabled KERN_TLS in
riscv/conf/GENERIC, but didn't enable OPENSSL_KTLS.

This passes all testcases in the sys/kern/ssl_sendfile suite and
fixes CI failures seen here:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ssl_sendfile/

PR:	293810
Fixes:	1e649491b8
MFC after:	3 days
Reviewed by:	gallatin, ngie
Differential Revision:	https://reviews.freebsd.org/D57316
2026-06-10 19:30:52 -04:00
Siva Mahadevan 1e25cda7f0 libc: fix strtold NaN representation on riscv
Regenerate gd_qnan.h on riscv using the qnan.c
config tool found in contrib/gdtoa.

This fixes the following tests in CI:
lib/libc/stdio/scanfloat_test:infinities_and_nans
lib/libc/stdlib/strtod_test:strtold_nan

Reviewed by:	jrtc27
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D57405
2026-06-10 19:30:40 -04:00
Siva Mahadevan 9f2a38cf40 libc/fortify_uio_test: replace stdin in base readv tests
This fixes the readv_before_end and preadv_before_end test
timeout failures on riscv.

See https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/lastCompletedBuild/testReport/lib.libc.secure/fortify_uio_test/readv_before_end/

Reviewed by:	kevans, emaste
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D57420
2026-06-10 19:30:24 -04:00
Siva Mahadevan 432ac5c07c pf: free match rules after exiting critical section
This fixes a panic reported on armv7:

sys/netpfil/pf/counters:match_block  ->  panic: free: called with spinlock or critical section held
[...]
vpanic() at vpanic
	 pc = 0xc0321b5c  lr = 0xc02f7b5c (free+0x140)
	 sp = 0xc8c858bc  fp = 0xc8c858e0
	 r4 = 0xe2fad648  r5 = 0xe402ce78
	 r6 = 0xc8c859e8  r7 = 0x0000001c
	 r8 = 0xc8c858b4  r9 = 0xc0321b5c
	r10 = 0xc8c858bc
free() at free+0x140
	 pc = 0xc02f7b5c  lr = 0xe2f4f920 ($a+0x5f8)
	 sp = 0xc8c858e8  fp = 0xc8c85930
	 r4 = 0xe402ce68  r5 = 0xc8c8599c
	 r6 = 0xffffffff r10 = 0x0000001c
[...]
KDB: enter: panic

Consequently, this fixes armv7 CI:
https://ci.freebsd.org/job/FreeBSD-main-armv7-test/2287/consoleText

Fixes:	6353f5d9a5
Reviewed by:	kp
MFC after:	3 days
2026-06-10 17:50:27 -04:00
Siva Mahadevan a7df326619 ptrace_test: expect PT_STEP tests to fail on riscv
ptrace_single_step currently returns EOPNOTSUPP on riscv.

This temporarily fixes the following CI failures:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ptrace_test/ptrace__PT_STEP_with_signal/
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ptrace_test/ptrace__step_siginfo/

Reviewed by:	kib
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D57288
2026-05-28 12:32:42 -04:00
Siva Mahadevan a8c74d6c64 tests/ndp: fix ndp_routeinfo_option testcase flakiness
Since we are sleeping for an indefinite period of time waiting
for the default route to appear, the expire times may be gone
past 1+ seconds, causing the Expire column to show <1800 or <600.

Fixes:	f6bcc0925f

Reviewed by:	pouria
Approved by:	lwhsu (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D56712
2026-05-21 10:22:22 -04:00
Siva Mahadevan c170a96dbe universe: emit warning instead of error for bad/missing KERNCONF
When doing a large `make universe` build with multiple KERNCONFS,
it should not be an error when a particular target has a missing
KERNCONF.

In this example,

```
$ make universe TARGETS='arm64 riscv' KERNCONFS='QEMU VIRT'
```

Currently, arm64 does not have a QEMU conf, and riscv
does not have a VIRT conf. However, this command should still
succeed instead of failing with the following message:

```
make[2]: /usr/src/Makefile:767: Target architecture for riscv/conf/VIRT unknown.  config(8) likely too old.
	in .for loop from /usr/src/Makefile:761 with kernel = VIRT
	in make[2] in directory "/usr/src"

make[2]: stopped making "universe_kernels" in /usr/src
```

Since the opposite is true, we should build whatever confs are available
from the requested list of KERNCONFS, while making sure to still
emit warnings along the way.

Reviewed by:	imp
Approved by:	lwhsu (mentor), emaste (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D55571
2026-05-21 10:17:03 -04:00
Siva Mahadevan 02ef0b6d76 universe: allow moving build logs to UNIVERSE_LOGDIR
This allows `make universe` or `make tinderbox`
to build from a read-only src tree.

Reviewed by:	ziaee, imp, delphij
Approved by:	lwhsu (mentor), emaste (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D55566
2026-05-21 10:16:48 -04:00
Siva Mahadevan cb0e3a5fba contrib/openresolv: MFV openresolv 3.17.4
Reviewed by:	pfg
Approved by:	lwhsu (mentor)
Differential Revision:	https://reviews.freebsd.org/D56269
2026-04-28 15:26:59 -04:00
Siva Mahadevan 60000d94b4 tests/pf/nat: endpoint_independent: wait for tcpdump to start
This matches pflog.sh tests and fixes flaky tests found in CI[0].

[0] https://ci.freebsd.org/job/FreeBSD-main-amd64-test/28126/testReport/junit/sys.netpfil.pf/nat/endpoint_independent_exhaust/

PR:	289628
Reviewed by:	glebius
Approved by:	lwhsu (mentor)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D56145
2026-04-23 09:11:08 -04:00
Siva Mahadevan 7c9418613a sys/contrib/zstd: further narrow FREEBSD-Xlist
We don't need any docs or examples in tree, as well
as any upstream-specific build infrastructure.

Differential Revision: https://reviews.freebsd.org/D55836
2026-04-08 21:43:42 -07:00
Siva Mahadevan 43ade7d9e9 Import openresolv 3.17.4
More information at: https://roy.marples.name/projects/openresolv
2026-04-05 14:40:56 -04:00
Siva Mahadevan 922d73540d tarfs: swap deprecated ZSTD_resetDStream() with ZSTD_DCtx_reset()
ZSTD_resetDStream() is deprecated since 1.5.4: https://github.com/facebook/zstd/commit/5d8cfa6b96a6442ab1251f9de3b47a0eb12561a0

This change is needed to MFV zstd 1.5.7.

Approved by:	emaste (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D55835
2026-03-14 11:34:03 -04:00
Siva Mahadevan 736d8852e1 tests/fusefs: fix sign-compare warning on armv7
Fixes:		7e68af7ce2
Reviewed by:	asomers
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D55846
2026-03-14 11:32:16 -04:00
Siva Mahadevan f26cb4757e LinuxKPI: avoid -Werror=unused-value in sort() from BUILD_BUG_ON_ZERO()
The BUILD_BUG_ON_ZERO() macro returns an (int)0 if it does not fail
at build time. LinuxKPI sort() has it as a guard for an unsupported
argument but ignores the return value.

This leads to gcc complaining:

/usr/src/sys/compat/linuxkpi/common/include/linux/build_bug.h:60:33: error: statement with no effect [-Werror=unused-value]
   60 | #define BUILD_BUG_ON_ZERO(x)    ((int)sizeof(struct { int:-((x) != 0); }))
      |                                 ^
/usr/src/sys/compat/linuxkpi/common/include/linux/sort.h:37:9: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
   37 |         BUILD_BUG_ON_ZERO(swap);                        \
      |         ^~~~~~~~~~~~~~~~~
/usr/src/sys/contrib/dev/rtw89/core.c:2575:9: note: in expansion of macro 'sort'
 2575 |         sort(drift, RTW89_BCN_TRACK_STAT_NR, sizeof(*drift), cmp_u16, NULL);

Change to BUILD_BUG_ON() for the statement version.

Reported by:	CI
Co-authored-by:	bz
Approved by:	emaste (mentor)
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D55634
2026-03-03 14:19:32 -05:00
Siva Mahadevan c721ceeb3e syslogd/tests: use kern.features to detect INET support
This fixes INET feature detection with kernel configs
that do not include the kern.conftxt sysctl, such as
riscv64 currently[0].

[0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/usr.sbin.syslogd/syslogd_forwarded_format_test/O_flag_bsd_forwarded_legacy/

Reviewed by:	markj
Approved by:	emaste (mentor)
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D55383
2026-02-19 15:53:26 -05:00
Siva Mahadevan 1e649491b8 riscv: GENERIC: enable KERN_TLS
This unskips 585 sys/kern/ktls_test testcases[0] in CI. All 585 tests currently pass.

[0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/sys.kern/

Approved by:		emaste (mentor)
MFC after:		3 days
Sponsored by:		The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D55376
2026-02-19 15:10:02 -05:00
Siva Mahadevan 5fa297f4bc mixer/tests: use require.kmods property instead of ad-hoc checks
Reviewed by:	christos
Approved by:	lwhsu (mentor)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D55221
2026-02-12 10:01:57 -05:00
Siva Mahadevan fbe6da7f75 libnv/tests: unskip nvlist_send_recv__send_many_fds__dgram
The test passes consistently for 1000+ consecutive iterations.

PR:		260891
Reviewed by:	oshogbo
Approved by:	lwhsu (mentor)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D55223
2026-02-12 10:01:57 -05:00
Siva Mahadevan 8352e24d0b tests/ktest_netlink_message_writer: remove INVARIANTS requirement
INVARIANTS is meant to be used to enable extra sanity checking for
internal structures, not enable/disable tests in the freebsd kyua
test suite.

STABLE branches include a GENERIC kernconf without INVARIANTS, so
ktest_netlink_message_writer is broken on such branches:

https://ci.freebsd.org/job/FreeBSD-stable-15-amd64-test/253/testReport/sys.netlink.test_netlink_message_writer/py/__test_cases_list__/

Reviewed by:	lwhsu, imp
Approved by:	lwhsu (mentor)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1889
MFC after:	3 days
Signed-off-by:	Siva Mahadevan <[email protected]>
Sponsored by:	The FreeBSD Foundation
2026-01-22 14:49:51 -05:00
Siva Mahadevan 1d819aad17 mailmap: translate siva@'s personal email
Reviewed by:		lwhsu
Approved by:		lwhsu (mentor)
Differential Revision:	https://reviews.freebsd.org/D54744
2026-01-16 13:23:09 -05:00
Siva Mahadevan 33f2f3049a committers-src: add myself (siva@)
Reviewed by:		lwhsu
Approved by:		lwhsu (mentor)
Differential Revision:	https://reviews.freebsd.org/D54744
2026-01-16 13:22:32 -05:00
Siva Mahadevan 2812c917e0 Cirrus-CI: Bump to FreeBSD 15.0-RELEASE
Signed-off-by: Siva Mahadevan <[email protected]>
Reviewed by: asomers
Pull request: https://github.com/freebsd/freebsd-src/pull/1929
Sponsored by:  The FreeBSD Foundation
2025-12-17 09:06:59 -05:00
Siva Mahadevan 405188aeac lib/msun/tests: xfail remaining failing tests on non-x86 archs
These are the remaining trivial xfail cases where no other
test logic changes are necessary.

Signed-off-by: Siva Mahadevan <[email protected]>
PR:		290099
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1871
2025-12-17 18:43:37 +08:00
Siva Mahadevan de601d5bf5 lib/msun/tests: xfail failing lrint_test cases on non-x86 archs
Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and avoid
unexpected aborts.

Signed-off-by: Siva Mahadevan <[email protected]>
PR:		290099
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1871
2025-12-17 18:43:32 +08:00
Siva Mahadevan 5a0617454e lib/msun/tests: xfail failing invtrig_test cases on non-x86
Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and avoid
unexpected abort.

PR:		290099
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1871
2025-12-17 18:43:24 +08:00
Siva Mahadevan 6c18c40b29 lib/msun/tests: xfail fe_round on riscv64
Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and
avoid unexpected aborts.

Signed-off-by: Siva Mahadevan <[email protected]>
PR:		290099
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1871
2025-12-17 18:43:19 +08:00
Siva Mahadevan a9b1650f90 lib/msun/tests: Add REQUIRE_ variants of test-utils macros
Signed-off-by: Siva Mahadevan <[email protected]>
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1871
2025-12-17 18:43:14 +08:00
Siva Mahadevan ec640742e3 lib/msun/tests: Remove newlines in ATF msgs
This fixes broken test reports with the following message:

lib/msun/fe_round_test:fe_round  ->  broken: Test result contains
multiple lines: expected_failure:
/usr/src/contrib/netbsd-tests/lib/libm/t_fe_round.c:95: Didn't get the
same rounding mode out!<<NEWLINE>>(index 0) fed in 64 rounding mode, got
0 out<<NEWLINE>>  [0.079s]

Signed-off-by: Siva Mahadevan <[email protected]>
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1871
2025-12-17 18:43:06 +08:00
Siva Mahadevan d03c9b8f66 lib/msun/tests: Replace remaining printf() with debug()
Signed-off-by: Siva Mahadevan <[email protected]>
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1871
2025-12-17 18:42:53 +08:00
Siva Mahadevan 66d2816407 tests/lorder_test: Add require.progs for nm and cc
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1858
2025-12-17 18:32:17 +08:00
Siva Mahadevan 2cd31bd8fa makefs/tests: Use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1870
2025-12-17 01:13:47 +08:00
Siva Mahadevan 681e9d3e39 Unskip test sys.netinet6.frag6.frag6_07.frag6_07
This is now consistently passing with 100+ consecutive runs.

Signed-off-by: Siva Mahadevan <[email protected]>
PR:		244170
MFC after:	3 days
Sponsored by: The FreeBSD Foundation
2025-12-17 00:39:14 +08:00
Siva Mahadevan 7a83fedc11 tests/if_lagg_test: unskip 'witness' testcase
This testcase passes consistently (in 100+ runs) now.

Signed-off-by:	Siva Mahadevan <[email protected]>
PR:		244163, 251726
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2025-12-16 18:20:44 +08:00
Siva Mahadevan e93e57d3da tests/fibs_test: unskip udp_dontroute6 testcase
This test now consistently passes (300+ consecutive runs).

Signed-off-by:	Siva Mahadevan <[email protected]>
PR:		244172
Sponsored by:	The FreeBSD Foundation
2025-12-16 18:15:30 +08:00
Siva Mahadevan 27ff0bbcfd libc/limits_test: add no-op testcase to satisfy kyua
This test suite is purely tested with compile-time assertions, so
it needs a dummy runtime test to ensure that kyua reports the
file as passing.

Pull Request:	https://github.com/freebsd/freebsd-src/pull/1915
Sponsored by:	The FreeBSD Foundation
Reviewed by:	fuz
Approved by:	markj (mentor)
MFC after:	1 month
Signed-off-by:	Siva Mahadevan <[email protected]>
2025-12-05 15:12:46 +01:00
Siva Mahadevan f66068d937 Add glabel tests to mtree
Fixes:		e868a20266: glabel: add a basic test.
Submitted by:	Siva Mahadevan
Pointy hat to:	brd
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1877
2025-10-17 20:55:35 -06:00
Siva Mahadevan 1ddff51060 regex/exhaust_test: Skip flaky 'regcomp_too_big' testcase on all archs
PR: 259971
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
2025-10-17 10:24:01 -04:00
Siva Mahadevan 79042fd7ed tests/mac_ipacl: restore sysctls after modification
While here, use 'required_kmods' instead of ad-hoc
checks.

Signed-off-by: Siva Mahadevan <[email protected]>

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull request:	https://github.com/freebsd/freebsd-src/pull/1856
2025-10-08 14:34:41 +00:00
Siva Mahadevan 170aac9347 tests/mac_portacl: restore sysctls after modification
While here, use 'required_kmods' instead of ad-hoc
checks.

Signed-off-by: Siva Mahadevan <[email protected]>

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1855
2025-10-08 14:34:09 +00:00
Siva Mahadevan 65e2ce55b6 vmimage.subr: fix typo in checking NO_ROOT var
Reviewed by: imp
Fixes: 08b497dc6c ("vmimage.subr: Support NO_ROOT pkgbase")
Signed-off-by: Siva Mahadevan <[email protected]>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1867
Sponsored by: The FreeBSD Foundation
2025-10-03 10:23:07 -04:00
Siva Mahadevan 87a7b35f04 bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid
Signed-off-by: Siva Mahadevan <[email protected]>
PR: 266374
Pull request: https://github.com/freebsd/freebsd-src/pull/1851
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
2025-09-19 12:02:57 -04:00
Siva Mahadevan df997faca8 atf_pytest: fix xfail detection from pytest report
The location of the 'wasxfail' attribute was moved from
the 'reason' attribute back to the parent 'report'. This
fixes an issue where xfails are wrongly reported to ATF
as skipped tests.

Signed-off-by: Siva Mahadevan <[email protected]>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1849
Sponsored by: The FreeBSD Foundation
2025-09-18 09:01:14 -04:00
Siva Mahadevan f53228c4e3 tests/vmm_cred_jail: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:23 -06:00
Siva Mahadevan 427be10491 tests/sys/netinet: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:23 -06:00
Siva Mahadevan 4079513328 tests/sys/net: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:23 -06:00
Siva Mahadevan 7a1a6d1e2a tests/socket_accf: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:22 -06:00
Siva Mahadevan 74898ce961 tests/sndstat: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:22 -06:00
Siva Mahadevan 559b0f6b82 tests/sys/netmap: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:22 -06:00
Siva Mahadevan c444bfca00 tests/pf/ioctl: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:22 -06:00
Siva Mahadevan 26d3dfa873 tests/sys/aio: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:22 -06:00
Siva Mahadevan 308c9c9957 tests/sys/opencrypto: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:22 -06:00
Siva Mahadevan 215a065418 tests/sys/netlink: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:22 -06:00
Siva Mahadevan cacfd42b0c tests/sys/mqueue: use require.kmods property instead of ad-hoc checks
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1780
2025-09-05 12:42:21 -06:00
Siva Mahadevan 178b9c2364 tests/ci: Add missing kmods and pkgs to unskip tests
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D51309
2025-08-14 05:05:09 +08:00
Siva Mahadevan ad9b27e097 tests/ci: style: canonicalize, sort, and multiline kmods/pkgs
This helps to remove ambiguity and reduce future diffs of changes
to the VM_EXTRA_PACKAGES list.  Also sort kld_list.

Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D51308
2025-08-14 05:01:26 +08:00
Siva Mahadevan e990e460d5 tests/ci: Fix unescaped kld_list var in rc.conf
Signed-off-by: Siva Mahadevan <[email protected]>
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D51305
2025-08-14 04:22:04 +08:00
Siva Mahadevan 92a7f2d577 tests/ci: Add KYUA_TEST_FILTERS to allow user to select specific tests
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D51306
2025-08-14 04:11:09 +08:00