aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* net tests: Re-enable most if_clone testsKristof Provost2020-12-171-16/+0
| | | | | | | | All but one of these (tap_ipv6_up_stress) currently pass, so we should enable them so we don't regress. Notes: svn path=/head/; revision=368743
* posixshm_test.c: remove tautological checksRyan Libby2020-12-111-2/+0
| | | | | | | | | Reviewed by: kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27564 Notes: svn path=/head/; revision=368570
* fdgrowtable_test.c: appease gccRyan Libby2020-12-111-1/+1
| | | | | | | | | | | | | Work around bogus gcc -Wreturn-type. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44511 Reviewed by: kevans, rew Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27563 Notes: svn path=/head/; revision=368569
* New Netgraph module ng_macfilter:Nick Hibma2020-12-083-0/+445
| | | | | | | | | | | | | | | Macfilter to route packets through different hooks based on sender MAC address. Based on ng_macfilter written by Pekka Nikander Sponsered by Retina b.v. Reviewed by: afedorov MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27268 Notes: svn path=/head/; revision=368443
* ossl: port to arm64Mitchell Horne2020-12-041-1/+1
| | | | | | | | | | | | | | Enable in-kernel acceleration of SHA1 and SHA2 operations on arm64 by adding support for the ossl(4) crypto driver. This uses OpenSSL's assembly routines under the hood, which will detect and use SHA intrinsics if they are supported by the CPU. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27390 Notes: svn path=/head/; revision=368350
* pf tests: Test case for bug #251414Kristof Provost2020-12-021-0/+39
| | | | | | | | | | | | Changing a table from not having counters to having counters (or vice versa) may trigger panics. PR: 251414 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27441 Notes: svn path=/head/; revision=368277
* AIO tests: update expected failure messages after r368265Alan Somers2020-12-021-7/+2
| | | | | | | | | PR: 220398, 251515 MFC after: 1 week MFC-With: r368265 Notes: svn path=/head/; revision=368272
* pf tests: Re-enable panicing testsKristof Provost2020-12-013-6/+0
| | | | | | | | | | | We've fixed the vnet/epair cleanup race, so it is now safe to re-enable these tests. MFC after: 2 weeks Sponsored by: Modirum MDPay Notes: svn path=/head/; revision=368239
* ping: fix some man pages and tests after r368045Alan Somers2020-11-269-31/+31
| | | | | | | MFC-with: r368045 Notes: svn path=/head/; revision=368046
* Remove uses of CRIOGET in OCF tests after r368005.John Baldwin2020-11-253-32/+7
| | | | | | | | | Pointy hat to: jhb Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D27367 Notes: svn path=/head/; revision=368008
* pf tests: provoke tag hashing panicKristof Provost2020-11-241-0/+38
| | | | | | | | | | Attempt to provoke the panic fixed in r367987. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27350 Notes: svn path=/head/; revision=367990
* fd: free old file descriptor tables when not sharedRobert Wing2020-11-222-0/+269
| | | | | | | | | | | | | | | | | During the life of a process, new file descriptor tables may be allocated. When a new table is allocated, the old table is placed in a free list and held onto until all processes referencing them exit. When a new file descriptor table is allocated, the old file descriptor table can be freed when the current process has a single-thread and the file descriptor table is not being shared with any other processes. Reviewed by: kevans Approved by: kevans (mentor) Differential Revision: https://reviews.freebsd.org/D18617 Notes: svn path=/head/; revision=367927
* pf tests: Basic source tracking testKristof Provost2020-11-202-0/+67
| | | | | | | | MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27255 Notes: svn path=/head/; revision=367869
* Add a regression test for the port-selection behavior fixed in r367680.Jonathan T. Looney2020-11-142-1/+336
| | | | | | | | | Reviewed by: markj, olivier, tuexen Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27173 Notes: svn path=/head/; revision=367685
* [tests] Fix unused variable warning in gccAdrian Chadd2020-11-131-2/+1
| | | | | | | | | Reviewed by: markj, imp, cem, Approved by: markj Differential Revision: https://reviews.freebsd.org/D26792 Notes: svn path=/head/; revision=367647
* cryptotest: Add qat(4) coverageMark Johnston2020-11-051-2/+3
| | | | | | | | MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/head/; revision=367388
* Make the tests work without COMPAT_FREEBSD12 in kernel.Jung-uk Kim2020-11-043-6/+6
| | | | | | | | | sysctl 'kern.cryptodevallowsoft' was renamed to 'kern.crypto.allow_soft' in r359374 and the prevous one is only available in kernel built with "options COMPAT_FREEBSD12". Notes: svn path=/head/; revision=367351
* Add ossl(4) to cryptotest.Jung-uk Kim2020-10-302-2/+3
| | | | Notes: svn path=/head/; revision=367185
* Drop "All rights reserved" from all my stuff. This includesEdward Tomasz Napierala2020-10-2812-12/+0
| | | | | | | | | | | | Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980 Notes: svn path=/head/; revision=367105
* Do not recommend to install kyua with pkg in the tests READMEMateusz Piotrowski2020-10-271-6/+4
| | | | | | | | | Kyua is now available in the base system. While here, reword the usage section a bit. Notes: svn path=/head/; revision=367074
* Add support for stacked VLANs (IEEE 802.1ad, AKA Q-in-Q).Alexander V. Chernikov2020-10-211-0/+178
| | | | | | | | | | | | | | | | | | | | | 802.1ad interfaces are created with ifconfig using the "vlanproto" parameter. Eg., the following creates a 802.1Q VLAN (id #42) over a 802.1ad S-VLAN (id #5) over a physical Ethernet interface (em0). ifconfig vlan5 create vlandev em0 vlan 5 vlanproto 802.1ad up ifconfig vlan42 create vlandev vlan5 vlan 42 inet 10.5.42.1/24 VLAN_MTU, VLAN_HWCSUM and VLAN_TSO capabilities should be properly supported. VLAN_HWTAGGING is only partially supported, as there is currently no IFCAP_VLAN_* denoting the possibility to set the VLAN EtherType to anything else than 0x8100 (802.1ad uses 0x88A8). Submitted by: Olivier Piras Sponsored by: RG Nets Differential Revision: https://reviews.freebsd.org/D26436 Notes: svn path=/head/; revision=366917
* Try to enable multipath routing in flowid tests.Alexander V. Chernikov2020-10-162-2/+25
| | | | Notes: svn path=/head/; revision=366773
* Fix write only mappings on arm64Andrew Turner2020-10-131-0/+16
| | | | | | | | | | | | When trapping on a wrote access to a buffer the kernel has mapped as write only we should only pass the VM_PROT_WRITE flag. Previously the call to vm_fault_trap as the VM_PROT_READ flag was unexpected. Reported by: manu Sponsored by: Innovate UK Notes: svn path=/head/; revision=366665
* pf tests: Test that 'set skip on <group>' works on new group membersKristof Provost2020-10-121-0/+33
| | | | | | | | | | | | | | | There's a know issue where new group members don't get the 'set skip on' applied until the rules are re-loaded. Do this by setting rules that block all traffic, but skip members of the 'epair' group. If we can communicate over the epair interface we know the set skip rule took effect, even if the rule was set before the interface was created. MFC after: 2 weeks Notes: svn path=/head/; revision=366648
* Temporarily skip failing test cases in CI:Li-Wen Hsu2020-10-071-0/+6
| | | | | | | | | | | sys.capsicum.functional.Capability__NoBypassDAC sys.capsicum.functional.Pdfork__OtherUserForked PR: 250178, 250179 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=366512
* Skip test written in Googltest in the wrapper scriptLi-Wen Hsu2020-10-071-1/+4
| | | | | | | | | | | This leaves the main test body untouched and only skip running in the CI env, makes doing local test easier while developing. PR: 244165 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=366509
* Temporarily skip failing test cases in CI:Li-Wen Hsu2020-10-061-1/+21
| | | | | | | | | | | sys.capsicum.functional.ForkedOpenatTest_WithFlagInCapabilityMode___ sys.capsicum.functional.OpenatTest__WithFlag PR: 249960 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=366485
* Make capsicum test cases fine-grainedLi-Wen Hsu2020-10-062-1/+70
| | | | | | | | | | | | | | | Add a wrapping script to use ATF to run tests written with Googletest one by one. This helps locating and tracking the failing case in CI easier. This is a temporarily solution while Googletest support in Kyua is developing. We will revert this once Kyua+Googletest integration is ready. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25896 Notes: svn path=/head/; revision=366470
* Clear the dmesg buffer to prevent rotating causes issuesLi-Wen Hsu2020-10-061-0/+2
| | | | | | | | | | | | | | | This is a workaround for the current continuously failing test case sys.kern.sonewconn_overflow.sonewconn_overflow_01 The side effect is the dmesg buffer got cleared and may effect other tests depends on dmesg output running in parallel. The better solution would be tailing the log file like /var/log/debug.log Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=366469
* Fix route flags update during RTM_CHANGE.Alexander V. Chernikov2020-10-041-11/+111
| | | | | | | | | | | | | | | | | | | Nexthop lookup was not consireding rt_flags when doing structure comparison, which lead to an original nexthop selection when changing flags. Fix the case by adding rt_flags field into comparison and rearranging nhop_priv fields to allow for efficient matching. Fix `route change X/Y flags` case - recent changes disallowed specifying RTF_GATEWAY flag without actual gateway. It turns out, route(8) fills in RTF_GATEWAY by default, unless -interface flag is specified. Fix regression by clearing RTF_GATEWAY flag instead of failing. Fix route flag reporting in RTM_CHANGE messages by explicitly updating rtm_flags after operation competion. Add IPv4/IPv6 tests for flag-only route changes. Notes: svn path=/head/; revision=366424
* fusefs tests: quell Coverity "Argument cannot be negative" warningsAlan Somers2020-10-029-55/+55
| | | | | | | | | | | | | Must abort tests early if open(2) fails. Reported by: Coverity Coverity CID: 1432810 and many others Reviewed by: kevans MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26635 Notes: svn path=/head/; revision=366365
* Do a sweep and remove most WARNS=6 settingsKyle Evans2020-10-0114-26/+0
| | | | | | | | | | | | | | | Repeating the default WARNS here makes it slightly more difficult to experiment with default WARNS changes, e.g. if we did something absolutely bananas and introduced a WARNS=7 and wanted to try lifting the default to that. Drop most of them; there is one in the blake2 kernel module, but I suspect it should be dropped -- the default WARNS in the rest of the build doesn't currently apply to kernel modules, and I haven't put too much thought into whether it makes sense to make it so. Notes: svn path=/head/; revision=366304
* Enable SO_LINGER to the so_reuseport_lb_test regression tests, preventingOlivier Cochard2020-09-251-0/+5
| | | | | | | | | | | | | many sockets in TIME_WAIT state at the end of the test. PR: 249885 Reviewed by: markj Approved by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26549 Notes: svn path=/head/; revision=366159
* fusefs: fix mmap'd writes in direct_io modeAlan Somers2020-09-241-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | If a FUSE server returns FOPEN_DIRECT_IO in response to FUSE_OPEN, that instructs the kernel to bypass the page cache for that file. This feature is also known by libfuse's name: "direct_io". However, when accessing a file via mmap, there is no possible way to bypass the cache completely. This change fixes a deadlock that would happen when an mmap'd write tried to invalidate a portion of the cache, wrongly assuming that a write couldn't possibly come from cache if direct_io were set. Arguably, we could instead disable mmap for files with FOPEN_DIRECT_IO set. But allowing it is less likely to cause user complaints, and is more in keeping with the spirit of open(2), where O_DIRECT instructs the kernel to "reduce", not "eliminate" cache effects. PR: 247276 Reported by: trapexit@spawn.link Reviewed by: cem MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26485 Notes: svn path=/head/; revision=366121
* tests: move the memfd tests over to sys/posixshmKyle Evans2020-09-233-1/+1
| | | | | | | | | | | memfd_create is implemented on top of posixshm, so this is a logically correct place for them to be. Moreover, this reduces the number of places to look to run tests when working in this part of the tree. Discussed with: kib (to some extent, a while ago) Notes: svn path=/head/; revision=366093
* build: provide a default WARNS for all in-tree buildsKyle Evans2020-09-184-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=365887
* Use atf_fail instead of exit 1 to indicate mpath tests failure.Alexander V. Chernikov2020-09-182-23/+12
| | | | Notes: svn path=/head/; revision=365874
* Add some basic regression tests for SHM_LARGEPAGE.Mark Johnston2020-09-171-0/+727
| | | | | | | | | | Discussed with: kib Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D25900 Notes: svn path=/head/; revision=365840
* Use MACHINE_CPUARCH when checking for arm64Andrew Turner2020-09-141-1/+1
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=365726
* Revert r365592 and r365603 as the tests are fixed by r365593Li-Wen Hsu2020-09-111-15/+0
| | | | | | | | PR: 249236 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365625
* Add basic test for net.fibs dynamic growth.Alexander V. Chernikov2020-09-104-2/+168
| | | | | | | | Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D26382 Notes: svn path=/head/; revision=365609
* Fix the build after r365592Kyle Evans2020-09-101-5/+5
| | | | | | | r365592 accidentally mixed atf-c and atf-sh; convert atf_skip -> atf_tc_skip Notes: svn path=/head/; revision=365603
* Temporarily skip failing sys.kern.memfd_test.* tests in CILi-Wen Hsu2020-09-101-0/+15
| | | | | | | | PR: 249236 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365592
* Initialize len to avoid ENOMEM from sysctl(3).Li-Wen Hsu2020-09-041-0/+1
| | | | | | | | PR: 248933 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365337
* Fix kern_copyin test.Konstantin Belousov2020-09-041-12/+47
| | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=365327
* Skip zpool_clear_005_pos test until bug fixedRyan Moeller2020-08-251-0/+1
| | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=364783
* Merge OpenZFS support in to HEAD.Matt Macy2020-08-251-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=364746
* Add test for checking RTF_HOST and RTAX_NETMASK inconsistency.Alexander V. Chernikov2020-08-221-1/+25
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=364489
* fusefs: fix the FUSE_FORGET unit test after r364064Alan Somers2020-08-111-1/+2
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=364094
* Use static inline for iface_{setup,delete}_addr in tests/sys/net/routing.Dimitry Andric2020-08-081-2/+2
| | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=364050