summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the AIO subsystem to permit file-type-specific handling andjhb2016-03-014-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | improve cancellation robustness. Introduce a new file operation, fo_aio_queue, which is responsible for queueing and completing an asynchronous I/O request for a given file. The AIO subystem now exports library of routines to manipulate AIO requests as well as the ability to run a handler function in the "default" pool of AIO daemons to service a request. A default implementation for file types which do not include an fo_aio_queue method queues requests to the "default" pool invoking the fo_read or fo_write methods as before. The AIO subsystem permits file types to install a private "cancel" routine when a request is queued to permit safe dequeueing and cleanup of cancelled requests. Sockets now use their own pool of AIO daemons and service per-socket requests in FIFO order. Socket requests will not block indefinitely permitting timely cancellation of all requests. Due to the now-tight coupling of the AIO subsystem with file types, the AIO subsystem is now a standard part of all kernels. The VFS_AIO kernel option and aio.ko module are gone. Many file types may block indefinitely in their fo_read or fo_write callbacks resulting in a hung AIO daemon. This can result in hung user processes (when processes attempt to cancel all outstanding requests during exit) or a hung system. To protect against this, AIO requests are only permitted for known "safe" files by default. AIO requests for all file types can be enabled by setting the new vfs.aio.enable_usafe sysctl to a non-zero value. The AIO tests have been updated to skip operations on unsafe file types if the sysctl is zero. Currently, AIO requests on sockets and raw disks are considered safe and are enabled by default. aio_mlock() is also enabled by default. Reviewed by: cem, jilles Discussed with: kib (earlier version) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D5289
* Ensure that we test the event condition when a disabled kevent is enabled.markj2016-02-191-6/+8
| | | | | | | | | | | | | | | | r274560 modified kqueue_register() to only test the event condition if the corresponding knote is not disabled. However, this check takes place before the EV_ENABLE flag is used to clear the KN_DISABLED flag on the knote, so enabling a previously-disabled kevent would not result in a notification for a triggered event. This change fixes the problem by testing for EV_ENABLED before possibly checking the event condition. This change also updates a kqueue regression test to exercise this case. PR: 206368 Reviewed by: kib Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5307
* Test directories can build in parallel fine.bdrewery2016-02-162-4/+0
| | | | Sponsored by: EMC / Isilon Storage Division
* Similar to r295116, add an additional 1 second sleep after calling ggatelngie2016-02-101-0/+1
| | | | | | | | | before calling dd to defeat a race when writing out to the geom_gate(4) device MFC after: 1 month Reported by: Jenkins Sponsored by: EMC / Isilon Storage Division
* Use basenames for getfacl, setfacl, and zpool to work around thengie2016-02-061-2/+2
| | | | | | | | | | | | fact that Jenkins hardcodes image sizes to 2GB with the FreeBSD_HEAD job This is to stop the unnecessary failure emails because we've gone over the 2GB limit MFC after: 1 week X-MFC with: r295341 Sponsored by: EMC / Isilon Storage Division
* Require /bin/getfacl and /bin/setfacl when running the acl testsngie2016-02-051-1/+7
| | | | | | | | | For cases where these utilities aren't installed, the tests would fail today in a non-intuitive manner on sub-testcase #3 in each of the test scripts MFC after: 1 week Reviewed by: markj Sponsored by: EMC / Isilon Storage Division
* Use the pidfile support added to ggated(8) in r294973 to ensure that thengie2016-02-011-2/+3
| | | | | | | | ggated(8) daemon used by the tests is the instance specifically invoked by the tests instead of one or more daemon instances running on the system MFC after: 1 month Sponsored by: EMC / Isilon Storage Division
* Add an additional 1 second sleep to after calling ggatec before callingngie2016-02-011-0/+1
| | | | | | | | | | | dd to defeat a race when writing out to the geom_gate(4) device This will quell the Jenkins failure emails until I come up with a better solution MFC after: 1 month Reported by: Jenkins Sponsored by: EMC / Isilon Storage Division
* kqueue EVFILT_PROC: avoid collision between NOTE_CHILD and NOTE_EXITvangyzen2016-01-283-15/+229
| | | | | | | | | | | | | | NOTE_CHILD and NOTE_EXIT return something in kevent.data: the parent pid (ppid) for NOTE_CHILD and the exit status for NOTE_EXIT. Do not let the two events be combined, since one would overwrite the other's data. PR: 180385 Submitted by: David A. Bright <david_a_bright@dell.com> Reviewed by: jhb MFC after: 1 month Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D4900
* PID file support hasn't been committed for ggated(8) yet. Unbreak runningngie2016-01-141-2/+1
| | | | | | | the testcase more than once by restoring the "killall ggated" MFC after: 15 days Sponsored by: EMC / Isilon Storage Division
* Remove unnecessary kldload logic added to geom_subr.sh in r293028ngie2016-01-141-2/+0
| | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Integratengie2016-01-1375-0/+3490
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Use a more unique name for the graid devicengie2016-01-011-1/+1
| |
| * Use `geom <class> load` instead of `g<class> load` (`g<class>` doesn'tngie2016-01-011-1/+1
| | | | | | | | exist for geom_uzip(4)..)
| * Only try to unmount/remove mountpt if it's definedngie2016-01-011-2/+4
| |
| * Add missing Makefilengie2016-01-011-0/+7
| |
| * Move sbin/geom/class/tests to tests/sys/geom/class and remove sbin/geom/testsngie2016-01-0177-0/+3688
| | | | | | | | | | | | This is inspired by parallel efforts being done on projects/zfsd (and makes more sense because these are functional tests of the subsystems, not the geom(8) commands
| * MFhead @ r293006ngie2015-12-313-7/+583
| |\ | |/ |/|
| * MFhead @ r292618ngie2015-12-2915-102/+996
| |\
| * \ MFhead @ r292396ngie2015-12-171-0/+15
| |\ \
| * \ \ MFhead@r291879ngie2015-12-065-18/+12
| |\ \ \
| * \ \ \ MFhead @ r291345ngie2015-11-261-0/+1
| |\ \ \ \
| * \ \ \ \ MFhead @ r291235ngie2015-11-244-5/+23
| |\ \ \ \ \
| * \ \ \ \ \ MFhead @ r290915ngie2015-11-1610-0/+805
| |\ \ \ \ \ \
* | | | | | | | Rename `recvfd` and `sendfd` variables in recvfd/sendfd functions to avoidngie2015-12-301-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wshadow issues with gcc MFC after: 1 week Reported by: bz, jenkins Sponsored by: EMC / Isilon Storage Division
* | | | | | | | Integrate tools/regression/sockets/unix_passfd into the FreeBSD testngie2015-12-302-0/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | suite as tests/sys/kern/unix_passfd_test - Convert testcases to ATF - Fix an alignment issues - Mark rights_creds_payload(..) as an expected failure (see PR # 181741) Based [in part] on the following Differential Revision: https://reviews.freebsd.org/D689 MFC after: 1 week Submitted by: markj Sponsored by: EMC / Isilon Storage Division
* | | | | | | | Add ptrace(2) reporting for LWP events.jhb2015-12-291-7/+186
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new LWPINFO flags: PL_FLAG_BORN and PL_FLAG_EXITED for reporting thread creation and destruction. Newly created threads will stop to report PL_FLAG_BORN before returning to userland and exiting threads will stop to report PL_FLAG_EXIT before exiting completely. Both of these events are only enabled and reported if PT_LWP_EVENTS is enabled on a process.
* | | | | | | Remove retval to fix a -Wunused-but-set-variable warning from gcc 4.9ngie2015-12-281-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* | | | | | | - Remove unused but set ssize in shutdown_send_sigpipengie2015-12-281-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add #ifdef TEST_SEQ_PACKET_SOURCE_ADDRESS` for untestable code because FreeBSD doesn't have a means to map source addresses for SEQ_PACKET AF_UNIX sockets (paraphrased). Put pathname variable under the #ifdef to mute another unused but set variable warning MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* | | | | | | Clean trailing whitespacengie2015-12-281-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* | | | | | | - Fix an improperly sized buffer for `pathname` [1]ngie2015-12-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix a -Wunused-but-set-variable warning [2] MFC after: 1 week Reported by: cppcheck [1], gcc 4.9 [2] Sponsored by: EMC / Isilon Storage Division
* | | | | | | Fix style(9) a bit and ensure that error from initializing kqueue(2) isngie2015-12-281-54/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sane - Push the kqueue(2) initialization down so the errno will correspond with the failure instead of potentially being stomped on by functions called by `PLAIN_REQUIRE_KERNEL_MODULE` - Delete trailing whitespace - Add spaces between braces for conditional and control blocks (for/if) - Use err/errx instead of perror+printf+exit/printf+exit. - Remove braces for single-line conditionals Tested with and without -DDEBUG MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* | | | | | | Place cancel and error under #ifdef DEBUG to mutengie2015-12-281-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wunused-but-set-variable warnings reported by gcc 4.9 Remove some trailing whitespace as well Tested with and without -DDEBUG MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* | | | | | | Delete the comment about running `test_libugidfw_strings` before testingngie2015-12-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `mac_is_present` so it doesn't accidentally confuse people MFC after: 3 days X-MFC with: r292650 Sponsored by: EMC / Isilon Storage Division
* | | | | | | Move mac_bsdextended check up before running the test_libugidfw_strings ↵ngie2015-12-231-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testcases I realize that these tests could be run before mac_bsdextended is loaded, but it would overcomplicate things to special case handle the testcases before doing the mac_bsdextended(4) feature check The testcases will be split up so they can be run separately in the near future MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* | | | | | | Dump out the output from flock_helper on failure so failures with thengie2015-12-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test app can be debugged MFC after: 1 week Obtained from: Isilon OneFS (^/onefs/head@r511419) Sponsored by: EMC / Isilon Storage Division
* | | | | | | Integrate tools/regression/mac/mac_bsdextended andngie2015-12-2110-0/+899
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tools/regression/mac/mac_portacl into the FreeBSD test suite as tests/sys/mac/bsdextended and tests/sys/mac/portacl, respectively MFC after: 1 month Sponsored by: EMC / Isilon Storage Division
* | | | | | Add ATF_REQUIRE_FEATURE and PLAIN_REQUIRE_FEATURE macros forngie2015-12-161-0/+15
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testing for kernel features via the feature_present(3) libcall The semantics are similar to the other macros in the header (skip testcase with ATF macro; exit with appropriate exit code with the PLAIN macro) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* | | | | Fix LDADD/DPADD that should be LIBADD.bdrewery2015-12-044-14/+8
| | | | | | | | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division
* | | | | Disable mqueue test # 3 and # 4 until __mq_oshandle is properly publicizedngie2015-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will unbreak the test script and make things green again after r291440 Sponsored by: EMC / Isilon Storage Division
* | | | | Disable a couple of tests, perhaps temporarily, since they use privatedeischen2015-11-291-2/+2
| |_|_|/ |/| | | | | | | | | | | symbols that are not exported from librt.
* | | | Avoid requiring 'make depend' here.bdrewery2015-11-251-0/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | Really this should not be a DPSRCS. The acct_test.c should not #include convert.c, but just link it in as a normal SRCS. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* | | Integrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD testngie2015-11-231-0/+5
| | | | | | | | | | | | | | | | | | suite as tests/sys/kern/mqueue_test MFC after: 1 week
* | | Fix up convert.c generationngie2015-11-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use a temporary file for convert.c to reduce likelihood of an interrupted build resulting in bad code being written to convert.c - Truncate the file instead of appending to it to ensure that the file being touched will not result in duplicate declarations/definitions from kern_acct.c if/when kern_acct.c changes. MFC after: 1 week
* | | Copy README into /usr/testsrodrigc2015-11-202-3/+15
| |/ |/| | | | | | | | | | | Add a few sentences describing how to run the tests. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D4224
* | Integrate tools/regression/pipe in to the FreeBSD test suite asngie2015-11-1610-0/+799
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tests/sys/kern/pipe - Fix style(9) bugs - Fix compiler warnings - Use `nitems(x)` instead of `sizeof(x) / sizeof(*x)` pattern The testcases will be converted over to ATF eventually, but for now will be integrated in as plain C tests MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* | Integrate contrib/netbsd-tests/kernel/t_lockf.c into the FreeBSD test suite asngie2015-11-161-0/+6
| | | | | | | | | | | | | | tests/sys/kern/lockf_test MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* | Integrate acct(2) testcase in as tests/sys/kern/acct/acct_testngie2015-11-163-0/+255
|\ \ | |/ | | | | | | | | | | | | | | The :encode_tv_random_million testcase fails the epsilon tests a few thousand times out of one million, so expect the testcase to fail MFC after: 1 week Submitted by: keramida Sponsored by: EMC / Isilon Storage Division
| * Integrate kern/kern_acct.c testcase in as tests/sys/kern/acct/acct_testngie2015-11-163-0/+255
| | | | | | | | | | | | | | | | | | The :encode_tv_random_million testcase fails the epsilon tests few thousand times out of one million, so expect the testcase to fail MFC after: 1 week Submitted by: keramida Sponsored by: EMC / Isilon Storage Division
| * Enable pjdfstest in the FreeBSD test suite by default to get somengie2015-11-161-3/+1
|/ | | | | | coverage on the root file system Sponsored by: EMC / Isilon Storage Division
OpenPOWER on IntegriCloud