Commit Graph
6283 Commits
Author SHA1 Message Date
Faraz Vahedi 0f8941fedc tools/regression: Expand stdatomic conformance tests
Extend the existing test utility to cover recent stdatomic
changes and improve validation of interface semantics,
compile-time assertions, and behavioural conformance.

Signed-off-by: Faraz Vahedi <[email protected]>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2185
2026-06-19 18:23:29 -06:00
Stefan Eßer b440741db4 tools/test/stress2/misc/msdos12.sh: fix permission issue
This test runs with rights of an un-privileged user writing to a file
system only writable by the owner. Since no UID was provided in the
mount command, the owner of the file system was "root", and thus
writing was not allowed for $testuser. Fix this issue by mounting
with "-u $testuser".

MFC after:	3 days
2026-06-11 13:48:49 +02:00
Stefan Eßer 3260c42c41 tools/test/stress2/misc/all.exclude: remove msdos24.sh
Remove test for UFC-16 surrogate pairs in file names from this exclude
list, since kernel support has been committed and the test can be now
expected to succeed.

MFC after:	3 days
2026-06-11 13:39:19 +02:00
Stefan Eßer 596dadbbb5 tools/test/stress2/misc/msdos24.sh: improve surrogate pair test
Instead of varying only the low surrogate do also randomly choose a
suitable high surrogate.

MFC after:	3 days
2026-06-11 13:36:09 +02:00
Stefan Eßer 6e5b990c50 tools/test/stress2/misc/all.debug.inc: skip undefined variables
On my ZFS based systems, no allocations occur with tags "newblk" or
"freework". This leads to errors executing the tests that check for
memory leaks. Skip the checks if the output of wmstat -m does not
contain lines corresponding to those allocations.

MFC after:	3 days
2026-06-11 13:15:12 +02:00
Robert Clausecker 93221c2776 depend-cleanup.sh: rebuild strrchr.o on riscv64 if it came from strrchr.S
We have to switch back to the previous rule once the temporary
build fix has been replaced with a permanent fix.

PR:		295823
See also:	4996ebdb72
Reported by:	siva
MFC after:	1 week
2026-06-07 23:00:25 +02:00
Stefan Eßer 11f23d7c07 tools/test/stress2/misc: Fix and enable new tests
The previously committed versions of these tests failed to prevent
duplicate file names in the list of files to process, leading to
missing files when a "mv" commando tried to operate on a file that
had already been renamed.

The test for filenames containing UTF-16 surrogate pairs stays
disabled, since the required kernel changes have not been committed,
yet.
2026-05-30 01:10:35 +02:00
Stefan Eßer aa029088ec tools/test/stress2/misc: Add msdosfs tests (currently failing)
Test msdos22.sh creates 1000 files with long random names consisting
of only ASCII characters. The mount is performed without -L option,
therefore no use of iconv to convert between character sets.

Test msdos23.sh mixes some non-ASCII characters into the file names.
The file system is therefore mounted with -L C.UTF-8 to include tests
of the conversions between UTF-8 and UTF-16.

Test msdos24.sh adds emojis to the names to test the (not yet
committed) support of UTF-16 surrogate pairs in filenames.

All 3 tests succeed with a small number of files (e.g., 10), but fail
most of the time when testing with 1000 files.

The tests have been added to all.exclude since they are expected to
fail. They shall be enabled as regression tests, when the msdosfs code
has been fixed.
2026-05-29 18:15:33 +02:00
Jose Luis Duran f1de8e3511 nanobsd: Register the boot.config file in the metalog
Ensure that the boot.config file gets an entry in the metalog by
tgt_touch()ing it.  If a file is not present in the metalog, it gets
excluded from the final image when using "-U" (unprivileged builds).

MFC after:	2 weeks
2026-05-27 00:25:10 +00:00
Jose Luis Duran 5435998230 nanobsd: Adjust the order of the flags in makefs
The order of the flags matter in makefs(8). The -t (type) flag must come
before the -o (options) flag; otherwise, the options are reset.

Move the -t flag before the -o flag and remove the shim function
_xxx_adjust_code_size() that was created to align to the default makefs
FFS values.

It effectively prevented us from generating NanoBSD images using
unprivileged builds with the partitions internally aligned as intended.

Reviewed by:	senguptaangshuman17_gmail.com, imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57226
2026-05-27 00:24:26 +00:00
Jose Luis Duran c579927ac5 nanobsd: Use makefs -R flag to honor rounded sizes
Switch from the min/max size flag (-s) to the round-up flag (-R) when
invoking makefs(8).

Because the partition sizes passed to nano_makefs have already been
rounded up by calculate_partitioning(), using -s can cause makefs to try
to perform sizing adjustments that usually result in failures.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57225
2026-05-27 00:23:46 +00:00
Jose Luis Duran ca2d4026c3 nanobsd: Fix code image size formatting
mkimg(8) parses sizes using expand_number(3).  It is an error to use "b"
as a suffix.  This is the result of a confusion with makefs(8), which
uses NetBSD's strsuftoll(3).

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57224
2026-05-27 00:23:05 +00:00
Jose Luis Duran 87150a2ed1 nanobsd: Refactor secondary code partition logic
Rearrange the conditional logic for building the secondary code slice
(altroot).

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57223
2026-05-27 00:22:39 +00:00
Jose Luis Duran 318a85d4b2 nanobsd: Explicitly set image size and secsz in mkimg
When building an unprivileged NanoBSD image, explicitly set the desired
image size, by passing --capacity to mkimg in bytes, and the logical
sector size (-S) to 512 bytes.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57222
2026-05-27 00:21:57 +00:00
Jose Luis Duran f1de49f508 nanobsd: Offset code partition to a track boundary
Ensure the primary and secondary code partitions start at a proper track
boundary by applying a NANO_SECTS offset in bytes.

While track-boundary alignment is largely obsolete on modern storage,
this change maintains compatibility with current images (legacy).  A
future commit will transition to 1 MiB alignment boundaries.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57221
2026-05-27 00:15:39 +00:00
Jose Luis Duran dadbbccd80 nanobsd: Account for metadata overhead in code slice
The code slice size (CODE_SIZE) includes 16 sectors reserved for disk
metadata (see bsdlabel(8) offset).  Subtract these 16 sectors from the
total size passed to nano_makefs.

This prevents the generated filesystem from consuming the entire slice
allocation, ensuring there is enough space for the metadata without
overflowing the partition boundary.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57220
2026-05-27 00:14:56 +00:00
Jose Luis Duran beddf2c591 nanobsd: Use rounded sizes for cfg and data slices
Use the calculated (rounded up) cfg and data sizes from the
_.partitioning file, instead of consuming them directly from the global
variables.  We obtain the size of the cfg and data slices by explicitly
searching for index 3 and 4 respectively in the _.partitioning file.

This ensures that the final image has the rounded-up sizes, and not the
raw sizes.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57219
2026-05-27 00:14:09 +00:00
Jose Luis Duran d2a9ad033c nanobsd: Remove spurious exit call
Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57217
2026-05-27 00:13:47 +00:00
Jose Luis Duran 9d133c7640 nanobsd: Get the code size by its partition index
Previously the code was assumed to be on the on the first line of the
_.partitioning file.  Instead, explicitly look up the size by its
partition index to make the parsing order-independent.

The _.partitioning file:

1. First column: starting sector.
2. Second column: size in 512-byte sectors.
3. Third column: partition index.

Get the code size by explicitly selecting when the partition index is 1.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57216
2026-05-27 00:13:15 +00:00
Jose Luis Duran 689f7466c1 nanobsd: Use NANO_IMG1NAME
Do not hard-code _.disk.image, use NANO_IMG1NAME instead.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57040
2026-05-27 00:12:48 +00:00
Jose Luis Duran 1dac971fbd nanobsd: Minor style fixes
- Use $(...) notation instead of legacy backticked `...`
- Use tabs for indentation
- Indent continuation lines with 4 spaces

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57039
2026-05-27 00:12:07 +00:00
Adrian Chadd 490c53e935 net80211: add initial README.md and PROTOCOL.md
* Add top level README.md, linking to in progress and todo items
* Add an 802.11 protocol overview, with todo items - this is designed
  to provide a basic introduction to 802.11 for people wishing to work
  on net80211 and drivers.
* DEBUG.md - cover the debug API
* DATAPATH_TRANSMIT.md - transmit datapath
* DATAPATH_RECEIVE.md - receive datapath
* PROTOCOL.md - a high level (for values of "high") overview of
  the 802.11 protocol and where it intersects with net80211

Differential Revision: https://reviews.freebsd.org/D56760
2026-05-24 18:32:33 -07:00
Konstantin Belousov ea72f6d5a8 sys/cdefs.h: move __BEGIN_DECLS/__END_DECLS into a helper sys/_decls.h
There are situations where nothing from sys/cdefs.h is needed except for
the declaration braces.  More, the other facilities from sys/cdefs.h
might unnecessarly pollute the namespace.

Reviewed by:	markj, imp
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56889
2026-05-10 21:14:18 +03:00
Mark Johnston 54625dfb36 git-arc: Update the usage message to mention create -d
Fixes:	448ec129bc ("git-arc: Add a create-draft mode")
2026-05-07 17:18:32 +00:00
Alex Richardson 3daa43b1bb sys: Make priority.h and rtprio.h include all dependencies
This ensures this header can be included without an explicit or implicit
sys/types.h include first. This causes issues building SPEC2017 which
includes sys/rtprio.h and then we get an error due to missing u_char
definition.

Reviewed by:	emaste
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D52041
2026-05-06 21:23:03 -07:00
Dag-Erling Smørgrav 67a63eae7b bc: Fix tests
Stop generating test scripts at build time.  The dc test script is
broken and simply fixing the code that generates it won't help as there
is no reliable way to ensure it gets regenerated if it already exists in
the object tree.

MFC after:	1 week
Reviewed by:	se
Differential Revision:	https://reviews.freebsd.org/D56511
2026-04-29 17:15:30 +02:00
Adrian Chadd 4c99836ac7 kerneldoc: also ingest .md (markdown files)
The doxygen tooling has supported ingesting markdown files for a number
of years.  Adding this option allows them to be ingested into the
subsys builds.

Reviewed by:	netchild
Differential Revision:	https://reviews.freebsd.org/D56652
2026-04-29 07:58:19 -07:00
Lexi Winter c4b244af42 acpi: Remove userland bits on non-ACPI platforms
ACPI is only supported on amd64, arm64 and i386.  Don't install the
power_profile rc script or devd configuration on other platforms.

This avoids creating a useless FreeBSD-acpi package on those platforms.

MFC after:	2 weeks
Reviewed by:	imp
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D56650
2026-04-28 20:50:41 +01:00
Mark Johnston 448ec129bc git-arc: Add a create-draft mode
Make it possible to create a review without publishing it.  This should
be useful when one wants to restrict the visibility of a review, as that
cannot be done via the command line.  Note that a draft review is still
publicly visible if one can guess the URL, but creating one does not
result in email notifications to subscribers etc., nor does a draft
appear in the creating user's activity log.

Once a draft is ready, one can publish it via the web UI.

Reviewed by:	jrm
Differential Revision:	https://reviews.freebsd.org/D56664
2026-04-28 14:02:58 +00:00
Ed Maste ea27ec183d makeman.lua: Downgrade make showconfig error to warning
The sh-based makeman silently ignored errors from `make showconfig`.
Ignore errors also from makeman.lua (but emit a warning).

We may want to revisit this in the future, but want makeman.lua to
behave identically for now.

PR:		294822
Reviewed by:	kevans
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56663
2026-04-27 15:21:12 -04:00
Dag-Erling Smørgrav 1abfe75860 depends-cleanup: Fix typos in comment
Fixes:		4dd97955e6 ("libpkgconf: Fix paths")
2026-04-26 20:14:37 +02:00
Lexi Winter b7daab8be1 apm: Only install rc script on i386
The apm(8) rc script only works on i386, but it's installed on all
platforms.  Only install it on i386, which avoids creating a useless
FreeBSD-apm package on other platforms.

While here, build the acpi package on i386.

MFC after:	2 weeks
Reviewed by:	imp
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D56629
2026-04-26 17:47:27 +01:00
Dag-Erling Smørgrav 4dd97955e6 libpkgconf: Fix paths
${LOCALBASE:U} evaluates to exactly the same thing as ${LOCALBASE}.
Presumably what was meant was ${LOCALBASE:U/usr/local}.

Fixes:		b8352da33f ("pkgconf: import into the base system")
Reviewed by:	khorben
Differential Revision:	https://reviews.freebsd.org/D56642
2026-04-26 15:41:47 +02:00
Dimitry Andric e64bea71c2 Merge llvm-project release/21.x llvmorg-21.1.7-0-gcd708029e0b2
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/21.x llvmorg-21.1.7-0-gcd708029e0b2,
a.k.a. 21.1.7 release.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:02 +02:00
Dimitry Andric 770cf0a5f0 Fixups after llvm-project main llvmorg-21-init-19288-gface93e724f4 merge
Fix various configuration fails, update generated headers, Makefiles, etc.

PR:		292067
MFC after:	1 month
2026-04-25 16:11:52 +02:00
Enji Cooper 944a4de2d2 Remove cam.d when MK_DTRACE == no
MFC with:	efb77950fd
Fixes:	efb77950fd ("dtrace: Add definitiosn for the cam dtrace provider")
Differential Revision:	https://reviews.freebsd.org/D56588
2026-04-24 13:45:13 -07:00
Ali Mashtizadeh 70ae0c4524 i386: Remove perfmon performance monitoring facility
Remove the perfmon performance monitoring facility that was for Intel
Pentium and Pentium Pro processors.

Reviewed by: imp,mhorne,emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/2155
2026-04-24 10:23:05 -06:00
Enji Cooper fb7df70a47 Remove all of /usr/tests/share/examples/... when MK_EXAMPLES == no
- Remove the generated files (`file1`).
- Remove the top-level example `Kyuafile`.

MFC after:	1 week
2026-04-22 14:08:04 -07:00
Enji Cooper b9495bd8c1 Preen/update list for share/examples/sound under MK_EXAMPLES
- Update sources to match current installed files list. This involved
  adding and removing some example files.
- Sort the list alphabetically so it'll be easier to spot future updates.

MFC after:	1 week
2026-04-22 14:00:52 -07:00
Enji Cooper ab53a4e9b9 Remove /usr/share/examples/oci when MK_EXAMPLES == no
MFC after:	1 week
Fixes:		d03c82c28d ("release: add optional OCI images")
2026-04-22 13:53:24 -07:00
Pierre Pronchery b8352da33f pkgconf: import into the base system
This introduces the following option:

* MK_PKGCONF: determines if pkgconf and bomtool should be built

The objective is to allow the creation of SBOM information while
building FreeBSD's src tree. The build system cannot rely on the
presence of bomtool (and eventually also spdxtool) in the build
environment, except for having it as part of the src tree directly.

The framework implementing the generation of SBOM files is under review
in D56474.

This will also help simplifying the build, with the introduction of
another framework relying on the availability of pkgconf.

Sponsored by:		Alpha-Omega, The FreeBSD Foundation
Reviewed by:		bapt, philip
Approved by:		philip (mentor)
Differential Revision:	https://reviews.freebsd.org/D56404
2026-04-22 15:42:56 +02:00
Kyle Evans 8bbba9f681 makeman.lua: catch up to REQUIRED_OPTIONS change
161f8edc65 ("bsd.mkopt.mk: Prepare a list of all build options")
restructured things and now we should simply strip the leading double
underbar.  This fixes the oddity noticed in
4ed20e0236 ("kshim/usb: Add build option."), where WITH_CASPER made
a surprise appearance.

This is a part of D56558, but not the meat of the change.

Reviewed by:	emaste, imp
2026-04-21 21:32:23 -05:00
Alexander Leidinger 315f665fe1 Doxygen subsystem config: exclude the content of the .git directory 2026-04-19 14:46:35 +02:00
Warner Losh 4ed20e0236 kshim/usb: Add build option.
Add WITH{,OUT}_LOADER_USB to build the kshim usb library. Nothing
in-tree uses it, but this will make it easier to keep building. Updated
src.conf.5 with a few extra changes...

Sponsored by:		Netflix
2026-04-17 20:41:43 -06:00
Pouria Mousavizadeh Tehrani 87bea33a67 nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options
The draft-ietf-6man-ipv6only-flag has been obsoleted by RFC 8925.
Remove the EXPERIMENTAL compile option from the kernel and remove
DRAFT_IETF_6MAN_IPV6ONLY_FLAG from userland.
This compile option was not enabled by default.
Also regenerate src.conf.5.

Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D56228
2026-04-10 23:42:09 +03:30
Warner Losh 428034ad0d sys/kobj.h: Make self-sufficient
kobj.h just needs sys/types.h (because it uses u_int, it can't use
sys/_types.h). kobj.h isn't a standard thing, so we don't need to be
careful about namespace pollution.

Sponsored by:		Netflix
2026-04-09 17:37:21 -06:00
Lexi Winter 0dd9c4abf0 tools/build/Makefile: Always add md4.h to SYSINCS
Since libmd was added to the bootstrap, building main on stable/14
fails because of an incompatibility in its old md4.h.  Fix this by
always including md4.h in the bootstrap headers, instead of only
doing so when building on a non-FreeBSD host.

Fixes:		50de0bf505 ("flua: Always build as a bootstrap tool")
Reported by:	olce
Reviewed by:	olce, kevans
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D56327
2026-04-09 15:30:20 +01:00
Gordon Bergling 3957e233dd shlib-compat: Fix two typos in error messages
- s/implemeted/implemented/

MFC after:	3 days
2026-04-04 09:11:11 +02:00
Lexi Winter ab9257599a Remove WITHOUT_BZIP2, WITHOUT_BZIP2_SUPPORT
WITHOUT_BZIP2_SUPPORT only affects a single binary, gzip(1); it doesn't
remove bzip2 support from other bits (e.g., libarchive) and there are
no similar options for gzip, xz or zstd.

WITHOUT_BZIP2 has not done anything at all since it was first added
in 2007.

MFC after:	never
Discussed on:	arch@
Reviewed by:	imp, des, adrian, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D56148
Sponsored by:		https://www.patreon.com/bsdivy
2026-04-03 14:50:09 +01:00
Ed Maste 9b1f77e647 Makefile.inc1: Drop AS and RANLIB variables
These are not used in our world and kernel build targets.  We use the
compiler driver for assembly, and ar adds the archive index (symbol
table) automatically.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55964
2026-03-31 13:18:32 -04:00