|
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0 |
|
| #
2d4c599e |
| 18-Aug-2021 |
Cyril Zhang <[email protected]> |
vmm: Add credential to cdev object
Add a credential to the cdev object in sysctl_vmm_create(), then check that we have the correct credentials in sysctl_vmm_destroy(). This prevents a process in one
vmm: Add credential to cdev object
Add a credential to the cdev object in sysctl_vmm_create(), then check that we have the correct credentials in sysctl_vmm_destroy(). This prevents a process in one jail from opening or destroying the /dev/vmm file corresponding to a VM in a sibling jail.
Add regression tests.
Reviewed by: jhb, markj Sponsored by: The FreeBSD Foundation
(cherry picked from commit a85404906bc8f402318524b4ccd196712fc09fbd)
show more ...
|
| #
ae2e0542 |
| 06-Jul-2021 |
Ed Maste <[email protected]> |
Skip netgraph tests when WITHOUT_NETGRAPH is set
PR: 256986 Reported by: John Marshall MFC after: 1 week Sponsored by: The FreeBSD Foundation
(cherry picked from commit c9144ec14d2a5a53cfe91ada1b3
Skip netgraph tests when WITHOUT_NETGRAPH is set
PR: 256986 Reported by: John Marshall MFC after: 1 week Sponsored by: The FreeBSD Foundation
(cherry picked from commit c9144ec14d2a5a53cfe91ada1b3b9c06b78dc999)
show more ...
|
|
Revision tags: release/13.0.0 |
|
| #
e8db04c3 |
| 08-Dec-2020 |
Nick Hibma <[email protected]> |
New Netgraph module ng_macfilter:
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
New Netgraph module ng_macfilter:
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
show more ...
|
|
Revision tags: release/12.2.0, release/11.4.0 |
|
| #
475b483a |
| 13-Feb-2020 |
Kristof Provost <[email protected]> |
tests: Enable net tests
We have a number of tests in the net subdirectory that were not executed. List the net directory so we run those tests.
|
|
Revision tags: release/12.1.0 |
|
| #
f74e6e49 |
| 21-Oct-2019 |
Bjoern A. Zeeb <[email protected]> |
frag6: import a set of test cases
In order to ensure that changing the frag6 code does not change behaviour or break code a set of test cases were implemented.
Like some other test cases these use
frag6: import a set of test cases
In order to ensure that changing the frag6 code does not change behaviour or break code a set of test cases were implemented.
Like some other test cases these use Scapy to generate packets and possibly wait for expected answers. In most cases we do check the global and per interface (netstat) statistics output using the libxo output and grep to validate fields and numbers. This is a bit hackish but we currently have no better way to match a selected number of stats only (we have to ignore some of the ND6 variables; otherwise we could use the entire list).
Test cases include atomic fragments, single fragments, multi-fragments, and try to cover most error cases in the code currently. In addition vnet teardown is tested to not panic.
A separate set (not in-tree currently) of probes were used in order to make sure that the test cases actually test what they should.
The "sniffer" code was copied and adjusted from the netpfil version as we sometimes will not get packets or have longer timeouts to deal with.
Sponsored by: Netflix
show more ...
|
|
Revision tags: release/11.3.0 |
|
| #
403c0413 |
| 17-Jun-2019 |
Conrad Meyer <[email protected]> |
random(4): Add regression tests for uint128 implementation, Chacha CTR
Add some basic regression tests to verify behavior of both uint128 implementations at typical boundary conditions, to run on al
random(4): Add regression tests for uint128 implementation, Chacha CTR
Add some basic regression tests to verify behavior of both uint128 implementations at typical boundary conditions, to run on all architectures.
Test uint128 increment behavior of Chacha in keystream mode, as used by 'kern.random.use_chacha20_cipher=1' (r344913) to verify assumptions at edge cases. These assumptions are critical to the safety of using Chacha as a PRF in Fortuna (as implemented).
(Chacha's use in arc4random is safe regardless of these tests, as it is limited to far less than 4 billion blocks of output in that API.)
Reviewed by: markm Approved by: secteam(gordon) Differential Revision: https://reviews.freebsd.org/D20392
show more ...
|
| #
06aac31a |
| 04-Mar-2019 |
Kristof Provost <[email protected]> |
tests: Move common (vnet) test functions into a common file
The netipsec and pf tests have a number of common test functions. These used to be duplicated, but it makes more sense for them to re-use
tests: Move common (vnet) test functions into a common file
The netipsec and pf tests have a number of common test functions. These used to be duplicated, but it makes more sense for them to re-use the common functions.
PR: 236223
show more ...
|
| #
2a8682a8 |
| 31-Dec-2018 |
Vincenzo Maffione <[email protected]> |
netmap: add suite of unit tests
Import the unit tests from upstream (https://github.com/luigirizzo/netmap ba02539859d46d33), and make them ready for use with Kyua. There are currently 38 regression
netmap: add suite of unit tests
Import the unit tests from upstream (https://github.com/luigirizzo/netmap ba02539859d46d33), and make them ready for use with Kyua. There are currently 38 regression tests, which test the kernel control ABI exposed by netmap to userspace applications:
1: test for port info get 2-5: tests for basic port registration 6-9: tests for VALE 10-11: tests for getting netmap allocator info 12-15: tests for netmap pipes 16: test on polling mode 17-18: tests on options 19-27: tests for sync-kloop subsystem 28-39: tests for null ports 31-38: tests for the legacy NIOCREGIF registers
Reviewed by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18490
show more ...
|
| #
b1ce931b |
| 17-Dec-2018 |
Alan Somers <[email protected]> |
Conditionalize installtion audit(4) tests on MK_AUDIT
MK_AUDIT already controls auditd(8), praudit(1), etc. It should also control the audit test suite.
Submitted by: ngie MFC after: 2 weeks Pull
Conditionalize installtion audit(4) tests on MK_AUDIT
MK_AUDIT already controls auditd(8), praudit(1), etc. It should also control the audit test suite.
Submitted by: ngie MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd/pull/240
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
3468bf40 |
| 26-Jul-2018 |
Alan Somers <[email protected]> |
Introduce test program for auditpipe(4)
Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16395
|
|
Revision tags: release/11.2.0 |
|
| #
e5569cb6 |
| 30-May-2018 |
Alan Somers <[email protected]> |
Revert r334362
Reconnect tests/sys/audit now that the GCC issue is fixed by 334388
MFC after: 2 weeks X-MFC-With: 334362, 334360, 334388
|
| #
16b88f72 |
| 30-May-2018 |
Ed Maste <[email protected]> |
Temporarily disconnect audit tests
Audit tests added in r334360 broke the build on a number of archs. Remove the subdir from the top level tests/sys/Makefile until they're fixed.
|
| #
f7f4e0f7 |
| 29-May-2018 |
Alan Somers <[email protected]> |
Add initial set of tests for audit(4)
This change includes the framework for testing the auditability of various syscalls, and includes changes for the first 12. The tests will start auditd(8) if n
Add initial set of tests for audit(4)
This change includes the framework for testing the auditability of various syscalls, and includes changes for the first 12. The tests will start auditd(8) if needed, though they'll be much faster if it's already running. The syscalls tested in this commit include mkdir(2), mkdirat(2), mknod(2), mknodat(2), mkfifo(2), mkfifoat(2), link(2), linkat(2), symlink(2), symlinkat(2), rename(2), and renameat(2).
Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15286
show more ...
|
| #
8ce99bb4 |
| 17-Apr-2018 |
John Baldwin <[email protected]> |
Properly do a deep copy of the ioctls capability array for fget_cap().
fget_cap() tries to do a cheaper snapshot of a file descriptor without holding the file descriptor lock. This snapshot does no
Properly do a deep copy of the ioctls capability array for fget_cap().
fget_cap() tries to do a cheaper snapshot of a file descriptor without holding the file descriptor lock. This snapshot does not do a deep copy of the ioctls capability array, but instead uses a different return value to inform the caller to retry the copy with the lock held. However, filecaps_copy() was returning 1 to indicate that a retry was required, and fget_cap() was checking for 0 (actually '!filecaps_copy()'). As a result, fget_cap() did not do a deep copy of the ioctls array and just reused the original pointer. This cause multiple file descriptor entries to think they owned the same pointer and eventually resulted in duplicate frees.
The only code path that I'm aware of that triggers this is to create a listen socket that has a restricted list of ioctls and then call accept() which calls fget_cap() with a valid filecaps structure from getsock_cap().
To fix, change the return value of filecaps_copy() to return true if it succeeds in copying the caps and false if it fails because the lock is required. I find this more intuitive than fixing the caller in this case. While here, change the return type from 'int' to 'bool'.
Finally, make filecaps_copy() more robust in the failure case by not copying any of the source filecaps structure over. This avoids the possibility of leaking a pointer into a structure if a similar future caller doesn't properly handle the return value from filecaps_copy() at the expense of one more branch.
I also added a test case that panics before this change and now passes.
Reviewed by: kib Discussed with: mjg (not a fan of the extra branch) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15047
show more ...
|
| #
2fae26bd |
| 23-Feb-2018 |
Alan Somers <[email protected]> |
Add the ZFS test suite
It was originally written by Sun as part of the STF (Solaris test framework). They open sourced it in OpenSolaris, then HighCloud partially ported it to FreeBSD, and Spectra L
Add the ZFS test suite
It was originally written by Sun as part of the STF (Solaris test framework). They open sourced it in OpenSolaris, then HighCloud partially ported it to FreeBSD, and Spectra Logic finished the port. We also added many testcases, fixed many broken ones, and converted them all to the ATF framework. We've had help along the way from avg, araujo, smh, and brd.
By default most of the tests are disabled. Set the disks Kyua variable to enable them.
Submitted by: asomers, will, justing, ken, brd, avg, araujo, smh Sponsored by: Spectra Logic Corp, HighCloud
show more ...
|
| #
4fbebc74 |
| 03-Dec-2017 |
Kristof Provost <[email protected]> |
Add IPSec tests in tunnel mode
Some IPSec in tunnel mode allowing to test multiple IPSec configurations. These tests are reusing the jail/vnet scripts from pf tests for generating complex network.
Add IPSec tests in tunnel mode
Some IPSec in tunnel mode allowing to test multiple IPSec configurations. These tests are reusing the jail/vnet scripts from pf tests for generating complex network.
Submitted by: olivier@ Differential Revision: https://reviews.freebsd.org/D13017
show more ...
|
| #
1d6f5f21 |
| 06-Oct-2017 |
Kristof Provost <[email protected]> |
pf: Basic automated test using VIMAGE
If VIMAGE is present we can start jails with their own pf instance. This makes it fairly easy to run tests. For example, this basic test verifies that drop/pass
pf: Basic automated test using VIMAGE
If VIMAGE is present we can start jails with their own pf instance. This makes it fairly easy to run tests. For example, this basic test verifies that drop/pass and icmp classification works. It's a basic sanity test for pf, and hopefully an example on how to write more pf tests.
The tests are skipped if VIMAGE is not enabled.
This work is inspired by the GSoC work of Panagiotes Mousikides.
Differential Revision: https://reviews.freebsd.org/D12580
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
669c2535 |
| 21-Oct-2016 |
Enji Cooper <[email protected]> |
Integrate contrib/netbsd-tests/fs/tmpfs into the FreeBSD test suite as tests/sys/fs
These testcases exercise tmpfs support
MFC after: 2 weeks Sponsored by: Dell EMC Isilon
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
bddfc749 |
| 19-Sep-2016 |
Enji Cooper <[email protected]> |
Remove change accidentally committed via r305963 for upcoming tests/sys/fs/... work
MFC after: 3 days Sponsored by: Dell EMC Isilon
|
| #
34ccb118 |
| 19-Sep-2016 |
Enji Cooper <[email protected]> |
Reindent TESTSDIR definition for consistency/readability
MFC after: 3 days Sponsored by: Dell EMC Isilon
|
| #
430f7286 |
| 04-May-2016 |
Enji Cooper <[email protected]> |
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed after r298107
Summary of changes:
- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that na
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed after r298107
Summary of changes:
- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)
Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info.
MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division
show more ...
|
| #
8907f744 |
| 04-May-2016 |
Alan Somers <[email protected]> |
Improve performance and functionality of the bitstring(3) api
Two new functions are provided, bit_ffs_at() and bit_ffc_at(), which allow for efficient searching of set or cleared bits starting from
Improve performance and functionality of the bitstring(3) api
Two new functions are provided, bit_ffs_at() and bit_ffc_at(), which allow for efficient searching of set or cleared bits starting from any bit offset within the bit string.
Performance is improved by operating on longs instead of bytes and using ffsl() for searches within a long. ffsl() is a compiler builtin in both clang and gcc for most architectures, converting what was a brute force while loop search into a couple of instructions.
All of the bitstring(3) API continues to be contained in the header file. Some of the functions are large enough that perhaps they should be uninlined and moved to a library, but that is beyond the scope of this commit.
sys/sys/bitstring.h: Convert the majority of the existing bit string implementation from macros to inline functions.
Properly protect the implementation from inadvertant macro expansion when included in a user's program by prefixing all private macros/functions and local variables with '_'.
Add bit_ffs_at() and bit_ffc_at(). Implement bit_ffs() and bit_ffc() in terms of their "at" counterparts.
Provide a kernel implementation of bit_alloc(), making the full API usable in the kernel.
Improve code documenation.
share/man/man3/bitstring.3: Add pre-exisiting API bit_ffc() to the synopsis.
Document new APIs.
Document the initialization state of the bit strings allocated/declared by bit_alloc() and bit_decl().
Correct documentation for bitstr_size(). The original code comments indicate the size is in bytes, not "elements of bitstr_t". The new implementation follows this lead. Only hastd assumed "elements" rather than bytes and it has been corrected.
etc/mtree/BSD.tests.dist: tests/sys/Makefile: tests/sys/sys/Makefile: tests/sys/sys/bitstring.c: Add tests for all existing and new functionality.
include/bitstring.h Include all headers needed by sys/bitstring.h
lib/libbluetooth/bluetooth.h: usr.sbin/bluetooth/hccontrol/le.c: Include bitstring.h instead of sys/bitstring.h.
sbin/hastd/activemap.c: Correct usage of bitstr_size().
sys/dev/xen/blkback/blkback.c Use new bit_alloc.
sys/kern/subr_unit.c: Remove hard-coded assumption that sizeof(bitstr_t) is 1. Get rid of unrb.busy, which caches the number of bits set in unrb.map. When INVARIANTS are disabled, nothing needs to know that information. callapse_unr can be adapted to use bit_ffs and bit_ffc instead. Eliminating unrb.busy saves memory, simplifies the code, and provides a slight speedup when INVARIANTS are disabled.
sys/net/flowtable.c: Use the new kernel implementation of bit-alloc, instead of hacking the old libc-dependent macro.
sys/sys/param.h Update __FreeBSD_version to indicate availability of new API
Submitted by: gibbs, asomers Reviewed by: gibbs, ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6004
show more ...
|
|
Revision tags: release/10.3.0 |
|
| #
d3157f09 |
| 16-Feb-2016 |
Bryan Drewery <[email protected]> |
Test directories can build in parallel fine.
Sponsored by: EMC / Isilon Storage Division
|
| #
2aa00a60 |
| 03-Feb-2016 |
Glen Barber <[email protected]> |
More 'tests' package fixes.
Sponsored by: The FreeBSD Foundation
|
| #
09d98641 |
| 13-Jan-2016 |
Enji Cooper <[email protected]> |
Integrate tools/regression/geom_{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip} in to the FreeBSD test suite as tests/sys/geom/class/{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}
The too
Integrate tools/regression/geom_{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip} in to the FreeBSD test suite as tests/sys/geom/class/{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}
The tools/regression/geom and tools/regression/geom_part testcases are being left alone because both test sets are both currently broken.
The majority of this work was done on ^/user/ngie/more-tests2 . The differences are as follows: - tests/sys/geom/class/Makefile.inc is not present; it was inlined into the class's Makefiles for explicitness. - The testcases officially require root via kyua - The geom_gate(4) tests don't use the pidfile changes proposed in https://reviews.freebsd.org/D4836 .
MFC after: 1 month Sponsored by: EMC / Isilon Storage Division
show more ...
|