Commit graph

7137 commits

Author SHA1 Message Date
Jose Luis Duran
c587e4c7e4
mtree: Add missing flua/freebsd/sys entry
Reviewed by:	imp
Approved by:	emaste (mentor)
Fixes:	de1d7d7b87 ("flua: add freebsd module implementing kldload/kldunload")
Differential Revision:	https://reviews.freebsd.org/D48838
2025-02-05 19:53:23 +00:00
Jose Luis Duran
16197cf147
mtree: Add missing ossl-modules entry
Reviewed by:	imp
Approved by:	emaste (mentor)
Fixes:	b077aed33b ("Merge OpenSSL 3.0.9")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48837
2025-02-05 19:53:23 +00:00
Jose Luis Duran
d10deaea12
mtree: Add missing libxo/encoder path
Reviewed by:	imp
Approved by:	emaste (mentor)
Fixes:	d1a0d267b7 ("Upgrade libxo to 0.4.5.")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48836
2025-02-05 19:53:23 +00:00
Jose Luis Duran
01ff67f4bd
mtree: TESTSBASE directory always starts with a /
Remove the extra forward slash ("/"), otherwise the mtree specification
file will have the double slash and will not be parsed by makefs when
attempting to build NanoBSD with NO_ROOT privileges.

Fixes:	07670b30fa ("Create /usr/tests *.debug file directory hierarchy")
Reviewed by:	emaste
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D47722
2025-01-24 23:10:05 +00:00
Jose Luis Duran
e7142d455e
mtree: Align BSD.usr.dist keywords
Reviewed by:	emaste
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D47721
2025-01-24 23:09:41 +00:00
Alexander Motin
e6c96c7af7 Revert "isp: Fix abort issue introduced by previous commit"
This reverts commit 1f7c379c07.

Leaked unintended changes.  I'm sorry.
2025-01-08 13:20:09 -05:00
Alexander Motin
1f7c379c07 isp: Fix abort issue introduced by previous commit
Aborting ATIO while its CTIOs are in progress makes impossible to
handle their completions, making them stuck forever.  Detect this
case by checking ctcnt counter and if so instead of aborting just
mark the ATIO as dead to block any new CTIOs.  It is not perfect
since the task id can not be reused for some more time, but not
as bad as the task stuck forever.

MFC after:	1 week
2025-01-08 13:04:34 -05:00
Dag-Erling Smørgrav
4285e024ba strptime: Fix day-of-week calculation.
The day-of-week calculation used the raw year value without adjusting
for TM_YEAR_BASE, so it was off by one for 300 years out of every 400;
it just happened to be correct for 1901 through 2000.  It also used a
loop where a simple addition would have sufficed.

While here, simplify our version of Gauss's algorithm, and document
that we assume the Gregorian calendar.

MFC after:	1 week
PR:		282916
Reviewed by:	imp, allanjude, philip
Differential Revision:	https://reviews.freebsd.org/D47977
2024-12-09 13:38:22 +01:00
Jose Luis Duran
f08dfd819b
mtree: Add missing entries in BSD.tests.dist
Reviewed by:	emaste, christos
Approved by:	emaste (mentor)
Fixes:	95eb4b873b ("sound tests: Add sndstat nvlist ATF test")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47724
2024-11-27 16:10:45 +00:00
Jose Luis Duran
4b8e65d12f
mtree: Fix BSD.tests.dist sorting
Reviewed by:	imp
Approved by:	emaste (mentor)
Fixes:	60d717baf2 ("ctl: add some ATF tests for READ BUFFER")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47719
2024-11-27 16:10:10 +00:00
Mark Johnston
73465bb47b savecore: Add a livedump regression test
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D47715
2024-11-25 21:12:51 +00:00
Stefan Eßer
aa308b49e3 mtree/BSD.tests.dist: remove entry for OpenBSD dc command
The OpenBSD derived dc program has been removed in commit 8ea6c11540,
but the creation of a directory for tests of this program had not been
disabled in that commit.

Reported by:	kevans
2024-11-25 16:57:17 +01:00
Mark Johnston
ebd48f1e52 include: Install dev/vmm headers
In preparation for their use in libvmmapi.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D47029
2024-11-05 01:40:41 +00:00
Dimitry Andric
0fca6ea1d4 Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-19-init-18630-gf2ccf80136a0, the
last commit before the upstream release/19.x branch was created.

PR:		280562
MFC after:	1 month
2024-10-23 20:26:01 +02:00
Kyle Evans
096c39fae4 tests: kern: add some porch(1)-based tty tests
If sysutils/porch is installed, we'll do some basic testing of tty
behavior.  The existing tests primarily cover ICANON-related processing
and corner cases that have been fixed somewhat recently, but I
anticipate growing this out a bit in due time.

Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D46806
2024-10-20 20:32:31 -05:00
Dag-Erling Smørgrav
334af5e413 env: Add a handful of test cases.
MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46996
2024-10-07 23:01:09 +02:00
Kyle Evans
e0c51286dd libmd: split tests out into the test infrastructure
Make us a little less reliant on individuals running the tests, we'll
start running them as part of CI.

PR:		280784 (exp-run)
Reviewed by:	delphij
Differential Revision:	https://reviews.freebsd.org/D34500
2024-09-29 22:34:19 -05:00
Baptiste Daroussin
de1d7d7b87 flua: add freebsd module implementing kldload/kldunload
Reviewed by:	markj, imp
Approved by:	imp
Differential Revision:	https://reviews.freebsd.org/D46558
2024-09-06 17:25:54 +02:00
Alan Somers
60d717baf2 ctl: add some ATF tests for READ BUFFER
Reviewed by:	Pierre Pronchery <pierre@freebsdfoundation.org>
Reviewed by:	jhb
MFC after:	2 weeks
Sponsored by:	Axcient
2024-09-04 14:38:12 +00:00
Dmitry Morozovsky
2c2916a3ec mailer.conf for sendmail: remove duplicate word.
MFC after:	3 days
2024-08-07 17:03:12 +03:00
John Baldwin
a4b248b883 ObsoleteFiles.inc: Remove usr/share/examples/IPv6
Reported by:	Mark Millard <marklmi@yahoo.com>
Fixes:		4339f1e667 share/examples/IPv6/USAGE: remove
2024-07-31 15:25:55 -04:00
Jose Luis Duran
1c8a45b554 mtree: Fix the sort order in BSD.tests.dist
Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1351
2024-07-29 14:13:02 -06:00
Jose Luis Duran
68bcf53ea2 mtree: Fix the sort order in BSD.include.dist
Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1351
2024-07-29 14:12:58 -06:00
Li-Wen Hsu
21e98f6d19
BSD.tests.dist: Add entry for mixer tests
Fixes:	94a86f3f69 mixer(8): Add tests
Sponsored by:	The FreeBSD Foundation
2024-07-28 02:44:28 +08:00
Warner Losh
e9ac41698b Remove residual blank line at start of Makefile
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
2024-07-15 16:43:39 -06:00
Kyle Evans
020d003c86 libc: tests: add testing infrastructure for _FORTIFY_SOURCE
The _FORTIFY_SOURCE tests will be generated by a lua script to avoid a
lot of redundancy in writing these tests.  For each function that we're
fortifying, the plan is to test at least the following three scenarios:

 - Writing up to one byte before the end of the buffer,
 - Writing up to the end of the buffer,
 - Writing one byte past the end of the buffer

The buffer is shoved into a struct on the stack to guarantee a stack
layout in which we have a valid byte after the buffer so that level 2
fortification will trip and we can have confidence that it wasn't some
other stack/memory protection instead.

The generated tests are divided roughly into which header we're
attributing them to so that we can parallelize the build -- the full set
is a bit over 9000 lines of C and takes 11s to build on the hardware
that I'm testing on if it's a single monolothic file.

Reviewed by:	markj
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D45678
2024-07-13 00:16:23 -05:00
Ryan Libby
0f409d2673 BSD.tests.dist: add entry for virstor test
Reviewed by:	markj
Fixes:		7affbeeab1 virstor: basic functional test
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D45551
2024-06-10 11:56:18 -07:00
Alan Somers
81ef0a89fc Fix mtree entry for ctladm tests
MFC after:	2 weeks
MFC with:	9747d11d91
Sponsored by:	Axcient
2024-06-10 11:29:48 -06:00
Alan Somers
9747d11d91 Add some ATF tests for ctladm
So far only "ctladm port -c" and "ctladm port -r" are covered.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	mav
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1279
2024-06-10 10:01:25 -06:00
Matthew Seaman
4354163e5f Don't package /var/db/locate.database
... or install an empty file.

The locate database is a mutable working file, and unsuitable to be
managed by pkg(8).  locate(1) copes gracefully with the absence of
this file.  Running /etc/periodic/weekly/310.locate will create the
locate database with the correct ownership and permissions.

Having the locate.database file as part of the FreeBSD-runtime package
means it gets zeroed if ever that package gets updated, which is
excessive, given that updating packages will typically only change a
relatively small number of the _filenames_ on the system -- unlike the
file contents.  Plus it always causes it to flag as modified when
verifying checksums, but /var/db/locate.database is expected to be
modified by the user.

MFC after:	1 week
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D45384
2024-05-28 11:20:07 +01:00
Dag-Erling Smørgrav
02d98d1850 libdiff: Add a test for the truncation issue.
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D45218
2024-05-20 15:26:42 +02:00
Kyle Evans
be04fec426 Import _FORTIFY_SOURCE implementation from NetBSD
This is a mostly-unmodified copy of the various *_chk implementations
and headers from NetBSD, without yet modifying system headers to start
actually including them.  A future commit will also apply the needed
bits to fix ssp/unistd.h.

Reviewed by:	imp, pauamma_gundo.com (both previous versions), kib
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D32306
2024-05-13 00:23:49 -05:00
John Baldwin
70e5a9ea78 nvmf: Install nvmf.h and nvmf_proto.h in /usr/include/dev/nvmf
Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44707
2024-05-02 16:27:30 -07:00
Olivier Certner
9b30b96c1f
Remove remnants of portsnap(8)
This was prompted by noticing that '/var/db/portsnap' still exists on
newly-installed machines.

With this change, all mentions of portsnap(8) in the tree are gone,
except for the historical note in the AUTHORS section of manpage
phttpget(8).

locate(1) will thus start indexing again '/var/db/portsnap' on machines
where this directory still exists, which may be a good way to push
administrators to delete it.

Reviewed by:            cperciva
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D45023
2024-04-30 22:44:34 +09:00
Dimitry Andric
5f757f3ff9 Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

PR:		276104
MFC after:	1 month
2024-04-06 22:11:55 +02:00
Dag-Erling Smørgrav
74a4aa9b15 touch: Add unit tests.
MFC after:	1 week
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D44505
2024-03-27 11:03:45 +01:00
Mitchell Horne
cc1268a926 BSD.usr.dist: remove empty /usr/libdata/gcc directory
I am unsure of its exact historical usage, but, we no longer ship GCC
with FreeBSD, and it should have been removed.

Reviewed by:	imp, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D44440
2024-03-21 12:22:57 -03:00
Baptiste Daroussin
8c3a85eaeb pkgbase: make sendmail config files as config 2024-03-20 16:44:35 +01:00
Baptiste Daroussin
8cd7841d84 pkgbase: separate /etc/mail/aliases from the sendmail package
move /etc/aliases and /etc/mail/aliases into the runtime package
this file is used by both sendmail and dma.

While here mark this file as a config file so 3way merge is performed
2024-03-20 16:39:39 +01:00
Baptiste Daroussin
c051f22bce mtree: add the directory for the nuageinit tests 2024-03-15 10:42:53 +01:00
Dag-Erling Smørgrav
96da41b6db lorder: Add unit tests.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D44134
2024-02-28 16:37:41 +01:00
Mark Johnston
f81cdf24ba bhyve: Add support for XML register definitions
This is useful for exposing additional registers to debuggers.  For
instance, control registers are now available on amd64 when using gdb to
debug a guest.

The stub indicates support by including the string
"qXfer:features:read+" in its feature list.  The debugger queries for
target descriptions by sending the query "qXfer:features:read:" followed
by a file path.

The XML definitions are copied from QEMU and installed to
/usr/share/bhyve/gdb.

Note that we currently don't handle the SIMD registers at all, since
that's of somewhat limited utility (for me at least) and since that
requires new ioctls to fetch the register values.

Reviewed by:	jhb
MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D43666
2024-02-20 19:51:34 -05:00
Dimitry Andric
e368e9b756 Proactively remove /usr/lib/kgdb file that became a directory
This was already handled in ObsoleteFiles.inc (see the 20201215 entry),
but some people never run "make delete-old", or want to upgrade directly
from a revision that still had the file to the most recent revision.

They would then encounter a failure during installworld, similar to:

  install: /usr/libexec/kgdb exists but is not a directory

Therefore, clean it up in the distrib-cleanup phase, similar to the
earlier instances of libc++ header files that became a directory.

MFC after:	3 days
2024-02-17 12:27:33 +01:00
Gregory Neil Shapiro
2c191ba6b0 Minor change to update these files so new freebsd*.cf files are
generated
2024-02-01 00:27:37 +00:00
Jessica Clarke
ce047ebf48 etc: Set DISTBASE during distribute for sub-makes
This is normally done by bsd.subdir.mk in its default distribute target,
but since etc overrides it we don't get that behaviour. Currently it's
not needed, but share/man's makedb (recursed into by etc's afterinstall)
will need it in the following commit. Technically this is only needed
for install, but do this for distribution too for completeness and
consistency.

Reviewed by:	brooks, emaste
Differential Revision:	https://reviews.freebsd.org/D43675
2024-01-30 22:17:28 +00:00
Lin Lee
73974a78f7
hostname(1): Add test cases
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1069
2024-01-30 11:26:57 +08:00
Dimitry Andric
2acd158d4b mtree: stop creating old mixer(8) test directories
The tests themselves were added to ObsoleteFiles.inc in commit
f7c4f49649, but not yet removed from BSD.tests.dist.

PR:		274602
Fixes:		f7c4f49649
2024-01-23 19:40:12 +01:00
Mark Johnston
2524b7dfb0 crashinfo: Print stack traces for all on-CPU threads
Add a python script which implements the bulk of this functionality.
Over time, this would ideally evolve into a library of python routines
which can be used to inspect kernel data structures and automate some
debugging tasks, similar to jhb's out-of-tree scripts, but written in a
somewhat nicer language and with better integration into the kgdb
command prompt.

Note that kgdb currently won't auto-load scripts in this directory.
This should perhaps change in the future.  It probably also makes more
sense to have a crashinfo.py which provides all the kgdb output that we
want to include in core.txt, rather than having crashinfo.sh pipe in
several commands.

Reviewed by:	avg, imp
Discussed with:	jhb
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33817
2024-01-15 16:36:40 -05:00
Domagoj Stolfa
93f27766a7 dtrace: Add the 'oformat' libdtrace option
This option can be used to specify a format to use in DTrace output.
The following formats are supported:
 - json
 - xml
 - html
 - none (default DTrace output)

This is implemented using libxo and integrated into libdtrace. Client
code only works with the following API:

 - dtrace_oformat_setup(dtrace_hdl_t *) -- to be called when output is starting.
 - dtrace_oformat_teardown(dtrace_hdl_t *) -- to be called when output is finished
 - dtrace_oformat(dtrace_hdl_t *) -- check if oformat is enabled.
 - dtrace_set_outfp(FILE *) -- sets the output file for oformat.
 - Ensure that oformat is correctly checked in the drop handler and record
   processing callbacks.

This commit also adds tests which check if the generated output is
valid (JSON, XML) and extends the dtrace(1) describing the structured output.

Reviewed by:	markj
Discussed with:	phil
MFC after:	2 months
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D41745
2024-01-10 18:14:26 -05:00
Jose Luis Duran
b8856bd2d6 mtree: Add missing directories to BSD.tests.dist
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912
2023-12-27 22:26:31 -07:00