Commit Graph

5566 Commits

Author SHA1 Message Date
Joseph Mingrone
a0c50eda29
beinstall.sh: Check correct exit status
When retrieving the timestamp of the last commit using git-show(1), do
not pipe the output to head(1), otherwise the return value in $? will be
for head(1) and not git-show(1).

Approved by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37742
2023-01-03 10:27:53 -04:00
Peter Holm
17edacfb6e stress2: Added a regression test 2023-01-03 10:34:00 +01:00
Vincenzo Maffione
e81ecab4b1 netmap: bridge: fix -Wdate-time compilation issue
MFC after: 3 days
2022-12-31 14:56:02 +00:00
Vincenzo Maffione
eda8251188 netmap: pkt-gen: fix ifname before cmp in source_hwaddr
In source_hwaddr(), the configured ifname is compared against all
interfaces. However, in main(), the string 'netmap:' is prepended to the
interface string if no explicit type is given. Therefore the ifname will
not match any system interface and the source MAC address is always
empty.

Check for the leading 'netmap:' string and skip past it to match against
system interfaces. Note that 'tap:' and 'pcap:' devices strip the type
string from the ifname in main() so no further work is needed.

MFC after:	7 days
Submitted by:	Brian Poole <brian90013@gmail.com>
2022-12-24 16:06:05 +00:00
Konstantin Belousov
6403a14024 tools/test/ptrace: update scescx to do remote getpid(2) on each SCX event
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D37590
2022-12-22 23:32:09 +02:00
Rene Ladan
e2f3742ab8 gpioevents: fix some white-space errors
Fixes:		453db42291 - gpioevents: add support for pull-down and floating input pins.
Approved by:	manu (implicit)
MFC after:	1 week
2022-12-22 11:16:32 +01:00
Rene Ladan
453db42291 gpioevents: add support for pull-down and floating input pins.
The pin-mode (ft, pd, pu for floating, pull-down, pull-up) is
specified after the intr-config (no, eb, ef, er) for each pin.

Tested on my Raspberry Pi 1B.

PR:		268504
Approved by:	manu
MFC after:      1 week
2022-12-22 10:13:59 +01:00
Justin Hibbits
177034c44e Update DrvAPI convert script for new KPIs
Bring the DrvAPI convert script forward from the initial commit to
account for the last 8 years of changes to the KPIs.

Sponsored by:	Juniper Networks, Inc.
2022-12-20 11:18:50 -05:00
Peter Holm
ae521fda89 stress2: Added link to problem found 2022-12-20 10:12:41 +01:00
Peter Holm
eeabf9cb93 stress2: Fix long run time 2022-12-20 10:12:01 +01:00
Peter Holm
eb928778a3 stress2: Add problem found 2022-12-13 12:00:01 +01:00
Ed Maste
86edb11e74 Always install llvm-objdump as objdump
Instead of providing no /usr/bin/objdump when LLVM_BINUTILS is false.

PR:		267854 [exp-run]
Reviewed by:	dim
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37445
2022-12-12 10:36:02 -05:00
Peter Holm
2518b1c742 stress2: Add list of problems found 2022-12-07 12:03:44 +01:00
Peter Holm
6e36cfadbc stress2: No need to run tests for 30 minutes 2022-12-06 10:32:49 +01:00
Warner Losh
858a73f14c full-test: Start of a full testing suite.
full-test.sh aims to be a test suite generator for the boot loader. It
tries to grab artifacts from the web and then constructs minimal boot
environments from that as well as writing qemu-system-* using scripts
that facilitates testing all the ways we can boot... At least all the
ways that we an boot that qemu can emulate.

This is very much a work in progress, and likely could use a good
cleanup at some point.

Sponsored by:		Netflix
2022-12-02 11:08:11 -07:00
Warner Losh
aad99ded88 Add test notes
Add notes on how to test things. This will likely need to be fleshed out
more in the future, but this is a good start.

Sponsored by:		Netflix
2022-12-02 11:07:33 -07:00
Philip Paeps
821549a9df OptionalObsoleteFiles.inc: add zoneinfo/America/Ciudad_Juarez
tzdata 2022g and later split America/Ciudad_Juarez from America/Ojinaga.
Ensure this file is removed in builds WITHOUT_ZONEINFO.

MFC after:	1 day
2022-11-30 09:50:26 +08:00
Ed Maste
f93d92f43d pkgbase: report errors via metalog reader exit status
Reviewed by:	kevans
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37482
2022-11-25 09:13:31 -05:00
Ed Maste
20a66ab4bf Retire CLANG_IS_CC option
A small reduction in build infrastructure complexity; when we had both
Clang and GCC in the tree it was useful to have both built, and choose
one or the other to install as /usr/bin/cc.  Now only Clang is in the
tree, and there is no point in building and installing base Clang but
not providing it as cc (and c++, cpp).

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37075
2022-11-21 14:56:13 -05:00
Ed Maste
1f3b4f38a6 Update pkgbase metalog tool README to match installed filename
The pkgbase metalog tool is named metalog_reader.lua.  (One may argue
that a better name could be chosen, but the README should match in any
case.)

Sponsored by:	The FreeBSD Foundation
2022-11-18 15:11:52 -05:00
Warner Losh
8a744de27e stand: Remove i386-only support fire firewire
Remove support for booting off of firewire, and for having dcons via
firewire in the loader. Kernel support for these things is unchanged.
Discussed on arch@ and the current state is not working (and the build
was wrong to boot).

Sponsored by:		Netflix
Discussed:		https://lists.freebsd.org/archives/freebsd-arch/2022-November/000267.html
Reviewed by:		kevans, melifaro, emaste
Differential Revision:	https://reviews.freebsd.org/D37334
2022-11-18 10:43:59 -07:00
Ed Maste
b751fc75bb pkgbase: report type for duplicated METALOG entries
Duplicate METALOG file entries are more of a concern than duplicate
directories.  The metalog check tool previously did not include the
entry type in the warnings, making it hard to find the ones of concern.

Sponsored by:	The FreeBSD Foundation
2022-11-17 10:28:06 -05:00
Ed Maste
bca4d27052 pkgbase: examine METALOG files relative to stage root directory
Previously we stripped the '.' from the beginning of each METALOG entry
to determine the path to stat.  This meant that we examined files on the
build host, not the staged files.

Instead, strip off the last part of the specified METALOG pathname to
find the stage root directory, and stat files relative to that.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37412
2022-11-17 08:52:12 -05:00
John Baldwin
838a061417 depend-cleanup.sh: Handle rs(1) moving to C++.
To support changes in filenames for programs (and not just libraries),
update clean_dep() to check .depend.foo.o files as well as
.depend.foo.pico files.
2022-11-15 21:17:28 -08:00
Peter Holm
9e16087e36 stress2: Added a new SU+J + snapshot test scenario 2022-11-14 12:03:57 +01:00
Peter Holm
1541ac2120 stress2: Exclude two "forced detach" tests and two SUJ + snapshot tests 2022-11-14 12:01:30 +01:00
Baptiste Daroussin
616f32ea6d othermta: remove leftover from 20 years ago
othermta (along with mta_start_script configuration entry in rc.conf)
was a mechanism used to be able to run another mta than sendmail(8) before
"rcng" time 20 years ago.

othermta has not been used since.
2022-11-14 09:08:37 +01:00
Peter Holm
d941ffdc4f stress2: Added a tmpfs regression test for Bug 223015 2022-11-13 10:15:21 +01:00
Peter Holm
7c455ce26f stress2: Added more "mdconfig -o force" tests 2022-11-13 10:05:35 +01:00
Peter Holm
d7655675eb stress2: Snapshots of SU+J has been enabled 2022-11-13 09:58:29 +01:00
Peter Holm
f31ca922cb stress2: Add SU+J as a test. Save fsck_ffs core dump, if any 2022-11-10 10:12:46 +01:00
Baptiste Daroussin
0b1adc42a1 rc.sendmail: remove unused script
20 years ago the use of rc.sendmail script was dropped in favor
of /etc/rc.d/sendmail, it is time to retire the script entirely
now.

MFC after:	1 week
2022-11-09 16:55:18 +01:00
John Baldwin
613aaf59af git-arc: Accept message via -m when updating reviews.
If a -m argument is given to update, it is passed through to arc diff
when updating each review.  Note that if an empty message is specified
via -m, arc diff will update the review without adding a note.

If an -m argument is not given, then the user's editor is invoked by
arc to supply a message for each review matching the previous
behavior.

This can be used to simplify the process for updating a set of
reviews, e.g.:

  git checkout foo
  git rebase main
  git arc update -m "Rebase" main..

This will rebase the 'foo' branch and update the reviews for all
commits on the branch without invoking the user's editor separately
for each review.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D37260
2022-11-07 14:46:15 -08:00
Alfredo Dal'Ava Junior
b7ac17b48b tools/build/make.py: fix cross build on Fedora Linux
Fedora defines shell functions for some commands used by FreeBSD build
scripts. Unortunatelly it makes them behave incorrectly for our purposes.

For instance 'which which' returns something like:

which ()
{
    ( alias;
    eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias ...
}

instead of

/usr/bin/which

This patch unsets those functions to restore original/expected behavior

Reviewed by:	emaste, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36900
2022-11-01 21:04:10 -03:00
Peter Holm
9349fc283b stress2: Added a newfs(8) test scenario 2022-10-27 09:59:16 +02:00
Peter Holm
e23445275a stress2: Added a regression test for a ffs validate_sblock() fix 2022-10-27 09:57:57 +02:00
Peter Holm
ee920bc903 stress2: Added a regression test for D37024 2022-10-24 09:48:09 +02:00
Peter Holm
799db59e9a stress2: Update tool to list both DATA and HOLES in a file.
Added a regression test.
2022-10-24 09:45:32 +02:00
Pau Amma
f428cd0ebf Copyedit git-arc(1)
Bump .Dd again as requested.

Reviewed by:	gjb, imp, jhb

Approved by:	gjb (mentor, src), imp (src), jhb (src)

Differential Revision:	https://reviews.freebsd.org/D36705
2022-10-12 21:50:42 +02:00
Baptiste Daroussin
00ffd6b5e8 OptionalObsoleteFiles: grep nls files have been removed 4 years ago 2022-10-12 16:28:36 +02:00
Baptiste Daroussin
ed990a7a2f sort: remove NLS support
NLS support for sort(1) is:
1/ incomplete: many error string are not using nls
2/ only covers hu_HU.ISO8859-2
2022-10-12 16:24:29 +02:00
Ed Maste
a1e39f96d2 nanobsd: remove unmodified copies of ssh config files
Nanobsd included copies of ssh_config and sshd_config.  The former is
identical to the one provided by the base system, and the latter is
identical except for PermitRootLogin, which is updated by nanobsd's
cust_allow_ssh_root anyhow.  Remove nanobsd's copies and use the
existing base system ones.

Reported by:	Jose Luis Duran <jlduran@gmail.com> in D34937
Reviewed by:	Jose Luis Duran <jlduran@gmail.com>, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36933
2022-10-11 12:53:57 -04:00
Jose Luis Duran
9871ae6aa9 Track kern.ipc.somaxconn -> kern.ipc.soacceptqueue rename
Fixes:		2bdf61ca29 ("Hide the unfortunate named sysctl...")
MFC after:	3 days
2022-10-11 12:46:46 -04:00
Ed Maste
6e6c45e66f nanobsd: update copies of SSH config files
Sponsored by:	The FreeBSD Foundation
2022-10-11 09:25:39 -04:00
Peter Holm
bab2efd47b stress2: Temporarily removed the rename(2) tests as these seem to trigger a
deadlock.  Count the number of CLEAN + MODIFIED reports from fsck_ffs and
flag counts > 1 as an error
2022-10-11 10:20:51 +02:00
Mark Johnston
6a720fb95a git-arc: Fix handling of review title containing double quotes 2022-10-04 13:05:54 -04:00
Jessica Clarke
d577d6178b bsdinstall release: Move code to a new startbsdinstall wrapper
This separates out the install media-specific environment (creating
bsdinstall_etc) from actually running the installer on a given console.
This will be used by a future change to start the installer on multiple
consoles.

Reviewed by:	brooks, gjb
Differential Revision:	https://reviews.freebsd.org/D36803
2022-10-03 17:09:16 +01:00
Jessica Clarke
a2464ee127 bsdinstall: Add a new runconsoles helper binary
This helper binary will run a given command on every on console, as
defined by /etc/ttys (except for ttyv*, where only ttyv0 will be used).
If one of the command processes exits, the rest will be killed. This
will be used by a future change to start the installer on multiple
consoles.

Reviewed by:	brooks, imp, gjb
Differential Revision:	https://reviews.freebsd.org/D36804
2022-10-03 17:09:16 +01:00
Brooks Davis
b4cfdbfed2 manpages: Remove telnetd references
Mostly remove from the SEE ALSO section, adding a mention of the port
where not removed. Elsewhere, remove as appropriate and change from .Xr
to .Nm where a mention of telnetd continues to make sense (or removing
it would require significant reworking of the surrounding text).

Reviewed by:	imp, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D36785
2022-09-29 17:56:41 +01:00
Brooks Davis
c0f94ccbb2 bsdbox: remove previously broken telnet(d) support
Support for telnet(d) was commented out some time ago.  Remove now that
telnetd is gone.

Reviewed by:	imp, delphij, emaste
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D36782
2022-09-29 17:56:25 +01:00
Brooks Davis
0eea46fb1f Remove telnetd
The telnetd codebase is unmaintained and has a number of quality
issues. Telnet has been largely supplanted by ssh. If needed, a port is
available (net/freebsd-telnetd), but a more maintained implementation
should be prefered.

While the telnet client suffers from the same issues, it is deemed
to be of lower risk and is required to connect to legacy devices, so
it remains.

Reviewed by:	emaste, imp
Differential Revision:	https://reviews.freebsd.org/D36620
2022-09-28 19:53:49 +01:00
Peter Holm
8dcc207de5 stress2: Fixed double word in comment
Reported by:	kib
2022-09-27 08:52:24 +02:00
Peter Holm
977d8fb9ad stress2: Added regression tests 2022-09-26 09:50:37 +02:00
Ed Maste
d1a351be19 Do not delete objdump when WITH_LLVM_BINUTILS is true
WITH_LLVM_BINUTILS links /usr/bin/objdump to llvm-objdump, and similarly
for the man page.  Do not delete them in `make delete-old`.

PR:		266603
Sponsored by:	The FreeBSD Foundation
2022-09-25 15:33:16 -04:00
Peter Holm
5b42ac2914 stress2: Added two syzkaller reproducers 2022-09-21 07:40:47 +02:00
Jens Schweikhardt
91dba0dae7 Correct wrong sections for bpf and pcap. 2022-09-16 19:03:37 +02:00
Gordon Bergling
08cb3ac76c tools: Remove a double words
- s/to to/to/
 - s/to to/to do/ in an error message

MFC after:	3 days
2022-09-10 12:54:33 +02:00
Gordon Bergling
59cdd0e2ff stress2: Remove double words in comments
- s/to to/to/

 MFC after:3 days
2022-09-10 12:52:50 +02:00
Gordon Bergling
ba594e730e regression-netinet: Remove a double word in a source code comment
- s/to to/to/

 MFC after:	3 days
2022-09-10 12:52:01 +02:00
Dag-Erling Smørgrav
f419a28349 OptionalObsoleteFiles.inc: add bearssl, secureboot, veriexec.
Sponsored by:	Klara, Inc.
MFC after:	1 week
2022-09-09 14:06:11 +02:00
Gleb Popov
20adba8bc1 src.conf: Introduce WITHOUT_MACHDEP knob.
Summary:
This knob can be used to make buildsystem prefer generic C implentations of
various functions, instead of machine-specific assembler ones.

Test Plan: `make buildworld` on amd64

Reviewed by: imp, emaste

Differential Revision: https://reviews.freebsd.org/D36076

MFC after:	3 days
2022-09-09 09:54:28 +03:00
Peter Wemm
998b0a4ad8
OptionalObsoleteFiles.inc: Add missing sendmail feature macro files.
MFC after:	3 days
2022-08-31 02:38:57 -07:00
Gleb Smirnoff
4627bc1e90 tests: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT 2022-08-30 16:24:37 -07:00
Peter Holm
2aba6e7aaf stress2: Added a regression test 2022-08-25 09:47:58 +02:00
Mark Johnston
c4d06691c0 git-arc: Respect GIT_EDITOR and GIT_PAGER 2022-08-24 16:54:41 -04:00
Mark Johnston
43d0c4d2a2 git-arc: Fix whitespace 2022-08-24 16:53:17 -04:00
Peter Holm
4e4f49fd4a stress2: Added another sigreturn(2) fuzzer test 2022-08-24 13:21:55 +02:00
Vincenzo Maffione
9a7abd9327 pkt-gen: flip IPv4 address in ping-pong mode
MFC after:	7 days
2022-08-24 08:20:57 +00:00
Jessica Clarke
fba998a3d8 tools/build: Unbreak bmake bootstrap on Linux
Currently make.py has a hack to add the cross-build headers to the
include search path when bootstrapping bmake on Linux (but not macOS).
This is a bit of an abuse of these headers, and e9ba1fd5ed was not
prepared for this, since sys/bitcount.h won't exist in that instance (it
gets copied into WORLDTMP during the legacy build). Work around this
until we can wean the bmake bootstrap off using these headers by not
including sys/bitcount.h when it doesn't exist.

Fixes:	e9ba1fd5ed ("tools/build: Provide FreeBSD's bitstring API when cross-building")
2022-08-22 22:02:53 +01:00
Peter Holm
dd89489769 stress2: Updated tests as a result of the latest updates to fsck_ffs(8) 2022-08-19 11:40:49 +02:00
Peter Holm
98b13e25fd stress2: Handle different spelling of "superblock" 2022-08-19 11:39:28 +02:00
Jessica Clarke
548f8a657b tools/build: Provide fls* when cross-building on Linux
flsll is needed for makefs's new ZFS support, and the others are added
for completeness.

Reviewed by:	emaste, arichardson
Fixes:		240afd8c1f ("makefs: Add ZFS support")
Differential Revision:	https://reviews.freebsd.org/D36134
2022-08-18 02:46:28 +01:00
Jessica Clarke
e9ba1fd5ed tools/build: Provide FreeBSD's bitstring API when cross-building
This is needed for building makefs as a cross-tool since the ZFS code
uses these APIs.

Reviewed by:	emaste
Fixes:		240afd8c1f ("makefs: Add ZFS support")
Differential Revision:	https://reviews.freebsd.org/D36133
2022-08-18 02:46:27 +01:00
John Baldwin
548548649f git-arc: Use --head to avoid changing the checkout.
Rather than using 'git checkout' to move to the commit in question for
create and update, use the '--head' argument to 'arc diff'.  This
avoids the need to alter the current checkout and the related bits to
save/restore HEAD in the current checkout.

Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D36248
2022-08-17 16:19:31 -07:00
Warner Losh
ef8b872301 stand: Flesh out the zfs image creation
Move the mbr non-geli zfs cases to no-priv creation with makefs / mkimg.
Add comments about the weird thing we do for MBR + ZFS + Legacy.  Add
comments about other architectures. Still need to think through how to
leverage a completed universe to do all the architectures...

Sponsored by:		Netflix
2022-08-17 11:39:53 -06:00
Warner Losh
3d3f2fb069 stand: Make makeroot.sh use makefs for ZFS
Start to use makefs for ZFS. This covers the gpt nogeli variants.  ZFS
MBR booting is tricky and complicated, so will need some additional
tweaks that makefs/mkimg isn't able to do at the moment. This means that
all gpt nogeli amd64 combinations can be built w/o root.

In addition, tweak the generated qemu.sh files to use stdio for the
console. We grep the output for SUCCESS and report each of the booting
types. Create a all.sh that will run these automatically. These all can
also run w/o root.

In the future, I'll add support for a make univers followed by this
script to create other architectures' tests and/or generate stand tests
for /usr/tests...

Sponsored by: Netflix
2022-08-16 15:36:55 -06:00
Warner Losh
729c458bf7 stand: Abstract out fstab creation
Now that all the fstabs are the same, abstract it out into a function.

Sponsored by:		Netflix
2022-08-15 12:46:31 -06:00
Warner Losh
26a241a0e2 stand: Update GELI UFS cases to use ufs labels
GELI images are created in a different manner than non-GELI
images. Update them to set the label of 'root' on the UFS partition and
use that in fstab. Drop comments about needing to do this, as well as
the 'dev' variable now that it's unused.

Sponsored by:		Netflix
2022-08-15 12:38:32 -06:00
Warner Losh
159b158a1d stand: Update testing harness to start to use UFS labels
Minor changes to the non-geli UFS targets: migrate to using ufs labels
so we don't need to know the name of the device we booted off of. This
doesn't change the GELI test cass just yet since I've not tested them.
ZFS doesn't need these changes since we don't need to encode the device
for it.

Sponsored by:		Netflix
2022-08-15 12:38:32 -06:00
Warner Losh
aff95057bc stand: Update testing script for arch retirement
And catch up to changes in booting methods currently supported. Add
riscv.

Sponsored by:		Netflix
2022-08-15 12:38:32 -06:00
Kirk McKusick
e688661642 Move the ability to search for alternate UFS superblocks from fsck_ffs(8)
into ffs_sbsearch() to allow use by other parts of the system.

Historically only fsck_ffs(8), the UFS filesystem checker, had code
to track down and use alternate UFS superblocks. Since fsdb(8) used
much of the fsck_ffs(8) implementation it had some ability to track
down alternate superblocks.

This change extracts the code to track down alternate superblocks
from fsck_ffs(8) and puts it into a new function ffs_sbsearch() in
sys/ufs/ffs/ffs_subr.c. Like ffs_sbget() and ffs_sbput() also found
in ffs_subr.c, these functions can be used directly by the kernel
subsystems. Additionally they are exported to the UFS library,
libufs(8) so that they can be used by user-level programs. The new
functions added to libufs(8) are sbfind(3) that is an alternative
to sbread(3) and sbsearch(3) that is an alternative to sbget(3).
See their manual pages for further details.

The utilities that have been changed to search for superblocks are
dumpfs(8), fsdb(8), ffsinfo(8), and fsck_ffs(8). Also, the prtblknos(8)
tool found in tools/diag/prtblknos searches for superblocks.

The UFS specific mount code uses the superblock search interface
when mounting the root filesystem and when the administrator doing
a mount(8) command specifies the force flag (-f). The standalone UFS
boot code (found in stand/libsa/ufs.c) uses the superblock search
code in the hope of being able to get the system up and running so
that fsck_ffs(8) can be used to get the filesystem cleaned up.

The following utilities have not been changed to search for
superblocks: clri(8), tunefs(8), snapinfo(8), fstyp(8), quot(8),
dump(8), fsirand(8), growfs(8), quotacheck(8), gjournal(8), and
glabel(8). When these utilities fail, they do report the cause of
the failure. The one exception is the tasting code used to try and
figure what a given disk contains. The tasting code will remain
silent so as not to put out a slew of messages as it trying to taste
every new mass storage device that shows up.

Reviewed by: kib
Reviewed by: Warner Losh
Tested by:   Peter Holm
Differential Revision: https://reviews.freebsd.org/D36053
Sponsored by: The FreeBSD Foundation
2022-08-13 12:43:40 -07:00
Jens Schweikhardt
14e3d3248a Fix wrong capitalization in man page references. 2022-08-13 20:46:59 +02:00
Kyle Evans
2300a22c97 libc: iconv: add mb_cur_min for encoder traits
A future commit will actually implement //IGNORE so that applications
using base iconv can, e.g., sanitize UTF-8 strings.  To do this, the
iconv_std module needs to be able to determine the minimum width for any
given encoding so that it can skip that many bytes in the input buffer.
This is mainly an issue for UTF-16 and UTF-32.

This commit bumps shlib versions to 5 for libiconv modules to reflect
the ABI change.  It also fixes OptionalObsoleteFiles to remove the
libiconv modules if WITHOUT_ICONV is in use.

re: _ENCODING_MB_CUR_MIN, note that this file (citrus_stdenc_template.h)
is included at the bottom of an encoding *implementation*, so the
implementation is free to #define it prior.  UTF1632 is a good example,
as it redefines the minimum to be a property on the encodinginfo, and
the minimum is set to 2 or 4 bytes for UTF-16 and UTF-32 respectively.

Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34344
2022-08-11 11:42:17 -05:00
Kyle Evans
814bd1ed43 tools: test: iconv: fix open_2 to not segfault
Record error condition when iconv_open() fails rather than leaving a
bogus iconv_t that iconv_close() can later choke on; this is one failure
mode.

If we opened MAX_LIMIT files with success, we need to rewind one so that
we don't iconv_close() one past the end of cd; this is the second
failure mode.

Sponsored by:	Klara, Inc.
2022-08-11 11:33:28 -05:00
Peter Holm
64f923959a stress2: Added a regression test 2022-08-11 09:42:02 +02:00
Peter Holm
c925454668 stress2: Added another fsck_ffs test scenario 2022-08-07 10:37:17 +02:00
Peter Holm
ac79b5f327 stress2: Do not run a fuzz test as root. 2022-08-07 10:35:47 +02:00
Konstantin Belousov
4690e20eed tools/uma/smrstress: fix kthread exit
By convention, kernel threads must call kthread_exit() instead of
blindly returning from the thread function.  We have some safety measure
in fork_exit(), which checks for the P_KPROC p_flag and does
kthread_exit() for kernel thread that forgot to do it itself.

But this workaround only works for kernel threads belonging to the
kernel process.  If a kernel thread is attached to the normal process
with live userspace, and does not call kthread_exit(), then the
workaround is not activated, and for amd64 at least, the return from the
thread function/fork_exit() results in the return to userspace with the
copy of frame from the thread that did kthread_add().

Practically for smrstress, this destroys the user stack of the still
active frame in the other thread, which was the caller of kthread_add().

Fix it by adding kthread_exit() to the thread function.

Reported and tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35999
2022-07-31 00:40:12 +03:00
Warner Losh
08585e7799 tools/boot: Fix universe.sh's ZFS exclusion test
MK_LOADER_ZFS is the current spelling of enabling or disabling ZFS
builds. Use it instead of MK_ZFS.

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D35896
2022-07-24 16:53:34 -06:00
Dmitry Chagin
5573614638 check/delete-old: Fix /bin/rmail removal condition
When WITHOUT_SENDMAIL is enabled and WITHOUT_MAILWRAPPER is disabled
we install /bin/rmail as a link to the /usr/sbin/mailwrapper.
Ensure make delete-old does not unlink /bin/rmail in that case.

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D35874
MFC after:		2 weeks
2022-07-22 01:20:25 +03:00
Reid Linnemann
000321bab7 namespace nv names, version libnv and libnvpair library symbols
libnv and libnvpair have aliased symbols, and as a result a single process which
dlopens a shared object that is dynamically linked to libnv and another to
libnvpair will wind up with a single set of resolved symbols for those in
conflict. A source file also cannot include both libnv and libnvpair headers
because of aliased identifiers. To resolve the situation, libnv types and
functions are namespaced via nv_namespace.h, and libnv symbols are
versioned. The msgio functions are not namespaced or exported as they are not
part of the external API.

Reviewed by:	kevans
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D35261
2022-07-21 18:35:23 +02:00
Peter Holm
6226f8f254 stress2: Update the exclude list 2022-07-17 09:16:03 +02:00
Peter Holm
ac19e54390 stress2: Enable more swap disk usage 2022-07-15 10:19:39 +02:00
Peter Holm
b4a6661801 stress2: Handle "gunion create" error exit 2022-07-15 10:17:23 +02:00
John Baldwin
a985fad6e0 depend-cleanup.sh: Handle kqtest being renamed to kqueue_test.
bmake will not think that object files such as read.o are out of date
due to common.h changing since the dependency is only recorded in
.depend.kqtest.read.o in an old object directory.

Reviewed by:	markj
Fixes:		68fe988a40 kqueue tests: Simplify the test runner
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D35820
2022-07-14 13:03:59 -07:00
Mark Johnston
eaab493eee git-arc: Fix the -y option 2022-07-13 09:30:17 -04:00
Peter Holm
7f3383d29b stress2: Added a fsck_ffs(8) test scenario 2022-07-12 06:42:33 +02:00
Warner Losh
9e9ba3cdbe test: Update boot universe build architectures
We build lua by default, so we don't need another build to build it
enabled w/o FORTH. That gives little value over the without forth
builds. Remove all mips, they are no longer relevant. Build aarch64
everywhere we build amd64 (except firewire which is x86 only). Build a
few more architectures once so we have at least one of every arch we
support in at least the default build. This should increase coverage
and still take less time than before.

Sponsored by:		Netflix
2022-07-08 11:47:37 -06:00
Peter Holm
a526ec4351 stress2: Added a mount(8) test scenario 2022-07-07 09:44:55 +02:00
Brooks Davis
3bf6636512 cddl/*: add a WITH(OUT)_DTRACE option
Add an option to enable/disable DTrace without disabling ZFS.  New
architectures such as CHERI may support ZFS before they support DTrace
and the old model of WITHOUT_CDDL disabling both wasn't helpful.

For compatiblity, the CDDL option remains and WITHOUT_CDDL implies
WITHOUT_DTRACE.  WITHOUT_DTRACE also implies WITHOUT_CTF.

As part of this change, largely convert cddl/*/Makefile to using the
more compact SUBDIR.${MK_<FOO>}+= form rather than using intermediate
variables.

Reviewed by:	markj
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D35718
2022-07-06 14:03:48 +01:00
Peter Holm
ec8c9e7ac3 stress2: Rework test to improve error reporting 2022-06-30 09:46:26 +02:00
Peter Holm
bc49526a56 stress2: Fix broken random number generation 2022-06-29 12:28:18 +02:00
Peter Holm
a25818eb28 stress2: Added comment about problem found 2022-06-28 11:30:51 +02:00
Peter Holm
8e64658873 stress2: Update the exclude list 2022-06-28 11:30:11 +02:00
Peter Holm
e3b31e23ff stress2: Added two syzkaller reproducers 2022-06-25 08:40:20 +02:00
Peter Holm
25a1b1f30c stress2: Added reagression tests
PR:	165392
2022-06-25 08:21:30 +02:00
Ed Maste
2f3a961487 Add RELRO build knob, default to enabled
Note that lld enables relro by default, so that we already had either
partial or full RELRO, depending on the state of the BIND_NOW knob.

Add a RELRO knob so that the option can be disabled if desired, and so
that builds using the GNU toolchain are equivalent to those using the
standard Clang/LLVM toolchain.

Reviewed by:	markj
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35545
2022-06-22 12:18:41 -04:00
Peter Holm
f2deb5e40c stress2: Added a timeout 2022-06-21 10:20:43 +02:00
Peter Holm
f2c88ed6ba stress2: Added a timeout to the test 2022-06-20 14:36:57 +02:00
Peter Holm
e2c59d8dff stress2: Fix process handling error 2022-06-20 14:35:59 +02:00
Peter Holm
608c97bff9 stress2: Remove bsdlabel(8) from tests
Reported by:	mhorne
Discussed with:	kib
2022-06-17 05:42:52 +02:00
Peter Holm
2d4b1f4b8c stress2: Added a syzkaller reproducer. Enable all reaper tests 2022-06-14 06:59:32 +02:00
Dimitry Andric
56f451bb3b Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR:		261742
MFC after:	3 days
2022-06-12 20:53:16 +02:00
Peter Holm
f71b232f31 stress2: Added an explanation to failure mode 2022-06-12 11:52:55 +02:00
Ed Maste
e3709cfe6a Add SPLIT_KERNEL_DEBUG knob
Prior to 9b6edf364e WITHOUT_KERNEL_SYMBOLS split kernel debug data
into standalone debug files at build time, but did not install those
files.  As of 9b6edf364e it stopped splitting the debug data, leaving
it in the kernel and modules (the default kernel configs include
DEBUG=-g).

Revert 9b6edf364e and introduce a new build-time SPLIT_KERNEL_DEBUG
knob, as some people rely on the pre-9b6edf364eb0 WITHOUT_KERNEL_SYMBOLS
behaviour and that was imp's original intent.

PR:		264433
Reviewed by:	eugen, imp
MFC after:	3 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35437
2022-06-08 17:14:46 -04:00
Ed Maste
92fc5822a8 Clarify WITHOUT_KERNEL_SYMBOLS description
Debug data is enabled via `makeoptions DEBUG=-g` in the kernel config
file (e.g. GENERIC).

If debug data is enabled and WITHOUT_KERNEL_SYMBOLS is set then debug
data is included in the kernel and module files.

PR:		264433
Discussed with:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-06-07 11:33:12 -04:00
Dimitry Andric
5e383e3603 Add more old clang files to (Optional)ObsoleteFiles.inc
There were a few more libclang_rt libraries added recently, but not yet
listed in the ObsoleteFiles.inc lists.

MFC after:	3 days
2022-06-05 22:45:52 +02:00
Dimitry Andric
809922b010 Update rest of llvm-project build glue for 14.0.4
I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR:		261742
Fixes:		ab9d54731f
MFC after:	3 days
2022-06-05 18:39:43 +02:00
Peter Holm
368852d672 stress2: Updated the exclude list and sorted it 2022-06-01 10:03:23 +02:00
Peter Holm
e14e0a1632 stress2: Added syzkaller reproducers 2022-06-01 10:02:08 +02:00
Peter Holm
4d0adee4e6 stress2: Added procctl(2) PROC_REAP_KILL regression tests 2022-06-01 09:58:28 +02:00
Mark Johnston
f7f387730e src.conf.5: Update the WITHOUT_ZFS description
... to take into account programs and libraries which might implement
some ZFS-specific features without being exclusive to ZFS.

Reviewed by:	emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35337
2022-05-30 10:45:57 -04:00
Dimitry Andric
7b6f5ebef6 Add several sanitizer ignore lists under /usr/lib/clang
Some of the sanitizers from compiler-rt can use ignore lists, which are
loosely modeled on valgrind's example. Upstream provides default lists
for AddressSanitizer, CFI, and MemorySanitizer, so install these in the
expected location, /usr/lib/clang/14.0.3/share.

Reviewed by:	emaste
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D35338
2022-05-28 15:46:38 +02:00
Peter Holm
4581e8e9a2 stress2: Added a syzkaler reproducer 2022-05-27 15:05:33 +02:00
Mateusz Piotrowski
9e4cd857ac Remove referenes to net.inet.tcp.local_slowstart_flightsize
Fixes:	9ec4a4cca5 Remove the ss_fltsz and ss_fltsz_local
2022-05-24 16:04:57 +02:00
Mateusz Piotrowski
af33f52b6c Remove remaining net.tcp.inflight* references from src
Fixes:	d8b03e05a9 The inflight bandwidth limiter was removed in
r212765.
2022-05-24 15:49:03 +02:00
Dimitry Andric
3a9a9c0ca4 Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:46:42 +02:00
Dimitry Andric
1fd87a682a Merge llvm-project main llvmorg-14-init-18294-gdb01b123d012
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18294-gdb01b123d012, the last commit before
the upstream release/14.x branch was created.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:44:47 +02:00
Dimitry Andric
04eeddc0aa Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:44:34 +02:00
Dimitry Andric
4824e7fd18 Merge llvm-project main llvmorg-14-init-11187-g222442ec2d71
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-11187-g222442ec2d71.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:43:49 +02:00
Dimitry Andric
5e801ac66d Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:43:32 +02:00
Peter Holm
13aacd0c0c stress2: Added a test scenario 2022-05-08 09:54:54 +02:00
Joseph Mingrone
4b3bf90900
mfc-candidates.sh: Set default target branch for ports
Approved by:	emaste, jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35096
2022-05-04 16:43:20 -03:00
Ed Maste
729ee78911 Remove stray .Pp from WITH_LOADER_EFI_SECUREBOOT description
MFC after:	3 days
Fixes:		13ea0450a9 ("Extend libsecureboot(old libve) to...")
Sponsored by:	The FreeBSD Foundation
2022-05-02 15:43:36 -04:00
Ed Maste
b7f53cdcf8 Update UNIFIED_OBJDIR descriptions
src.conf(5) previously stated they would be removed before FreeBSD 12.0,
but that did not happen.  Change it to "a future version of FreeBSD."

Also pick up LOADER_KBOOT change (enabled on x86) in src.conf regen.

Reported by:	jhb
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2022-05-02 14:02:31 -04:00
Ed Maste
60b08330a5 Correct markup in WITH_/WITHOUT_UNIFIED_OBJDIR descriptions
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2022-04-30 15:40:49 -04:00
Ed Maste
f768ecf247 Update WITH_PROFILE description as it is yet removed
GCC still wants to link against (for example) libc_p.a when -pg is in
use, and it's unclear when and how this will be addressed.  Change the
WITH_PROFILE option description to claim that it may be removed from an
unspecified future version of FreeBSD, rather than FreeBSD 14.

Reported by:	Steve Kargl
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-04-30 15:35:01 -04:00
Peter Holm
014a2b1a11 stress2: Fixed cleanup path error 2022-04-29 10:55:26 +02:00
Ed Maste
1a50bf77af Add a tool to find MFC candidates
usage: mfc-candidates.sh [-ah] [-f from_branch] [-t to_branch]
    [-u user] [-X exclude_file] [path ...]

This tool compares git commit hashes that are in from_branch and not in
to_branch with hashes listed in "cherry picked from" lines, finding
commits that may be MFC candidates.  By default it searches for commits
by ${USER} but that can be overridden with -u for a specific user or -a
for all.

gonzo@'s MFC tracker is a web application that presents this sort of
information in a more convenient way, and unlike this script it tracks
"MFC After" status and timing.  However, it is sometimes useful to be
able to perform an offline search against a local repo.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34208
2022-04-28 14:02:26 -04:00
Peter Holm
8a5c1f58dd stress2: Added a regression test 2022-04-28 09:41:27 +02:00
Peter Holm
29acff870b stress2: Added a syzkaller reproducer 2022-04-22 06:20:14 +02:00
Baptiste Daroussin
e87ec409fa locales: Update to CLDR 41.0 and Unicode 14.0
Relnotes:	yes
2022-04-21 14:16:40 +02:00
Peter Holm
af333da506 Added a test to the exclude list 2022-04-16 09:15:00 +02:00
Peter Holm
eaa3e829f0 stress2: Added a regression test 2022-04-16 09:14:36 +02:00
Peter Holm
1346766f60 stress2: Permanently disable disruptive tests 2022-04-14 06:57:24 +02:00
Ed Maste
4294299843 nanobsd: update ssh config files after 1323ec5712
Sponsored by:	The FreeBSD Foundation
2022-04-13 17:04:51 -04:00
Peter Holm
2f0baec1ec stress2: Fix cleanup after test run 2022-04-13 11:07:49 +02:00
Peter Holm
b06e3f990d stress2: Added comment 2022-04-13 11:04:36 +02:00
Peter Holm
4523edbeae stress2: Remove working tests from the exclude list 2022-04-13 11:03:32 +02:00
Peter Holm
40b97c41bc stress2: Add new write(2) test. Remove sctp.sh after problem fixed 2022-04-06 07:25:17 +02:00