aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the AIO subsystem to permit file-type-specific handling andJohn Baldwin2016-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 Notes: svn path=/head/; revision=296277
* Ensure that we test the event condition when a disabled kevent is enabled.Mark Johnston2016-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 Notes: svn path=/head/; revision=295786
* Test directories can build in parallel fine.Bryan Drewery2016-02-162-4/+0
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295643
* Similar to r295116, add an additional 1 second sleep after calling ggatelEnji Cooper2016-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 Notes: svn path=/head/; revision=295477
* Use basenames for getfacl, setfacl, and zpool to work around theEnji Cooper2016-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 Notes: svn path=/head/; revision=295345
* Require /bin/getfacl and /bin/setfacl when running the acl testsEnji Cooper2016-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 Notes: svn path=/head/; revision=295341
* Use the pidfile support added to ggated(8) in r294973 to ensure that theEnji Cooper2016-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 Notes: svn path=/head/; revision=295117
* Add an additional 1 second sleep to after calling ggatec before callingEnji Cooper2016-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 Notes: svn path=/head/; revision=295116
* kqueue EVFILT_PROC: avoid collision between NOTE_CHILD and NOTE_EXITEric van Gyzen2016-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 Notes: svn path=/head/; revision=295012
* PID file support hasn't been committed for ggated(8) yet. Unbreak runningEnji Cooper2016-01-141-2/+1
| | | | | | | | | | the testcase more than once by restoring the "killall ggated" MFC after: 15 days Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=293880
* Remove unnecessary kldload logic added to geom_subr.sh in r293028Enji Cooper2016-01-141-2/+0
| | | | | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=293878
* IntegrateEnji Cooper2016-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 Notes: svn path=/head/; revision=293821
* Rename `recvfd` and `sendfd` variables in recvfd/sendfd functions to avoidEnji Cooper2015-12-301-11/+11
| | | | | | | | | | | -Wshadow issues with gcc MFC after: 1 week Reported by: bz, jenkins Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292957
* Integrate tools/regression/sockets/unix_passfd into the FreeBSD testEnji Cooper2015-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 Notes: svn path=/head/; revision=292914
* Add ptrace(2) reporting for LWP events.John Baldwin2015-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. Notes: svn path=/head/; revision=292894
* Remove retval to fix a -Wunused-but-set-variable warning from gcc 4.9Enji Cooper2015-12-281-4/+3
| | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292822
* - Remove unused but set ssize in shutdown_send_sigpipeEnji Cooper2015-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 Notes: svn path=/head/; revision=292821
* Clean trailing whitespaceEnji Cooper2015-12-281-19/+19
| | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292820
* - Fix an improperly sized buffer for `pathname` [1]Enji Cooper2015-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 Notes: svn path=/head/; revision=292819
* Fix style(9) a bit and ensure that error from initializing kqueue(2) isEnji Cooper2015-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 Notes: svn path=/head/; revision=292818
* Place cancel and error under #ifdef DEBUG to muteEnji Cooper2015-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 Notes: svn path=/head/; revision=292816
* Delete the comment about running `test_libugidfw_strings` before testingEnji Cooper2015-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 Notes: svn path=/head/; revision=292651
* Move mac_bsdextended check up before running the test_libugidfw_strings ↵Enji Cooper2015-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 Notes: svn path=/head/; revision=292650
* Dump out the output from flock_helper on failure so failures with theEnji Cooper2015-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 Notes: svn path=/head/; revision=292582
* Integrate tools/regression/mac/mac_bsdextended andEnji Cooper2015-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 Notes: svn path=/head/; revision=292570
* Add ATF_REQUIRE_FEATURE and PLAIN_REQUIRE_FEATURE macros forEnji Cooper2015-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 Notes: svn path=/head/; revision=292319
* Fix LDADD/DPADD that should be LIBADD.Bryan Drewery2015-12-044-14/+8
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291738
* Disable mqueue test # 3 and # 4 until __mq_oshandle is properly publicizedEnji Cooper2015-12-011-2/+2
| | | | | | | | | This will unbreak the test script and make things green again after r291440 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291575
* Disable a couple of tests, perhaps temporarily, since they use privateDaniel Eischen2015-11-291-2/+2
| | | | | | | symbols that are not exported from librt. Notes: svn path=/head/; revision=291440
* Avoid requiring 'make depend' here.Bryan Drewery2015-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 Notes: svn path=/head/; revision=291331
* Integrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD testEnji Cooper2015-11-231-0/+5
| | | | | | | | | suite as tests/sys/kern/mqueue_test MFC after: 1 week Notes: svn path=/head/; revision=291181
* Fix up convert.c generationEnji Cooper2015-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 Notes: svn path=/head/; revision=291180
* Copy README into /usr/testsCraig Rodrigues2015-11-202-3/+15
| | | | | | | | | | Add a few sentences describing how to run the tests. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D4224 Notes: svn path=/head/; revision=291089
* Integrate tools/regression/pipe in to the FreeBSD test suite asEnji Cooper2015-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 Notes: svn path=/head/; revision=290914
* Integrate contrib/netbsd-tests/kernel/t_lockf.c into the FreeBSD test suite asEnji Cooper2015-11-161-0/+6
| | | | | | | | | | tests/sys/kern/lockf_test MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290912
* Integrate acct(2) testcase in as tests/sys/kern/acct/acct_testEnji Cooper2015-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 Notes: svn path=/head/; revision=290905
* Add tests for the copyin(9) handling of illegal buffers.Konstantin Belousov2015-10-192-0/+87
| | | | | | | | | Reviewed by: emaste, ngie Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D3925 Notes: svn path=/head/; revision=289603
* Integrate tools/regression/acltools into the FreeBSD test suite as tests/sys/aclEnji Cooper2015-10-1715-0/+3343
| | | | | | | | | | | | | | | | - Make the requirements more complete for the testcases - Detect prerequisites so the tests won't fail (zfs.ko is loaded, zpool(1) is available, ACL support is enabled with UFS, etc). - Work with temporary files/directories/mountpoints that work with atf/kyua - Limit the testcases to work on temporary filesystems to reduce tainting the test host MFC after: 2 weeks Reviewed by: trasz (earlier version) Differential Revision: https://reviews.freebsd.org/D3810 Notes: svn path=/head/; revision=289446
* Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSDEnji Cooper2015-10-173-0/+637
| | | | | | | | | | | | | | | test suite as tests/sys/posixshm Some other highlights: - Convert the testcases over to ATF - Don't use hardcoded paths to /tmp (which violate the ATF/kyua samdbox); use mkstemp to generate temporary paths for non-SHM_ANON shm objects. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289441
* Add more SUBDIR_PARALLEL.Bryan Drewery2015-10-154-0/+6
| | | | | | | | MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289393
* Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfsEnji Cooper2015-10-143-0/+50
| | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289300
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper2015-10-123-3/+3
| | | | | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Notes: svn path=/head/; revision=289172
* Tweak: use 'mainlwp' instead of 'mainpid' since this is a thread (LWP)John Baldwin2015-10-061-3/+3
| | | | | | | identifier, not a pid. Notes: svn path=/head/; revision=288962
* Fix build with older GCC which, doesn't like 'main' being a variable name.Bryan Drewery2015-10-061-3/+3
| | | | Notes: svn path=/head/; revision=288961
* Fix various edge cases related to system call tracing.John Baldwin2015-10-062-15/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | - Always set td_dbg_sc_* when P_TRACED is set on system call entry even if the debugger is not tracing system call entries. This ensures the fields are valid when reporting other stops that occur at system call boundaries such as for PT_FOLLOW_FORKS or when only tracing system call exits. - Set TDB_SCX when reporting the stop for a new child process in fork_return(). This causes the event to be reported as a system call exit. - Report a system call exit event in fork_return() for new threads in a traced process. - Copy td_dbg_sc_* to new threads instead of zeroing. This ensures that td_dbg_sc_code in particular will report the system call that created the new thread or process when it reports a system call exit event in fork_return(). - Add new ptrace tests to verify that new child processes and threads report system call exit events with a valid pl_syscall_code via PT_LWPINFO. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D3822 Notes: svn path=/head/; revision=288949
* Use _exit() instead of exit() in child processes created during tests.John Baldwin2015-09-091-10/+10
| | | | | | | Suggested by: kib Notes: svn path=/head/; revision=287602
* Add a test to verify that a traced process sees its original parent viaJohn Baldwin2015-09-091-0/+87
| | | | | | | | | | getppid() after a debugger process that is not the parent has attached. Reviewed by: kib (earlier version) Differential Revision: https://reviews.freebsd.org/D3615 Notes: svn path=/head/; revision=287601
* Properly size the children[] arrays in the follow fork tests.John Baldwin2015-09-091-6/+6
| | | | Notes: svn path=/head/; revision=287600
* Add more mmap tests related to character devices.John Baldwin2015-09-041-8/+103
| | | | | | | | | | | | | - Add cdev-related tests for bad args. - Add two simple tests cases for mapping /dev/zero that test for MAP_ANON-like behavior. Reviewed by: alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3323 Notes: svn path=/head/; revision=287448
* Add various tests to ensure that invalid arguments passed to mmap()John Baldwin2015-08-061-0/+72
| | | | | | | | | | trigger failures. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D3269 Notes: svn path=/head/; revision=286370