system(3): Use plural form of 'command'
Pick the plural form in the sentence about running arbitrary commands in
the security consideration section.
PR: 294497
Event: Halifax Hackathon 202606
Location: Couch
sys/systm.h: use __nodiscard consistently and correctly
__nodiscard is closer to (and sometimes expands to) [[nodiscard]] from
C23 and C++17 so prefer it to the homegrown __result_use_check and put
it in the right place so it is correct when expanded to [[nodiscard]].
Reviewed by: markj, emaste
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D57882
cdefs(9): encourage __nodiscard over __result_use_check
__nodiscard is closer to (and sometimes expands to) [[nodiscard]] from
C23 and C++17 so prefer it to the homegrown __result_use_check.
When __nodiscard does expand to [[nodiscard]] it must appear entierly
before the function declaration (or between the function name
and argument list) so relocate as appropriate. This differs from
__attribute__((__warn_unused_result__)) used by __result_use_check which
is more flexible.
Reviewed by: imp, markj, emaste
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D57881
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 <me at svmhdvn.name>
PR: 290099
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1871
(cherry picked from commit 405188aeac540f7666dfde37c2f32d222119f56e)
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 <me at svmhdvn.name>
PR: 290099
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1871
(cherry picked from commit de601d5bf5c6d2409134abc4638c7a0818cc896e)
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 <me at svmhdvn.name>
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1871
(cherry picked from commit ec640742e30270098f8d982c1c0838f2dfde9ad5)
Unskip test sys.netinet6.frag6.frag6_07.frag6_07
This is now consistently passing with 100+ consecutive runs.
Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
PR: 244170
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 681e9d3e391f30a512c523514f69a63c9782a901)
tests/if_lagg_test: unskip 'witness' testcase
This testcase passes consistently (in 100+ runs) now.
Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
PR: 244163, 251726
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7a83fedc116d827cc9c6d8e049b785f1d7b68dcd)
tests/fibs_test: unskip udp_dontroute6 testcase
This test now consistently passes (300+ consecutive runs).
Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
PR: 244172
Sponsored by: The FreeBSD Foundation
(cherry picked from commit e93e57d3da2ea54598b5db01cc12a3acd656faba)
tests/mac_portacl: enable is_exclusive for now
Both tests rely on ports 77 and 7777 to be available
and thus cannot be run concurrently. This is a temporary
measure to ensure that they don't conflict with each other.
In the future, these should be rewritten to wait until the
necessary ports are available, or deterministically select a
free port instead.
Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1790
(cherry picked from commit 5dadfac51c3876b0ba6fde831cb4417594167fed)
tests/sys/netpfil: unskip tests that no longer need to be skipped
All of these are passing consistently in the latest CI environment
in 15 back-to-back test runs.
Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
PR: 260458, 260459, 260460, 264805
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1788
(cherry picked from commit 6ff78a63d8cd0dd64ae79cbda5cb03572c1e17f5)
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
(cherry picked from commit 1e25cda7f06923d05e28dac8eb1c1c428a5c92dc)
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
[15 lines not shown]
syscalls.master: Allow clock_nanosleep in capability mode
It is akin to nanosleep(2) and does not access global namespaces.
It should be permitted in capability mode.
Reviewed by: vangyzen
Fixes: 3f8455b0905a ("Add clock_nanosleep()")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57343
(cherry picked from commit 692b0ef1506ba51b72d0a2707cbf8879a6e01d78)