aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Temporarily skip failing sys.geom.class.multipath.failloop.failloop on i386 CILi-Wen Hsu2019-12-171-0/+5
| | | | | | | | PR: 242689 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=355861
* gmultipath: add ATF testsAlan Somers2019-12-065-0/+561
| | | | | | | | | | | | | | Add ATF tests for most gmultipath operations. Add some dtrace probes too, primarily for configuration changes that happen in response to provider errors. PR: 178473 MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D22235 Notes: svn path=/head/; revision=355431
* procdesc: allow to collect status through wait(1) if process is tracedMariusz Zaborski2019-11-251-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | The debugger like truss(1) depends on the wait(2) syscall. This syscall waits for ALL children. When it is waiting for ALL child's the children created by process descriptors are not returned. This behavior was introduced because we want to implement libraries which may pdfork(1). The behavior of process descriptor brakes truss(1) because it will not be able to collect the status of processes with process descriptors. To address this problem the status is returned to parent when the child is traced. While the process is traced the debugger is the new parent. In case the original parent and debugger are the same process it means the debugger explicitly used pdfork() to create the child. In that case the debugger should be using kqueue()/pdwait() instead of wait(). Add test case to verify that. The test case was implemented by markj@. Reviewed by: kib, markj Discussed with: jhb MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D20362 Notes: svn path=/head/; revision=355097
* Fix gcc buildLi-Wen Hsu2019-11-241-0/+6
| | | | | | | | | | | | | | | | | | | We have -Werror=strict-overflow so gcc complains: In file included from /tmp/obj/workspace/src/amd64.amd64/tmp/usr/include/bitstring.h:36:0, from /workspace/src/tests/sys/sys/bitstring_test.c:34: /workspace/src/tests/sys/sys/bitstring_test.c: In function 'bit_ffc_at_test': /workspace/src/sys/sys/bitstring.h:239:5: error: assuming signed overflow does not occur when assuming that (X + c) >= X is always true [-Werror=strict-overflow] if (_start >= _nbits) { ^ Disable assuming overflow of signed integer will never happen by specifying -fno-strict-overflow Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=355055
* The error messages that indicate bugs in 'area' bitstring functionsDoug Moore2019-11-231-18/+18
| | | | | | | | | | | should identify accurately which function exhibited the bug. Reviewed by: asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D22519 Notes: svn path=/head/; revision=355032
* Initialize variable bitstrLi-Wen Hsu2019-11-221-0/+2
| | | | | | | | | | r354991 removed variable-sized object initializing on defining. For the safe reason, manually initialize the members to 0. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354992
* Fix GCC build.Li-Wen Hsu2019-11-221-2/+2
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354991
* bitstring: add functions to find contiguous set/unset bit sequencesEric Joyner2019-11-211-0/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add bit_ffs_area_at and bit_ffc_area_at functions for searching a bit string for a sequence of contiguous set or unset bits of at least the specified size. The bit_ffc_area function will be used by the Intel ice driver for implementing resource assignment logic using a bitstring to represent whether or not a given index has been assigned or is currently free. The bit_ffs_area, bit_ffc_area_at and bit_ffs_area_at functions are implemented for completeness. I'd like to add further test cases for the new functions, but I'm not really sure how to add them easily. The new functions depend on specific sequences of bits being set, while the bitstring tests appear to run for varying bit sizes. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Submitted by: Jacob Keller <jacob.e.keller@intel.com> Reviewed by: asomers@, erj@ MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D22400 Notes: svn path=/head/; revision=354977
* bitstring: exit early if _start is past size of the bitstringEric Joyner2019-11-211-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bit_ffs_at and bit_ffc_at both take _start parameters which indicate to start searching from _start onwards. If the given _start index is past the size of the bit string, these functions will calculate an address of the current bitstring which is after the expected size. The function will also dereference the memory, resulting in a read buffer overflow. The output of the function remains correct, because the tests ensure to stop the loop if the current bitstring chunk passes the stop bitstring chunk, and because of a check to ensure the reported _value is never past _nbits. However, if <sys/bitstring.h> is ever used in code which is checked by -fsanitize=undefined, or similar static analysis, it can produce warnings about reading past the buffer size. Because of the above mentioned checks, these buffer overflows do not occur as long as _start is less than _nbits. Additionally, by definition bit_ffs_at and bif_ffc_at should set _result to -1 in any case where the _start is after the _nbits. Check for this case at the start of the function and exit early if so, preventing the buffer read overflow, and reducing the amount of computation that occurs. Note that it may seem odd to ever have code that could call bit_ffc_at or bit_ffs_at with a _start value greater than _nbits. However, consider a for-loop that used bit_ffs and bit_ffs_at to loop over a bit string and perform some operation on each bit that was set. If the last bit of the bit string was set, the simplest loop implementation would call bit_ffs_at with a start of _nbits, and expect that to return -1. While it does infact perform correctly, this is what ultimately triggers the unexpected buffer read overflow. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Submitted by: Jacob Keller <jacob.e.keller@intel.com> Reviewed by: asomers@, erj@ MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D22398 Notes: svn path=/head/; revision=354975
* icmpv6: Fix mbuf change in mldBjoern A. Zeeb2019-11-183-0/+168
| | | | | | | | | | | | | | | | | | | | After r354748 mld_input() can change the mbuf. The new pointer is never returned to icmp6_input() and when passed to icmp6_rip6_input() the mbuf may no longer valid leading to a panic. Pass a pointer to the mbuf to mld_input() so we can return an updated version in the non-error case. Add a test sending an MLD packet case which will trigger this bug. Pointyhat to: bz Reported by: gallatin, thj MFC After: 2 weeks X-MFC with: r354748 Sponsored by: Netflix Notes: svn path=/head/; revision=354832
* ipv6 testsBjoern A. Zeeb2019-11-181-0/+2
| | | | | | | | | | Add a simple ping6 test as well. MFC after: 2 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354831
* Jail and capability mode for shm_rename; add audit support for shm_renameDavid Bright2019-11-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | Co-mingling two things here: * Addressing some feedback from Konstantin and Kyle re: jail, capability mode, and a few other things * Adding audit support as promised. The audit support change includes a partial refresh of OpenBSM from upstream, where the change to add shm_rename has already been accepted. Matthew doesn't plan to work on refreshing anything else to support audit for those new event types. Submitted by: Matthew Bryan <matthew.bryan@isilon.com> Reviewed by: kib Relnotes: Yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D22083 Notes: svn path=/head/; revision=354808
* Reenable netinet6 and netpfil tests on i386, net/scapy 2.4.3_2 contains the fixLi-Wen Hsu2019-11-086-30/+0
| | | | | | | | PR: 239380 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354553
* frag6: properly handle atomic fragments according to RFCs.Bjoern A. Zeeb2019-11-082-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | RFC 8200 says: "If the fragment is a whole datagram (that is, both the Fragment Offset field and the M flag are zero), then it does not need any further reassembly and should be processed as a fully reassembled packet (i.e., updating Next Header, adjust Payload Length, removing the Fragment header, etc.). .." That means we should remove the fragment header and make all the adjustments rather than just skipping over the fragment header. The difference should be noticeable in that a properly handled atomic fragment triggering an ICMPv6 message at an upper layer (e.g. dest unreach, unreachable port) will not include the fragment header. Update the test cases to also test for an unfragmentable part. That is needed so that the next header is properly updated (not just lengths). MFC after: 3 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D22155 Notes: svn path=/head/; revision=354542
* IPv6 tests: test case for scapy bpf parsing bugBjoern A. Zeeb2019-11-063-1/+183
| | | | | | | | | | PR: 239380 Reported by: lwhsu, CI system MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354395
* ipv6 tests: cleanupBjoern A. Zeeb2019-11-062-6/+6
| | | | | | | | | | | | Remove mentions of fragmentation tests from extension header test. Remove setting an MTU > IF_MAXMTU from the test cases to avoid warnings; this was only possible in a local research tree. MFC after: 2 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354390
* Temporarily disable sys.netinet6.exthdr on i386Li-Wen Hsu2019-11-051-0/+5
| | | | | | | | PR: 241493 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354362
* ip6 tests: Add very simplistic extension header testsBjoern A. Zeeb2019-11-053-0/+407
| | | | | | | | | | | | | | | | Add a simple test case which can exercise some of the IPv6 extension header code paths. At the moment only a small set of extension headers is implemented and no options to the ones which take them. Also implements a "bad" case to make sure that error handling works. The tests were used to test m_pullup() changes to the code paths while removing the KAME PULLDOWN_TEST cases and related macros. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354358
* frag6 tests: set end to catch timeout as errorBjoern A. Zeeb2019-11-052-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | There are times when we have to wait for reply packets. There are either an ICMPv6 (error) reply or the expiration timeout. In these cases synchonous ICMPv6 replies should arrive, always, unless the packet is lost. Due to errors experienced with the test software sending an invlaid request on at least i386 (*) these packets are not generated. That means we are waiting for a long time for the replies or even timeout the test case. Manually set the "End" flag on these test cases as well, so they do fail rather than timeout as the sniffer timeout happens. This improves debugging options, reflects the error properly, and saves time on each test suit run. (*) The real cause for that is still to be found (see the referenced PRs) PR: 241493, 239380 MFC after: 2 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354357
* netpfil tests: Add missing copyright & license statementsKristof Provost2019-10-2919-0/+476
| | | | Notes: svn path=/head/; revision=354145
* Follow r354121 to fix some python3 errors in sys.netpfil.*Li-Wen Hsu2019-10-271-5/+5
| | | | | | | | | | | | | | | | | | | | | stderr: Traceback (most recent call last): File "/usr/tests/sys/netpfil/common/pft_ping.py", line 135, in <module> main() File "/usr/tests/sys/netpfil/common/pft_ping.py", line 124, in main ping(args.sendif[0], args.to[0], args) File "/usr/tests/sys/netpfil/common/pft_ping.py", line 74, in ping raw = sp.raw(str(PAYLOAD_MAGIC)) File "/usr/local/lib/python3.6/site-packages/scapy/compat.py", line 52, in raw return bytes(x) TypeError: string argument without an encoding MFC with: r354121 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354130
* Upgrade (scapy) py2 tests to work on py3.Bjoern A. Zeeb2019-10-263-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | In order to move python2 out of the test framework to avoid py2 vs. py3 confusions upgrade the remaining test cases using scapy to work with py3. That means only one version of scapy needs to be installed in the CI system. It also gives a path forward for testing i386 issues observed in the CI system with some of these tests. Fixes are: - Use default python from environment (which is 3.x these days). - properly ident some lines as common for the rest of the file to avoid errors. - cast the calculated offset to an int as the division result is considered a float which is not accepted input. - when comparing payload to a magic number make sure we always add the payload properly to the packet and do not try to compare string in the result but convert the data payload back into an integer. - fix print formating. Discussed with: lwhsu, kp (taking it off his todo :) MFC after: 2 weeks Notes: svn path=/head/; revision=354121
* frag6-test: update for r354046, conform to 8200 for overlapping fragmentsBjoern A. Zeeb2019-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | The change to conform to RFC 8200 for overlapping fragments now frees the entire reassembly queue if the overlapping fragments are not an exact match. As a result we do see one less packet in the timeout statistics from expiry. No other statistics change as the event is not counted. It can be argued that we should improve the statistics counters in that case. This test case update should have been committed alongside the original commit. Pointyhat to: bz MFC after: 3 weeks X-MFC with: r354046 Sponsored by: Netflix Notes: svn path=/head/; revision=354084
* frag6: prevent overwriting initial fragoff=0 packet meta-data.Bjoern A. Zeeb2019-10-243-1/+372
| | | | | | | | | | | | | | | | | | | | | | | | When we receive the packet with the first fragmented part (fragoff=0) we remember the length of the unfragmentable part and the next header (and should probably also remember ECN) as meta-data on the reassembly queue. Someone replying this packet so far could change these 2 (3) values. While changing the next header seems more severe, for a full size fragmented UDP packet, for example, adding an extension header to the unfragmentable part would go unnoticed (as the framented part would be considered an exact duplicate) but make reassembly fail. So do not allow updating the meta-data after we have seen the first fragmented part anymore. The frag6_20 test case is added which failed before triggering an ICMPv6 "param prob" due to the check for each queued fragment for a max-size violation if a fragoff=0 packet was received. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354053
* frag6 test cases: check more counters, wait for expiryBjoern A. Zeeb2019-10-2423-32/+275
| | | | | | | | | | | | | | | | | | | | | | | | When done with tests check that both the per-VNET and the global-fragmented- packets-in-system counters are zero to make sure we do not leak counters or queue entries. This implies that for all test cases we either have to check for the ICMPv6 packet sent in case of TLL=0 expiry (if it is sent) or sleep at least long enough for the TTL to expire for all packets (e.g., fragments where we do not have the off=0 packet). This also means that statistics are now updated to include all the expired packets. There are cases when we do not check for counters to be zero and this is when testing VNET teardown to behave properly and not panic, when we are intentionally leaving fragments in the system. MFC after: 3 weeks Sponsored by: Netflix Notes: svn path=/head/; revision=354045
* frag6: import a set of test casesBjoern A. Zeeb2019-10-2143-0/+6397
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=353794
* tests: basic VLAN testKristof Provost2019-10-152-0/+43
| | | | | | | | | | | Set up two jails connected by an epair. Create VLAN interfaces in both jails and check connectivity. This is a very basic test, but exposed panics during the network stack epoch work, so this is worth testing. Notes: svn path=/head/; revision=353542
* coredump_phnum_test: handle full file system gracefullyEric van Gyzen2019-10-111-2/+13
| | | | | | | | | | | Skip the test if the file system is full. That's out of scope of this test. MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=353448
* zfs: multiple improvements to the zpool_add testsAlan Somers2019-10-1013-168/+59
| | | | | | | | | | | | | | | | | | | | | | * Don't partition a disk if too few are available. Just rely on Kyua to ensure that the tests aren't run with insufficient disks. * Remove redundant cleanup steps * In zpool_add_003_pos, store the temporary file in $PWD so Kyua will automatically clean it up. * Update zpool_add_005_pos to use dumpon instead of dumpadm. This test had never been ported to FreeBSD. * In zpool_add_005_pos, don't format the dump disk with UFS. That was pointless. MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353379
* ZFS: fix the zpool_add_010_pos testAlan Somers2019-10-091-1/+1
| | | | | | | | | | | | The test is necessarily racy, because it depends on being able to complete a "zpool add" before a previous resilver finishes. But it was racier than it needed to be. Move the first "zpool add" to before the resilver starts. MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353366
* ZFS: in the tests, don't override PWDAlan Somers2019-10-091-1/+0
| | | | | | | | | | | | The ZFS test suite was overriding the common $PWD variable with the path to the pwd command, even though no test wanted to use it that way. Most tests didn't notice, because ksh93 eventually restored it to its proper meaning. MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353361
* ZFS: multiple fixes to the zpool_import testsAlan Somers2019-10-095-87/+22
| | | | | | | | | | | | | | | | | | | | | | | * Don't create a UFS mountpoint just to store some temporary files. The tests should always be executed with a sufficiently large TMPDIR. Creating the UFS mountpoint is not only unneccessary, but it slowed zpool_import_missing_002_pos greatly, because that test moves large files between TMPDIR and the UFS mountpoint. This change also allows many of the tests to be executed with just a single test disk, instead of two. * Move zpool_import_missing_002_pos's backup device dir from / to $PWD to prevent cross-device moves. On my system, these two changes improved that test's speed by 39x. It should also prevent ENOSPC errors seen in CI. * If insufficient disks are available, don't try to partition one of them. Just rely on Kyua to skip the test. Users who care will configure Kyua with sufficient disks. MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353360
* Fix a bug in r353332 that snuck in with a last-minute adjustment.Mark Johnston2019-10-081-2/+2
| | | | | | | | | Reported by: Jenkins MFC with: r353332 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=353333
* Add a regression test for r353331.Mark Johnston2019-10-081-0/+72
| | | | | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=353332
* zfs: fix the zfsd_hotspare_007_pos testAlan Somers2019-10-081-0/+3
| | | | | | | | | | | It was trying to destroy the pool while zfsd was detaching the spare, and "zpool destroy" failed. Fix by waiting until the spare has fully detached. MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353310
* zfs: fix the zfsd_autoreplace_003_pos testAlan Somers2019-10-081-5/+5
| | | | | | | | | | | The test declared that it only needed 5 disks, but actually tried to use 6. Fix it to use just 5, which is all it really needs. MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353309
* Fix problems in the kern_maxfiles__increase testEric van Gyzen2019-10-081-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ATF functions such as ATF_REQUIRE do not work correctly in child processes. Use plain C functions to report errors instead. In the parent, check for the untimely demise of children. Without this, the test hung until the framework's timeout. Raise the resource limit on the number of open files. If this was too low, the test hit the two problems above. Restore the kern.maxfiles sysctl OID in the cleanup function. The body prematurely removed the symlink in which the old value was saved. Make the test more robust by opening more files. In fact, due to the integer division by 4, this was necessary to make the test valid with some initial values of maxfiles. Thanks, asomers@. wait() for children instead of sleeping. Clean up a temporary file created by the test ("afile"). Reviewed by: asomers MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21900 Notes: svn path=/head/; revision=353305
* ZFS: fix the redundancy testsAlan Somers2019-10-073-10/+6
| | | | | | | | | | | | | | | | | * Fix force_sync_path, which ensures that a file is fully flushed to disk. Apparently "zpool history"'s performance has improved, but exporting and importing the pool still works. * Fix file_dva by using undocumented zdb syntax to clarify that we're interested in the pool's root file system, not the pool itself. This should also fix the zpool_clear_001_pos test. * Remove a redundant cleanup step MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D21901 Notes: svn path=/head/; revision=353289
* ZFS: mark hotspare_scrub_002_pos as an expected failureAlan Somers2019-10-071-0/+1
| | | | | | | | | | | "zpool scrub" doesn't detect all errors on active spares in raidz arrays PR: 241069 MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353288
* ZFS: fix the delegate testsAlan Somers2019-10-0710-296/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests have never worked correctly * Replace runwattr with sudo * Fix a scoping bug with the "dtst" variable * Cleanup user properties created during tests * Eliminate the checks for refreservation and send support. They will always be supported. * Fix verify_fs_snapshot. It seemed to assume that permissions would not yet be delegated, but that's not how it's actually used. * Combine verify_fs_promote with verify_vol_promote * Remove some useless sleeps * Fix backwards condition in verify_vol_volsize * Remove some redundant cleanup steps in the tests. cleanup.ksh will handle everything. * Disable some parts of the tests that FreeBSD doesn't support: * Creating snapshots with mkdir * devices * shareisci * sharenfs * xattr * zoned The sharenfs parts could probably be reenabled with more work to remove the Solarisms. MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D21898 Notes: svn path=/head/; revision=353287
* zfs: skip the zfsd tests if zfsd is not runningAlan Somers2019-10-071-0/+22
| | | | | | | | | MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D21878 Notes: svn path=/head/; revision=353286
* zfs: fix the zdb_001_neg testAlan Somers2019-10-071-1/+1
| | | | | | | | | | | The test needed to be updated for r331701 (MFV illumos 8671400), which added a "-k" option. MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353285
* ZFS: fix the zpool_get_002_pos testAlan Somers2019-10-072-2/+6
| | | | | | | | | | | | ZFS has grown some additional properties that hadn't been added to the config file yet. While I'm here, improve the error message, and remove a superfluous command. MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353284
* zfs: fix the slog_012_neg testAlan Somers2019-10-071-1/+3
| | | | | | | | | | | | | This test attempts to corrupt a file-backed vdev by deleting it and then recreating it with truncate. But that doesn't work, because the pool already has the vdev open, and it happily hangs on to the open-but-deleted file. Fix by truncating the file without deleting it. MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353282
* ZFS: fix several zvol_misc testsAlan Somers2019-10-072-9/+7
| | | | | | | | | | | | | * Adapt zvol_misc_001_neg to use dumpon instead of Solaris's dumpadm * Disable zvol_misc_003_neg, zvol_misc_005_neg, and zvol_misc_006_pos, because they involve using a zvol as a dump device, which FreeBSD does not yet support. MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353281
* ZFS: fix several of the "zpool create" testsAlan Somers2019-10-0511-564/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove zpool_create_013_neg. FreeBSD doesn't have an equivalent of Solaris's metadevices. GEOM would be the equivalent, but since all geoms are the same from ZFS's perspective, this test would be redundant with zpool_create_012_neg * Remove zpool_create_014_neg. FreeBSD does not support swapping to regular files. * Remove zpool_create_016_pos. This test is redundant with literally every other test that creates a disk-backed pool. * s:/etc/vfstab:/etc/fstab in zpool_create_011_neg * Delete the VTOC-related portion of zpool_create_008_pos. FreeBSD doesn't use VTOC. * Replace dumpadm with dumpon and swap with swapon in multiple tests. * In zpool_create_015_neg, don't require "zpool create -n" to fail. It's reasonable for that variant to succeed, because it doesn't actually open the zvol. * Greatly simplify zpool_create_012_neg. Make it safer, too, but not interfering with the system's regular swap devices. * Expect zpool_create_011_neg to fail (PR 241070) * Delete some redundant cleanup steps in various tests * Remove some unneeeded ATF timeout specifications. The default is fine. PR: 241070 MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353118
* ZFS: the hotspare_add_004_neg test needs at least two disksAlan Somers2019-10-051-1/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: Axcient Notes: svn path=/head/; revision=353117
* shm_open2(2): completely unbreakKyle Evans2019-10-021-0/+35
| | | | | | | | | | | | | | | | | kern_shm_open2(), since conception, completely fails to pass the mode along to kern_shm_open(). This breaks most uses of it. Add tests alongside this that actually check the mode of the returned files. PR: 240934 [pulseaudio breakage] Reported by: ler, Andrew Gierth [postgres breakage] Diagnosed by: Andrew Gierth (great catch) Tested by: ler, tmunro Pointy hat to: kevans Notes: svn path=/head/; revision=352952
* Fix coredump_phnum_test when kern.compress_user_cores != 0Eric van Gyzen2019-09-301-13/+24
| | | | | | | | | | | | | | | | | | If `kern.compress_user_cores` is non-zero, decompress the core file. Use `sysctl -f` to restore previous values. Don't bother restoring `ulimit -c`, since that's a per-process value. Check more commands with `atf_check`. Reviewed by: olivier ngie MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21820 Notes: svn path=/head/; revision=352898
* Adjust tests after page fault changes in r352807Jilles Tjoelker2019-09-292-4/+2
| | | | | | | | | | Commit r352807 fixed various signal numbers and codes from page faults; adjust the tests so they expect the fixes to be present. PR: 211924 Notes: svn path=/head/; revision=352869