Commit graph

1361 commits

Author SHA1 Message Date
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
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 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
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
Jose Luis Duran b8e385d35c mtree: Sort BSD.tests.dist
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912
2023-12-27 22:26:30 -07:00
Jose Luis Duran 1ed17d86bb mtree: Add missing directories to BSD.root.dist
While here, align to the output produced by mtree.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912
2023-12-27 22:26:29 -07:00
Jose Luis Duran 5b7f73ce16 mtree: Add missing directories generated by certctl
PR: 255639
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912
2023-12-27 22:26:28 -07:00
Jose Luis Duran 20d685623f mtree: Properly sort entries
Reduce the diff with the output generated by mtree.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912
2023-12-27 22:26:27 -07:00
Jose Luis Duran 0888bac4f6 mtree: Use spaces not tabs
The indentation generated by mtree -j uses spaces, not tabs.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912
2023-12-27 22:26:27 -07:00
Jose Luis Duran 0a41a6681d mtree: Update mtree flags in README file
- Add -b (suppress blank lines before directories).
- The equivalent of `-i` in fmtree is `-j` in mtree (nmtree) (indent the
  output 4 spaces).
- Add `-F freebsd9` compatibility flavor (print the closing `..` at the
  end).

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912
2023-12-27 22:26:26 -07:00
Dimitry Andric 06c3fb2749 Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the
last commit before the upstream release/17.x branch was created.

PR:		273753
MFC after:	1 month
2023-12-08 18:34:50 +01:00
Kyle Evans d9c543b6b0 rtld: add a test for RTLD_DEEPBIND
This tests that with RTLD_DEEPBIND, symbols are looked up in all of the
object's needed objects before the global object.

PR:		275393
Reviewed by:	kib
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D42843
2023-11-30 19:26:09 -06:00
Kyle Evans 296a5a4db1 lockf: add some tests
Provide basic coverage for the existing options, nothing deeper (e.g.,
pipe closing behavior) is tested in this set.

Reviewed by:	allanjude
Feedback from:	des
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D42714
2023-11-25 22:09:58 -06:00
John Baldwin 7aa3bf6952 etc/mtree: Remove entry for /usr/tests/usr.sbin/mixer
These were removed when the new mixer(3) library was imported, and I
missed updating the mtree file when I added the entries to
ObsoleteFiles.inc.

Fixes:		903873ce15 Implement and use new mixer(3) library for FreeBSD.
2023-11-23 12:17:41 -08:00
Yan-Hao Wang 55141f2c89
Add tests for gunion(8)
Reviewed by:	mckusick (earlier version)
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41645
2023-11-16 16:15:33 +08:00
Emmanuel Vadot fee14577d5 mtree: Fix entry
Fixes:	af5e348c61 ("mtree: Add missing sound entry for /usr/examples")
2023-10-09 12:56:19 +02:00
Emmanuel Vadot af5e348c61 mtree: Add missing sound entry for /usr/examples
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2023-10-09 11:22:27 +02:00
Wang-Yan-Hao c989957f28 printenv: Add test for printenv.
Reviewed by:	asomers
Differential Revision: https://reviews.freebsd.org/D41468
2023-09-25 10:10:20 -06:00
Dag-Erling Smørgrav 4fbb9c43aa include: Add tests for N2867.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D41735
2023-09-07 06:40:14 +00:00
Simon J. Gerraty 1554ba03b6 Add mac_grantbylabel
This module allows controlled privilege escallation via mac labels
securely associated with a process via mac_veriexec.

There are over 700 PRIV_* but we can compress many of them into
a single GBL_* thus constraining the size of gbl labels.

The goal is to allow a daemon to run as an unprivileged process while
still being able a set of privileged operations needed.

We add APIs to libveriexec so that userland processes can check labels
and an exec_script API that allows a suitably labeled process to run
something like a python interpreter directly if necessary;
overcomming the 'indirect' flag applied to the interpreter.

Add -l option to sbin/veriexec to report labels.

Reviewed by:	stevek
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D41431
2023-08-24 17:42:11 -07:00
Jake Freeland fcace2906d syslogd: Add some basic regression tests
Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41403
2023-08-23 12:17:40 -04:00
Mike Karels 9d6049d5da etc: remove leftover leading empty comments, blank lines
Remove leftover empty leading comments/blank lines that had been
spacers between $FreeBSD$ and the following content in config files
in src/etc.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D41548
2023-08-22 13:03:28 -05:00
Warner Losh 05248206f7 Remove $FreeBSD$: one-line bare tag
Remove /^\s*\$FreeBSD\$$\n/
2023-08-16 11:55:20 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Dmitry Chagin 8920c5f2a1 tests: Add stack grows tests
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D41320
MFC after:		2 weeks
2023-08-08 18:12:09 +03:00
Martin Matuska b5a3a89c50 unzip: swtich to bsdunzip from libarchive
Unzip from FreeBSD has been ported to libarchive.
Change usr.bin/unzip to use bsdunzip from libarchive.

Differential Revision:	https://reviews.freebsd.org/D41239
PR:			272845 (exp-run)
MFC after:		1 month
2023-08-04 12:45:41 +02:00
Jessica Clarke 949199a212 etc: Automatically generate BSD.lib${libcompat}.dist lists
Note that each libcompat still has its own file that must exist.

Reviewed by:	brooks, jhb
Differential Revision:	https://reviews.freebsd.org/D41182
2023-07-27 05:10:44 +01:00
Shivank Garg 215bab7924 mac_ipacl: new MAC policy module to limit jail/vnet IP configuration
The mac_ipacl policy module enables fine-grained control over IP address
configuration within VNET jails from the base system.
It allows the root user to define rules governing IP addresses for
jails and their interfaces using the sysctl interface.

Requested by:	multiple
Sponsored by:	Google, Inc. (GSoC 2019)
MFC after:	2 months
Reviewed by:	bz, dch (both earlier versions)
Differential Revision: https://reviews.freebsd.org/D20967
2023-07-26 00:07:57 +00:00
Doug Rabson 5ac2a874d0 /etc/rc.subr: rename sysctl.conf.d to sysctl.kld.d
This better reflects the intent that this directory is indexed by kld
name and removes a conflict with D32128 which aims to split sysctl.conf.

Reviewed by:	kevans imp
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D41043
2023-07-15 14:16:08 +01:00
Doug Rabson 09267cc152 /etc/rc.subr: add support for kld sysctl variables
For kernel modules loaded by scripts in /etc/rc.d and
/usr/local/etc/rc.d, if there is a file in /etc/sysctl.conf.d named <kld
name>.conf, then this will be loaded using the sysctl(8) utility. For
instance, sysctl variable changes for the pf kernel module would be
placed in the file /etc/sysctl.conf.d/pf.conf.

PR:		272129
Reviewed by:	imp freebsd_igalic.co
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D40886
2023-07-14 10:49:47 +01:00
Mitchell Horne 8ab2da6828 Remove GCC 4.2 include dirs
These are present (and empty) on a system installed post-GCC removal.

Reviewed by:	imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D40878
2023-07-10 10:16:13 -03:00
Li-Wen Hsu 2597c45a4f
Complete moving kinst of dtrace tests to common
Update its mtree entry.

Reviewed by:	christos, markj
Fixes:	911f026039 dtrace: move kinst tests to common
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40901
2023-07-08 04:05:30 +08:00
Dimitry Andric 5de9420ad5 Create correct engines debug directory after OpenSSL 3.0.9 merge
PR:		271656
Fixes:		b077aed33b ("Merge OpenSSL 3.0.9")
2023-07-01 22:59:23 +02:00
Pierre Pronchery b077aed33b Merge OpenSSL 3.0.9
Migrate to OpenSSL 3.0 in advance of FreeBSD 14.0.  OpenSSL 1.1.1 (the
version we were previously using) will be EOL as of 2023-09-11.

Most of the base system has already been updated for a seamless switch
to OpenSSL 3.0.  For many components we've added
`-DOPENSSL_API_COMPAT=0x10100000L` to CFLAGS to specify the API version,
which avoids deprecation warnings from OpenSSL 3.0.  Changes have also
been made to avoid OpenSSL APIs that were already deprecated in OpenSSL
1.1.1.  The process of updating to contemporary APIs can continue after
this merge.

Additional changes are still required for libarchive and Kerberos-
related libraries or tools; workarounds will immediately follow this
commit.  Fixes are in progress in the upstream projects and will be
incorporated when those are next updated.

There are some performance regressions in benchmarks (certain tests in
`openssl speed`) and in some OpenSSL consumers in ports (e.g.  haproxy).
Investigation will continue for these.

Netflix's testing showed no functional regression and a rather small,
albeit statistically significant, increase in CPU consumption with
OpenSSL 3.0.

Thanks to ngie@ and des@ for updating base system components, to
antoine@ and bofh@ for ports exp-runs and port fixes/workarounds, and to
Netflix and everyone who tested prior to commit or contributed to this
update in other ways.

PR:		271615
PR:		271656 [exp-run]
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2023-06-23 18:53:36 -04:00
Dimitry Andric bdd1243df5 Merge llvm-project main llvmorg-16-init-18548-gb0daacf58f41
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16-init-18548-gb0daacf58f41.

PR:		271047
MFC after:	1 month
2023-06-22 20:20:56 +02:00
Dag-Erling Smørgrav b7412da2e1 asa: Add some unit tests.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D40564
2023-06-15 19:24:59 +00:00