summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* MFC r289172,r290254:ngie2017-02-093-3/+3
| | | | | | | | | | | | | | | | r289172: Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 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 r290254: Remove unused variable (SRCDIR)
* MFC r310096: reaper: Make REAPER_KILL_SUBTREE actually work.jilles2017-02-051-0/+102
|
* MFC r312164:ngie2017-02-041-1/+1
| | | | | | Fix -Wformat issue Use %zu for printing out results from nitems, as it's size_t based
* MFC r312114,r312194:ngie2017-02-041-0/+3
| | | | | | | | | | | | | | | r312114: Enable WARNS?= 6 across all of tests/sys r312194: Add include Makefiles for tests/sys/{fs,kern,kqueue,mac}/... The primary goal for doing this is to leverage the work done in r312114 for enabling WARNS to address trivial code quality issues with new tests Tested with: make tinderbox
* MFC r312110:ngie2017-02-041-6/+4
| | | | | | Fix -Wsign-compare warnings The loop index (i) doesn't need to be size_t as its comparison is signed
* MFC r312120:ngie2017-02-041-3/+4
| | | | | | | | | Fix warnings - Staticize test_num - Promote i to size_t to deal with -Wsign-compare issues Tested with: clang, gcc, gcc49
* MFC r312119,r312216,r312226:ngie2017-02-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r312119: encode_long, encode_timeval: mechanically replace `exp` with `exponent` This helps fix a -Wshadow issue with exp(3) with tests/sys/acct/acct_test, which include math.h, which in turn defines exp(3) Tested with: clang, gcc 4.2.1, gcc 4.9 r312216: Revert r312119 and reword the intent to fix -Wshadow issues between exp(3) and `exp` var. The approach taken previously was not ideal for multiple functional and stylistic reasons. Add to existing sed call in Makefile to replace `exp` with `exponent` instead. Requested by: bde r312226: Fix typo in r312216 I meant to replace "exp" with "exponent", not "expected" Pointyhat to: ngie
* MFC r310786, r310803, r310985, r311894asomers2017-01-2615-429/+543
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r310786: Reduce the runtime of the GELI tests There is no reduction in test coverage. On my system runtime is reduced from 38m32s to 6m24s. tests/sys/geom/class/eli/conf.sh tests/sys/geom/class/eli/init_a_test.sh tests/sys/geom/class/eli/init_test.sh tests/sys/geom/class/eli/integrity_copy_test.sh tests/sys/geom/class/eli/integrity_data_test.sh tests/sys/geom/class/eli/integrity_hmac_test.sh tests/sys/geom/class/eli/onetime_a_test.sh tests/sys/geom/class/eli/onetime_test.sh Move the looping code into common functions in conf.sh, and remove alias ciphers from the list. tests/sys/geom/class/eli/init_a_test.sh tests/sys/geom/class/eli/init_test.sh tests/sys/geom/class/eli/integrity_copy_test.sh tests/sys/geom/class/eli/integrity_data_test.sh tests/sys/geom/class/eli/integrity_hmac_test.sh tests/sys/geom/class/eli/onetime_a_test.sh Move a few commands that don't need to be in the inner loop out. tests/sys/geom/class/eli/init_test.sh tests/sys/geom/class/eli/onetime_a_test.sh Reduce the sector count tests/sys/geom/class/eli/Makefile tests/sys/geom/class/eli/init_alias_test.sh Add a test for initializing a GELI device using one of the cipher aliases, and check that the alias is correctly interpreted. MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8814 r310803: ATFify the gnop tests Also, add test cases for the -p, -P, and -s options to gnop create Reviewed by: ngie MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D8892 r310985: Update ObsoleteFiles.inc for r310803 MFC after: 26 days X-MFC-with: 310803 r311894: Fix typo from change 310985 in ObsoleteFiles.inc MFC after: 16 days X-MFC-With: 310803 Sponsored by: Spectra Logic Corp
* MFC r312111:ngie2017-01-171-1/+1
| | | | Remove unused vars to fix -Wunused issues
* MFC r312118,r312121:ngie2017-01-171-1/+1
| | | | | | | | | | | | | | | r312118: Fix -Wformat issue with zero-length format string passed to err(3) Tested with: clang, gcc 4.2.1, gcc 4.9 r312121: Follow up to r312118 State that execve failed instead of just printing out the program name and strerror(errno) via err(3).
* MFC r309957: Add tests for reaper receiving SIGCHLD (r309886).jilles2016-12-261-0/+162
| | | | PR: 213928
* MFC r309836: Add some tests for reaper functionality (in procctl()).jilles2016-12-252-0/+495
|
* MFstable/11 r309661:ngie2016-12-071-0/+18
| | | | | | | | MFC r306962: r306962 (by br): Ensure data in pipe is available to read. Useful for latest (5th, direct mode) test only.
* MFstable/11 r307715:ngie2016-10-211-0/+6
| | | | | | | | | | | | | | | | | | MFC r305916,r305918: r305916: Make sure $TMPDIR is created with 0755 permissions This is required to ensure that the temporary script can be executed, as the default mode is apparently too restrictive r305918: Only chmod $TMPDIR if it's not /tmp This is a safety belt to ensure that the /tmp sticky bit stuff doesn't get whacked by accident if someone runs the script outright
* wait: Do not copyout uninitialized status/rusage/wrusage.jilles2016-10-112-0/+71
| | | | | | | | If wait4() or wait6() return 0 because of WNOHANG, the status, rusage and wrusage information should not be returned. PR: 212048 Reported by: Casey Lucas
* MFstable/11 r305914:ngie2016-09-181-23/+29
| | | | | | | | MFC r305357: Skip testcases 9/10 if jail(8) isn't installed These testcases require jail support
* MFstable/11 r305912:ngie2016-09-181-0/+1
| | | | | | | | | MFC r305356: Add a missing "Bail out!" if zpool create fails This will make the exit info more meaningful if/when zpool create fails, and establishes parity with the other 2 zfs acl testcases (01, 03).
* MFstable/11 r304947:ngie2016-09-011-1/+4
| | | | | | | | MFC r304238: Only expect :encode_tv_random_million to fail on 64-bit platforms It passes on i386
* MFC r304040:ngie2016-09-015-6/+6
| | | | | | | Redirect the output of the testcases to stderr instead of redirecting it to /dev/null This will aid in debugging failures
* MFC 303001: Add PTRACE_VFORK to trace vfork events.jhb2016-08-191-0/+126
| | | | | | | | | First, PL_FLAG_FORKED events now also set a PL_FLAG_VFORKED flag when the new child was created via vfork() rather than fork(). Second, a new PL_FLAG_VFORK_DONE event can now be enabled via the PTRACE_VFORK event mask. This new stop is reported after the vfork parent resumes due to the child calling exit or exec. Debuggers can use this stop to reinsert breakpoints in the vfork parent process before it resumes.
* MFC 302900,302902,302921,303461,304009:jhb2016-08-151-0/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a mask of optional ptrace() events. 302900: Add a test for user signal delivery. This test verifies we get the correct ptrace event details when a signal is posted to a traced process from userland. 302902: Add a mask of optional ptrace() events. ptrace() now stores a mask of optional events in p_ptevents. Currently this mask is a single integer, but it can be expanded into an array of integers in the future. Two new ptrace requests can be used to manipulate the event mask: PT_GET_EVENT_MASK fetches the current event mask and PT_SET_EVENT_MASK sets the current event mask. The current set of events include: - PTRACE_EXEC: trace calls to execve(). - PTRACE_SCE: trace system call entries. - PTRACE_SCX: trace syscam call exits. - PTRACE_FORK: trace forks and auto-attach to new child processes. - PTRACE_LWP: trace LWP events. The S_PT_SCX and S_PT_SCE events in the procfs p_stops flags have been replaced by PTRACE_SCE and PTRACE_SCX. PTRACE_FORK replaces P_FOLLOW_FORK and PTRACE_LWP replaces P2_LWP_EVENTS. The PT_FOLLOW_FORK and PT_LWP_EVENTS ptrace requests remain for compatibility but now simply toggle corresponding flags in the event mask. While here, document that PT_SYSCALL, PT_TO_SCE, and PT_TO_SCX both modify the event mask and continue the traced process. 302921: Rename PTRACE_SYSCALL to LINUX_PTRACE_SYSCALL. 303461: Note that not all optional ptrace events use SIGTRAP. New child processes attached due to PTRACE_FORK use SIGSTOP instead of SIGTRAP. All other ptrace events use SIGTRAP. 304009: Remove description of P_FOLLOWFORK as this flag was removed.
* MFC 292894,292896: Add ptrace(2) reporting for LWP events.jhb2016-08-121-7/+186
| | | | | | | | | | | | | | 292894: Add ptrace(2) reporting for LWP events. 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. 292896: Document the recently added support for ptrace(2) LWP events.
* MFC r302036asomers2016-07-121-2/+2
| | | | | | | Skip sys/acl tests on systems lacking perl tests/sys/acl/Makefile add perl to the required_programs for all tests in this directory
* MFC r299508:ngie2016-06-101-1/+2
| | | | | | | | r299508 (by cem): kern_descrip_test: Fix trivial buffer overrun with readlink(2) CID: 1229965, 1229972
* MFC r298304:ngie2016-05-041-51/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix issues identified by Coverity - Always munmap memory regions after mmap'ing them. - Make sure getpagesize() returns a value greater than 0 and use a cached value instead of always calling getpagesize(3). - Remove intermediate variable for assigning from $TMPDIR if set in the environment to eliminate warnings about pointer conversions with "/tmp", and to mute an invalid buffer overflow concern from Coverity (snprintf and tacking on a NUL terminator was alleviating that concern before). - Remove useless self-test of psize before it's initialized. - Check the return values of getrlimit/setrlimit. Cosmetic changes: - Replace a `(void*)0` with NULL. - Do some minor whitespace clean up. - Remove an unnecessary cast to mmap. - Make all munmap calls use ATF_REQUIRE_MSG instead of using the: > if (munmap(..) == -1) > atf_tc_fail(..) idiom. Employ the new idiom consistently when calling munmap. CID: 1331351, 1331382-1331386, 1331513, 1331514, 1331565, 1331583, 1331694
* MFC r298301:ngie2016-05-041-21/+35
| | | | | | | | | | | Fix leaks and test for getpagesize() returning == -1 - close file descriptors after use. - Always munmap memory regions after mmap'ing them. - Make sure getpagesize() returns a value greater than 0 and use a cached value instead of always calling getpagesize(3). CID: 1331374-1331377, 1331653-1331662
* MFC r298024,r298196:ngie2016-04-222-3/+3
| | | | | | | | | | | | | r298024: Set test_argv to NULL, not 0, if not executing a specific test r298196: Minor cosmetic cleanup - Remove spurious trailing whitespace in licensing header - Remove unnecessary semi-colon after comment
* MFC r295012vangyzen2016-04-143-15/+223
| | | | | | | | | | | | | kqueue EVFILT_PROC: avoid collision between NOTE_CHILD and NOTE_EXIT 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> Sponsored by: Dell Inc.
* MFC r297183:ngie2016-04-061-6/+4
| | | | | | | | | | Use a SKIP testplan instead of bailing out if/when the tester isn't root, or the geom class can't be loaded cleanly [*] This makes sure that scenarios that are easy to hit aren't counted as false positives with kyua test PR: 208101
* MFC r293878,r293880,r295116,r295117,r295477:ngie2016-03-143-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r293878: Remove unnecessary kldload logic added to geom_subr.sh in r293028 r293880: PID file support hasn't been committed for ggated(8) yet. Unbreak running the testcase more than once by restoring the "killall ggated" r295116: Add an additional 1 second sleep to after calling ggatec before calling 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 r295117: Use the pidfile support added to ggated(8) in r294973 to ensure that the 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 r295477: Similar to r295116, add an additional 1 second sleep after calling ggatel before calling dd to defeat a race when writing out to the geom_gate(4) device
* MFC r293821:ngie2016-03-1475-0/+3490
| | | | | | | | | | | | | | | | | | 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 r295341,r295345:ngie2016-03-121-1/+7
| | | | | | | | | | | | | | | | | | r295341: Require /bin/getfacl and /bin/setfacl when running the acl tests 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 r295345: Use basenames for getfacl, setfacl, and zpool to work around the 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 r270228:ngie2016-01-061-6/+47
| | | | | | | | | | | | | | | | | | | | | | | r270228 (by asomers): Numerous small fixes, mostly suggested by Coverity. tests/sys/kern/unix_seqpacket_test.c * Remove a duplicate error check in mk_pair_of_sockets * Always close sockets in the success path of ATF test cases. Don't bother with the error paths, because those are mostly assertions anyway. Most of these socket leaks were reported by Coverity. All of them are harmless, because each ATF test case runs in its own process. * Fix the len argument to send in shutdown_send and shutdown_send_sigpipe. The old version was using sizeof a pointer instead of sizeof the char array. Reported by Coverity. * Change a few ATF_CHECK to ATF_REQUIRE if the test can't reasonably continue past a failure. CID: 1229995, 1229991, 1229988, 1229994, 1229989, 1229992 CID: 1229993, 1229990, 1229984, 1229967, 1230005, 1229977 CID: 1229966, 1230004, 1229976
* MFC r271397:ngie2016-01-061-1/+1
| | | | | | | | r271397 (by asomers): Abort the create_socket test if socket creation fails. CID: 1232756
* MFC r292914,r292957:ngie2016-01-062-0/+397
| | | | | | | | | | | | | | | | | | | | r292914: Integrate tools/regression/sockets/unix_passfd into the FreeBSD test 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) https://reviews.freebsd.org/D689 Submitted by: markj r292957: Rename `recvfd` and `sendfd` variables in recvfd/sendfd functions to avoid -Wshadow issues with gcc
* MFC r288961,r288962:ngie2016-01-061-3/+3
| | | | | | | | | | | r288961 (by bdrewery): Fix build with older GCC which, doesn't like 'main' being a variable name. r288962 (by jhb): Tweak: use 'mainlwp' instead of 'mainpid' since this is a thread (LWP) identifier, not a pid.
* MFC r292650,r292651:ngie2016-01-061-10/+5
| | | | | | | | | | | | | | | | | r292650: Move mac_bsdextended check up before running the test_libugidfw_strings 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 r292651: Delete the comment about running `test_libugidfw_strings` before testing `mac_is_present` so it doesn't accidentally confuse people
* MFC r292570:ngie2016-01-0610-0/+900
| | | | | | Integrate tools/regression/mac/mac_bsdextended and tools/regression/mac/mac_portacl into the FreeBSD test suite as tests/sys/mac/bsdextended and tests/sys/mac/portacl, respectively
* MFC r292822:ngie2016-01-041-4/+3
| | | | Remove retval to fix a -Wunused-but-set-variable warning from gcc 4.9
* MFC r292820:ngie2016-01-041-19/+19
| | | | Clean trailing whitespace
* MFC r292816,r292818,r292819:ngie2016-01-042-72/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r292816: Place cancel and error under #ifdef DEBUG to mute -Wunused-but-set-variable warnings reported by gcc 4.9 Remove some trailing whitespace as well Tested with and without -DDEBUG r292818: Fix style(9) a bit and ensure that error from initializing kqueue(2) is 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 r292819: - Fix an improperly sized buffer for `pathname` [1] - Fix a -Wunused-but-set-variable warning [2]
* MFC r292582:ngie2015-12-291-2/+3
| | | | | | | | Dump out the output from flock_helper on failure so failures with the test app can be debugged Obtained from: Isilon OneFS (^/onefs/head@r511419) Sponsored by: EMC / Isilon Storage Division
* MFC r292319:ngie2015-12-231-0/+15
| | | | | | | | | | | Add ATF_REQUIRE_FEATURE and PLAIN_REQUIRE_FEATURE macros for 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) Sponsored by: EMC / Isilon Storage Division
* MFC r291331:bdrewery2015-12-041-0/+1
| | | | Avoid requiring 'make depend' here.
* MFC r284289,r288267:bdrewery2015-12-041-1/+1
| | | | | | | r284289: Misc fixes from projects/bmake r288267: Remove redundant .NOPATH.
* MFC r289393:bdrewery2015-12-044-0/+6
| | | | Add more SUBDIR_PARALLEL.
* MFC r290913,r291181:ngie2015-12-041-0/+5
| | | | | | | | | | | | | | | | | | | r290913: Port contrib/netbsd-tests/kernel/t_mqueue.c to FreeBSD - Add missing headers - Ensure mqueuefs is loaded - Make sure the mqueuefs path is absolute and relative to / - Cast the result of mq_open returning -1 to (mqd_t) to mute a compiler warning Sponsored by: EMC / Isilon Storage Division r291181: Integrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD test suite as tests/sys/kern/mqueue_test
* MFC r291180:ngie2015-12-041-2/+3
| | | | | | | | | | Fix up convert.c generation - 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.
* Fix bad MFC (r291173)rodrigc2015-12-031-1/+1
| | | | | | Replace SRCTOP with the relevant path via .CURDIR Reviewed by: bdrewery
* MFC r290914:ngie2015-11-2310-0/+799
| | | | | | | | | | | | | | Integrate tools/regression/pipe in to the FreeBSD test suite as 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 Sponsored by: EMC / Isilon Storage Division
OpenPOWER on IntegriCloud