Commit Graph

1013 Commits

Author SHA1 Message Date
Kyle Evans
fe815331bb build: provide a default WARNS for all in-tree builds
The current default is provided in various Makefile.inc in some top-level
directories and covers a good portion of the tree, but doesn't cover parts
of the build a little deeper (e.g. libcasper).

Provide a default in src.sys.mk and set WARNS to it in bsd.sys.mk if that
variable is defined. This lets us relatively cleanly provide a default WARNS
no matter where you're building in the src tree without breaking things
outside of the tree.

Crunchgen has been updated as a bootstrap tool to work on this change
because it needs r365605 at a minimum to succeed. The cleanup necessary to
successfully walk over this change on WITHOUT_CLEAN builds has been added.

There is a supplemental project to this to list all of the warnings that are
encountered when the environment has WARNS=6 NO_WERROR=yes:
https://warns.kevans.dev -- this project will hopefully eventually go away
in favor of CI doing a much better job than it.

Reviewed by:	emaste, brooks, ngie (all earlier version)
Reviewed by:	emaste, arichardson (depend-cleanup.sh change)
Differential Revision:	https://reviews.freebsd.org/D26455
2020-09-18 17:17:46 +00:00
Alexander V. Chernikov
4a8c6300e9 Use atf_fail instead of exit 1 to indicate mpath tests failure. 2020-09-18 07:27:01 +00:00
Mark Johnston
77ceadee6d Add some basic regression tests for SHM_LARGEPAGE.
Discussed with:	kib
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D25900
2020-09-17 16:44:12 +00:00
Andrew Turner
2a6803de1c Use MACHINE_CPUARCH when checking for arm64
Use MACHINE_CPUARCH with arm64 (aarch64) when we build code that could run
on any 64-bit Arm instruction set. This will simplify checks in downstream
consumers targeting prototype instruction sets.

The only place we check for MACHINE_ARCH == aarch64 is when building the
device tree blobs. As these are targeting current generation ISAs.

Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D26370
2020-09-14 16:12:28 +00:00
Li-Wen Hsu
e55e20a0e9 Revert r365592 and r365603 as the tests are fixed by r365593
PR:		249236
Sponsored by:	The FreeBSD Foundation
2020-09-11 05:45:27 +00:00
Alexander V. Chernikov
99efb80d00 Add basic test for net.fibs dynamic growth.
Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D26382
2020-09-10 19:25:51 +00:00
Kyle Evans
4d6265e3e4 Fix the build after r365592
r365592 accidentally mixed atf-c and atf-sh; convert atf_skip -> atf_tc_skip
2020-09-10 17:58:24 +00:00
Li-Wen Hsu
b804b5bca1 Temporarily skip failing sys.kern.memfd_test.* tests in CI
PR:		249236
Sponsored by:	The FreeBSD Foundation
2020-09-10 17:15:44 +00:00
Li-Wen Hsu
8e6b8fc655 Initialize len to avoid ENOMEM from sysctl(3).
PR:		248933
Sponsored by:	The FreeBSD Foundation
2020-09-04 19:24:27 +00:00
Konstantin Belousov
6eeccaa91b Fix kern_copyin test.
Main part is that kern_copyin on amd64 after LA57 should query the top
of UVA for correct operations. In fact it should started doing that
after the workaround for AMD bug with IRET in the last user page was
fixed by reducing UVA by a page.

Also since we started calculating top of UVA, fix MIPS according to
the comment.

Reported by:	lwhsu
PR:	248933
Reviewed by:	alc, markj
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D26312
2020-09-04 12:52:16 +00:00
Ryan Moeller
d29f13b904 Skip zpool_clear_005_pos test until bug fixed
Messing with gnop devices under a zpool fails in this test, causing
the pool to be suspended and eventually the system to deadlock.

Skip the test for now until the issue is resolved.

PR:		tests/248910
Discussed with:	lwhsu
Sponsored by:	iXsystems, Inc.
2020-08-25 20:04:35 +00:00
Matt Macy
9e5787d228 Merge OpenZFS support in to HEAD.
The primary benefit is maintaining a completely shared
code base with the community allowing FreeBSD to receive
new features sooner and with less effort.

I would advise against doing 'zpool upgrade'
or creating indispensable pools using new
features until this change has had a month+
to soak.

Work on merging FreeBSD support in to what was
at the time "ZFS on Linux" began in August 2018.
I first publicly proposed transitioning FreeBSD
to (new) OpenZFS on December 18th, 2018. FreeBSD
support in OpenZFS was finally completed in December
2019. A CFT for downstreaming OpenZFS support in
to FreeBSD was first issued on July 8th. All issues
that were reported have been addressed or, for
a couple of less critical matters there are
pull requests in progress with OpenZFS. iXsystems
has tested and dogfooded extensively internally.
The TrueNAS 12 release is based on OpenZFS with
some additional features that have not yet made
it upstream.

Improvements include:
  project quotas, encrypted datasets,
  allocation classes, vectorized raidz,
  vectorized checksums, various command line
  improvements, zstd compression.

Thanks to those who have helped along the way:
Ryan Moeller, Allan Jude, Zack Welch, and many
others.

Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D25872
2020-08-25 02:21:27 +00:00
Alexander V. Chernikov
5676d488c2 Add test for checking RTF_HOST and RTAX_NETMASK inconsistency.
RTF_HOST indicates whether route is a host route
 (netmask is empty or /{32,128}).
Check that if netmask is empty and host route is not specified, kernel
 returns an error.

Differential Revision:	https://reviews.freebsd.org/D26155
2020-08-22 18:14:05 +00:00
Alan Somers
8d2105da16 fusefs: fix the FUSE_FORGET unit test after r364064
Thanks to r364064, the name cache now returns a hit where previously it
would miss.  Adjust the expectations accordingly.

PR:		248583
Reported by:	lwhsu
MFC with:	r364064
2020-08-11 01:09:06 +00:00
Dimitry Andric
967348a966 Use static inline for iface_{setup,delete}_addr in tests/sys/net/routing.
This fixes possible link errors, similar to:

ld: error: undefined symbol: iface_setup_addr
>>> referenced by test_rtsock_l3.c:111 (tests/sys/net/routing/test_rtsock_l3.c:111)
>>>               test_rtsock_l3.o:(presetup_ipv4)
>>> referenced by test_rtsock_l3.c:79 (tests/sys/net/routing/test_rtsock_l3.c:79)
>>>               test_rtsock_l3.o:(presetup_ipv6)
>>> referenced by test_rtsock_l3.c:512 (tests/sys/net/routing/test_rtsock_l3.c:512)
>>>               test_rtsock_l3.o:(atfu_rtm_change_v4_gw_success_body)
>>> referenced 10 more times

In C (not C++), 'naked' inline is almost always a mistake. Either use
static inline (this is appropriate for most cases), or extern inline.

MFC after:	3 days
2020-08-08 11:06:27 +00:00
Bryan Drewery
3cee7cb269 Limit gmirror failpoint tests to the test worker
This avoids injecting errors into the test system's mirrors.

gnop seems like a good solution here but it injects errors at the wrong
place vs where these tests expect and does not support a 'max global count'
like the failpoints do with 'n*' syntax.

Reviewed by:	cem, vangyzen
Sponsored by:	Dell EMC Isilon
2020-07-23 23:29:50 +00:00
Li-Wen Hsu
5f2d3b42de Fix sys.geom.class.eli.onetime_test.onetime after r363402
PR:		247954
X-MFC with:	r363402
Sponsored by:	The FreeBSD Foundation
2020-07-22 17:37:11 +00:00
Alan Somers
aafaa8b794 Fix geli's null cipher, and add a test case
PR:		247954
Submitted by:	jhb (sys), asomers (tests)
Reviewed by:	jhb (tests), asomers (sys)
MFC after:	2 weeks
Sponsored by:	Axcient
2020-07-21 19:18:29 +00:00
Chuck Silvers
3b41d99d76 add a few tests for sendfile.
Reviewed by:	markj
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D25431
2020-07-20 20:36:32 +00:00
Alan Somers
2a7a4b196d tests/sys/opencrypto: use python3
python2 will be EOL soon

Reviewed by:	lwhsu, jmg
MFC after:	2 weeks
Sponsored by:	Axcient
Differential Revision:	https://reviews.freebsd.org/D25682
2020-07-20 12:47:15 +00:00
Mark Johnston
9a1184de2a Add safexcel(4) to cryptotest.
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC (Netgate)
2020-07-14 14:11:54 +00:00
Enji Cooper
cdb9318eed Don't leave path behind when executing :chflags_success
Prior to this change a `SF_IMMUTABLE` chflagsat(2)'ed file (`path`) was left
behind, which sabotaged kyua(1) from being able to clean up the work directory,
This resulted in unnecessary work for folks having to clean up the work
directory on non-disposable systems, which defaults to `/tmp`. Use `UF_OFFLINE`
instead of `SF_IMMUTABLE`, in part because setting `SF_IMMUTABLE` isn't relevant
to the test and `SF_IMMUTABLE` cannot be cleared at all securelevels, as pointed
out by @asomers.

Additional work is required to catch cases like this upfront in the future to
avoid tester headache. See PR # 247765 for more details/followup.

Suggested by:	asomers
Reviewed By:	asomers, #tests
MFC after:	1 week
PR:		247761
Sponsored by:	DellEMC
Differential Revision: https://reviews.freebsd.org/D25561
2020-07-12 17:16:57 +00:00
Kyle Evans
423a033ba7 memfd_create: turn on SHM_GROW_ON_WRITE
memfd_create fds will no longer require an ftruncate(2) to set the size;
they'll grow (to the extent that it's possible) upon write(2)-like syscalls.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D25502
2020-07-10 00:45:16 +00:00
Alan Somers
6f818c1fb0 geli: enable direct dispatch
geli does all of its crypto operations in a separate thread pool, so
g_eli_start, g_eli_read_done, and g_eli_write_done don't actually do very
much work. Enabling direct dispatch eliminates the g_up/g_down bottlenecks,
doubling IOPs on my system. This change does not affect the thread pool.

Reviewed by:	markj
MFC after:	2 weeks
Sponsored by:	Axcient
Differential Revision:	https://reviews.freebsd.org/D25587
2020-07-08 17:12:12 +00:00
Alexander V. Chernikov
eddfb2e86f Fix IPv6 regression introduced by r362900.
PR:		kern/247729
2020-07-03 08:06:26 +00:00
Li-Wen Hsu
2749666d01 Temporarily skip sys.netinet6.redirect.valid_redirect in CI
PR:		247729
Sponsored by:	The FreeBSD Foundation
2020-07-03 02:02:34 +00:00
Edward Tomasz Napierala
7a9a01db9f Make sys.auditpipe depend on /dev/auditpipe. This fixes a few failures
on armv7.

MFC after:	2 weeks
Sponsored by:	DARPA
2020-06-24 12:17:40 +00:00
Li-Wen Hsu
f29bf91a23 Temporarily skip unstable sys.geom.class.gate.ggate_test.ggated on i386 in CI
PR:		244737
Sponsored by:	The FreeBSD Foundation
2020-06-24 07:25:54 +00:00
Edward Tomasz Napierala
a8ca275b7d Make audit tests depend on /dev/auditpipe. This should fix
some 416 failing tests on armv7:

https://ci.freebsd.org/job/FreeBSD-head-armv7-test/lastCompletedBuild/testReport/

Reviewed by:	asomers
MFC after:	2 weeks
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D25144
2020-06-18 15:41:16 +00:00
Li-Wen Hsu
435166f877 Skip sys.net.if_lagg_test.lacp_linkstate_destroy_stress in CI because of panic
PR:		244168
Sponsored by:	The FreeBSD Foundation
2020-06-11 18:59:57 +00:00
Kristof Provost
048c96e3e6 bridge tests: Re-enable STP test
This test should no longer provoke large amounts of traffic, which can
overwhelm single-core systems, preventing them from making progress in the
tests.

The test can now be re-enabled.

PR:		246448
2020-06-07 13:53:02 +00:00
Kristof Provost
e07e002e95 bridge tests: Avoid building a switching loop
Enable STP before bringing the bridges up. This avoids a switching loop,
which has a tendency to drown out progress in userspace processes,
especially on single-core systems.

Only check that we have indeed shut down one of the looped interfaces

PR:		246448
Reviewed by:	melifaro
Differential Revision:	https://reviews.freebsd.org/D25084
2020-06-01 19:26:16 +00:00
Li-Wen Hsu
4d3aef0780 Revert r361497, these cases are fixed by r361617.
PR:		246737
Sponsored by:	The FreeBSD Foundation
2020-05-29 10:09:47 +00:00
Shteryana Shopova
a7a64b722b Proper check if divert(4) module is present by the relevant tests
Fix the netinet/netinet6 divert tests falsely reporting 'ipdivert module is
not loaded' when the divert module is built into the kernel

Sponsored by:	Axiado
Differential Revision:	https://reviews.freebsd.org/D25026
2020-05-27 16:33:00 +00:00
Li-Wen Hsu
c4e61d8568 Disable failing test cases in CI:
sys.netipsec.tunnel.aes_cbc_128_hmac_sha1.v4
sys.netipsec.tunnel.aes_cbc_256_hmac_sha2_256.v4
sys.netipsec.tunnel.aesni_aes_cbc_128_hmac_sha1.v4
sys.netipsec.tunnel.aesni_aes_cbc_256_hmac_sha2_256.v4

PR:		246737
Sponsored by:	The FreeBSD Foundation
2020-05-26 06:55:03 +00:00
Alan Somers
bfcb817bcd Fix issues with FUSE_ACCESS when default_permissions is disabled
This patch fixes two issues relating to FUSE_ACCESS when the
default_permissions mount option is disabled:

* VOP_ACCESS() calls with VADMIN set should never be sent to a fuse server
  in the form of FUSE_ACCESS operations. The FUSE protocol has no equivalent
  of VADMIN, so we must evaluate such things kernel-side, regardless of the
  default_permissions setting.

* The FUSE protocol only requires FUSE_ACCESS to be sent for two purposes:
  for the access(2) syscall and to check directory permissions for
  searchability during lookup. FreeBSD sends it much more frequently, due to
  differences between our VFS and Linux's, for which FUSE was designed. But
  this patch does eliminate several cases not required by the FUSE protocol:

  * for any FUSE_*XATTR operation
  * when creating a new file
  * when deleting a file
  * when setting timestamps, such as by utimensat(2).

* Additionally, when default_permissions is disabled, this patch removes one
  FUSE_GETATTR operation when deleting a file.

PR:		245689
Reported by:	MooseFS FreeBSD Team <freebsd@moosefs.pro>
Reviewed by:	cem
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D24777
2020-05-22 18:11:17 +00:00
Mark Johnston
9bf12bb91d Avoid hard-coding pipe buffer sizes in the pipe and fifo kqueue tests.
Fix some style issues in the modified tests while here.

Reported by:	Jenkins via lwhsu
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2020-05-20 17:48:18 +00:00
Edward Tomasz Napierala
f464bd04ce Make sys.net.if_bridge_test depend on python; sys.net.if_bridge_test.span
requires it.

MFC after:	2 weeks
Sponsored by:	DARPA
2020-05-19 21:55:29 +00:00
Edward Tomasz Napierala
b43bd1070c Make sys.netinet.output and sys.netinet6.output6 tests depend on python;
they need to be able to run net_receiver.py.

MFC after:	2 weeks
Sponsored by:	DARPA
2020-05-19 21:48:45 +00:00
Li-Wen Hsu
6c9dbd8b13 Revert r361237, it's fixed by r361231
PR:		246560
Sponsored by:	The FreeBSD Foundation
2020-05-19 07:16:09 +00:00
Li-Wen Hsu
3f5fe78b9a Temporarily disable test case causes kernel panic in CI:
- sys.netinet.so_reuseport_lb_test.basic_ipv6

PR:		246560
Sponsored by:	The FreeBSD Foundation
2020-05-19 02:07:08 +00:00
Li-Wen Hsu
f9777376b9 Revert 357780, dtrace -c has been fixed in head`
PR:		244053
Sponsored by:	The FreeBSD Foundation
2020-05-18 23:43:48 +00:00
Alan Somers
275379902e fusefs: fix intermittency in some ENOENT tests
When a FUSE operation other than LOOKUP returns ENOENT, the kernel will
reclaim that vnode, resuling in a FUSE_FORGET being sent a short while
later.  Many of the ENOENT tests weren't expecting those FUSE_FORGET
operations.  They usually passed by luck since FUSE_FORGET is often delayed.
This commit adds appropriate expectations.

MFC after:	2 weeks
2020-05-18 18:36:32 +00:00
Alan Somers
8bebfe076d Reenable sys.geom.class.gate.ggate_test.ggated in CI
Should be fixed by r360613

PR:		244737
Reported by:	lwhsu
2020-05-17 02:41:50 +00:00
Kyle Evans
1d2e31af14 pf tests: fix up a couple WARNS= 6 nits
common_init_tbl is only used within this single CU, so it should be marked
static.

WARNS=6 also complained about the var defined by
`ATF_TC_WITH_CLEANUP(getastats);` being unused, which turns out to be
because it's not been hooked up in ATF_TP_ADD_TCS. kp@ did not immediately
recall any reason for this, and the case passes on my local system, so hook
it up.

Note that I've not yet set WARNS= 6 here. Investigation is underway to see
if we can feasibly default WARNS to 6 for src builds to catch directories
too deep to inherit a WARNS from the top-level subdirectories' Makefile.inc.
Those particular WARNS settings will be subsequently removed as they become
redundant with a more-global default.

MFC after:	1 week
2020-05-14 23:20:58 +00:00
Li-Wen Hsu
b18e0a534f Only skip sys.net.if_clone_test.epair_stress in CI env
PR:		246443
Sponsored by:	The FreeBSD Foundation
2020-05-13 20:37:46 +00:00
Li-Wen Hsu
bf3dd13d41 Temporarily skip sys.net.if_bridge_test.stp in CI as it always times out
PR:		244229
Sponsored by:	The FreeBSD Foundation
2020-05-13 20:36:38 +00:00
Li-Wen Hsu
40988c2456 Temporarily skip sys.net.if_clone_test.epair_stress
This case timed out so often

PR:		246443
Sponsored by:	The FreeBSD Foundation
2020-05-13 19:29:14 +00:00
Mark Johnston
17dd52dfab Add a basic table entry counter regression test.
Reviewed by:	kp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D24809
2020-05-11 19:08:03 +00:00
Mark Johnston
96bc58ea81 Remove the svn:executable property from some pf test files.
The test makefiles will handle setting mode bits during install.  Also,
Phabricator gets upset when uploading an executable plain-text file
without a shebang.

MFC after:	1 week
2020-05-11 19:07:33 +00:00