summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-0717-105/+1431
|\
| * 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]
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-301-2/+3
|\ \ | |/
| * 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
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-281-0/+15
|\ \ | |/
| * 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
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-107-4/+17
|\ \ | |/
| * 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
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-2312-0/+1062
|\ \ | |/
| * 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
| * MFC r290911,r290912:ngie2015-11-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r290911: Ignore EINTR from usleep(3) in try_locks(..) NetBSD's usleep(3) only returns -1/sets errno=EINVAL when `microseconds` is one million or more Submitted by: pho Sponsored by: EMC / Isilon Storage Division r290912: Integrate contrib/netbsd-tests/kernel/t_lockf.c into the FreeBSD test suite as tests/sys/kern/lockf_test Sponsored by: EMC / Isilon Storage Division
| * MFC r290905,r290922:ngie2015-11-233-0/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r290905: Integrate acct(2) testcase in as tests/sys/kern/acct/acct_test The :encode_tv_random_million testcase fails the epsilon tests a few thousand times out of one million, so expect the testcase to fail Submitted by: keramida Sponsored by: EMC / Isilon Storage Division r290922: Remove directory made obsolete by r290905 X-MFC note: stable/10 only Sponsored by: EMC / Isilon Storage Division
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-1615-0/+3343
|\ \ | |/
| * MFC r289446:ngie2015-11-1615-0/+3343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrate tools/regression/acltools into the FreeBSD test suite as tests/sys/acl - 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 Reviewed by: trasz (earlier version) Differential Revision: https://reviews.freebsd.org/D3810
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-113-0/+637
|\ \ | |/
| * MFC r289441:ngie2015-11-093-0/+637
| | | | | | | | | | | | | | | | | | | | | | | | Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD 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. Sponsored by: EMC / Isilon Storage Division
* | Merge branch 'stable/10' into develRenato Botelho2015-11-035-15/+295
|\ \ | |/
| * MFC r289300:ngie2015-10-263-0/+50
| | | | | | | | | | | | Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs Sponsored by: EMC / Isilon Storage Division
| * MFC 287386,288949,288993:jhb2015-10-232-15/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export current system call code and argument count for system call entry and exit events. To preserve the ABI, the new fields are moved to the end of struct thread in these branches (unlike HEAD) and explicitly copied when new threads are created. In addition, the new tests are only added in 10. r287386: Export current system call code and argument count for system call entry and exit events. procfs stop events for system call tracing report these values (argument count for system call entry and code for system call exit), but ptrace() does not provide this information. (Note that while the system call code can be determined in an ABI-specific manner during system call entry, it is not generally available during system call exit.) The values are exported via new fields at the end of struct ptrace_lwpinfo available via PT_LWPINFO. r288949: Fix various edge cases related to system call tracing. - 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. r288993: Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.
* | MFC r275732:Luiz Otavio O Souza2015-10-207-0/+1311
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some new modes to OpenCrypto. These modes are AES-ICM (can be used for counter mode), and AES-GCM. Both of these modes have been added to the aesni module. Included is a set of tests to validate that the software and aesni module calculate the correct values. These use the NIST KAT test vectors. To run the test, you will need to install a soon to be committed port, nist-kat that will install the vectors. Using a port is necessary as the test vectors are around 25MB. All the man pages were updated. I have added a new man page, crypto.7, which includes a description of how to use each mode. All the new modes and some other AES modes are present. It would be good for someone else to go through and document the other modes. A new ioctl was added to support AEAD modes which AES-GCM is one of them. Without this ioctl, it is not possible to test AEAD modes from userland. Add a timing safe bcmp for use to compare MACs. Previously we were using bcmp which could leak timing info and result in the ability to forge messages. Add a minor optimization to the aesni module so that single segment mbufs don't get copied and instead are updated in place. The aesni module needs to be updated to support blocked IO so segmented mbufs don't have to be copied. We require that the IV be specified for all calls for both GCM and ICM. This is to ensure proper use of these functions. Obtained from: p4: //depot/projects/opencrypto Relnotes: yes Sponsored by: FreeBSD Foundation Sponsored by: NetGate TAG: IPSEC-HEAD Issue: #4841
* MFC 287448:jhb2015-10-011-8/+103
| | | | | | | Add more mmap tests related to character devices. - Add cdev-related tests for bad args. - Add two simple tests cases for mapping /dev/zero that test for MAP_ANON-like behavior.
* MFC 286370:jhb2015-10-011-0/+80
| | | | | | | | | | | Add various tests to ensure that invalid arguments passed to mmap() trigger failures. Note: most of the tests that should provoke an EINVAL error do not pass on stable/10 as stable/10 does not have the changes that added more strict parameter checking to mmap(). Those changes will not be merged to stable/10, so I have disabled them via #if 0 with a comment explaining why.
* MFC 286369:jhb2015-10-012-37/+24
| | | | | Convert the map_at_zero test case to ATF. In particular, this will facilitate adding more mmap() tests.
* MFC 283281,283282,283562,283647,283836,284000,286158:jhb2015-09-092-0/+887
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various fixes to orphan handling which also fix issues with following forks. 283281: Always set p_oppid when attaching to an existing process via procfs tracing. This matches the behavior of ptrace(PT_ATTACH). Also, the procfs detach request assumes p_oppid is always set. 283282: Only reparent a traced process to its old parent if the tracing process is not the old parent. Otherwise, proc_reap() will leave the zombie in place resulting in the process' status being returned twice to its parent. Add test cases for PT_TRACE_ME and PT_ATTACH which are fixed by this change. 283562: Do not allow a process to reap an orphan (a child currently being traced by another process such as a debugger). The parent process does need to check for matching orphan pids to avoid returning ECHILD if an orphan has exited, but it should not return the exited status for the child until after the debugger has detached from the orphan process either explicitly or implicitly via wait(). Add two tests for for this case: one where the debugger is the direct child (thus the parent has a non-empty children list) and one where the debugger is not a direct child (so the only "child" of the parent is the orphan). 283647: Tweak the description of when waitpid() doesn't return any status for a non-blocking wait to avoid the word "empty". 283836: Consistently only use one end of the pipe in the parent and debugger processes and do not rely on EOF due to a close() in the debugger. 284000: Add a CHILD_REQUIRE macro similar to ATF_REQUIRE for use in child processes of the main test process. 286158: Clear P_TRACED before reparenting a detached process back to its original parent. Otherwise the debugee will be set as an orphan of the debugger. Add tests for tracing forks via PT_FOLLOW_FORK.
* Merge r285891:rodrigc2015-08-111-1/+2
| | | | | | | | Pass unsigned long argument to ioctl(). Eliminates "ioctl sign-extension" warnings. PR: 200896
* MFC r277627,r277650,r282059,r283056,r283840,r283845:ngie2015-05-314-1/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r277627 (by will): Add routing_test:static_ipv6_loopback_route_for_each_fib. It tests that all FIBs get a static IPv6 loopback route. Submitted by: asomers Sponsored by: Spectra Logic MFSpectraBSD: 1048456 on 2014/03/13 1114523 on 2015/01/23 r277650 (by will): Add tests/etc/rc.d to mtree. Submitted by: stefanf MFC with: 277627 r282059: Move etc/tests/rc.d to etc/rc.d/tests to match the directory layout jmmv@ documented and implemented in other areas of the FreeBSD tree r283056: Move all test integration pieces for etc/ from etc/ to tests/ This is being done to fix breakage with make distribution with read-only source trees as make distribution doesn't use make obj like building tests/ does in all cases Reported by: Wolfgang Zenker <wolfgang@lyxys.ka.sub.org> Suggested by: jhb r283840: Remove empty tests directory r283845: Append to SUBDIR, not set it Pointyhat to: ngie
* MFC r282061:ngie2015-05-1611-0/+279
| | | | | Integrate tools/regression/execve into the FreeBSD test suite as tests/sys/kern/execve
* MFC r262781,r263336:ngie2015-05-131-8/+120
| | | | | | | | | | | | | | | | | r262781 (by pho): Preserve naming consistency for test cases. Pointed out by: jmmv Sponsored by: EMC / Isilon storage division r263336 (by pho): Added sysctl kern.maxfiles increase test, do not use /etc/passwd for tests and use volatile sig_atomic_t for signal handler variable. Reviewed by: asomers (previous version) Sponsored by: EMC / Isilon storage division
* MFC r282211,r282244:ngie2015-05-131-7/+10
| | | | | | | | | | | | | | | | r282211: ATF_REQUIRE_KERNEL_MODULE: use atf_skip, not ATF_REQUIRE_MSG so the testcase no longer bombs out PLAIN_REQUIRE_KERNEL_MODULE: use printf + _exit, no err so the testcase no longer bombs out if it prints to stderr r282244: Fix typo. It should have been atf_tc_skip, not atf_skip Reported by: many, Jenkins Pointyhat to: ngie
* MFC r281593,r282071,r282074,r282133,r282134,r282135,r282136,r282137,r282138:ngie2015-05-1313-0/+1814
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r282071: Integrate tools/regression/mqueue into the FreeBSD test suite as tests/sys/mqueue r282074: Integrate tools/regression/aio/aiotest and tools/regression/aio/kqueue into the FreeBSD test suite as tests/sys/aio r282133: Fill in the copyright boilerplate for the test program r282134: Add initial (unpolished) macros for interfacing with the FreeBSD test suite This is very rough, but will be replaced/redesigned some time soon after I fix the Jenkins breakage I introduced r282135: Use ATF_REQUIRE_KERNEL_MODULE instead of aio_available function r282136: - Use ATF_REQUIRE_KERNEL_MDOULE to require aio(4) - Don't use /tmp as a basis for temporary files as it's outside of the ATF sandbox - Don't override MAX macro in sys/param.h r282137: Use PLAIN_REQUIRE_KERNEL_MODULE to require "mqueuefs" r282138: Adjust CFLAGS to find freebsd_test_suite/macros.h
* MFC r282076,r282104:ngie2015-05-133-0/+113
| | | | | | | | | | | | | | | r282076: Integrate tools/regression/mmap into the FreeBSD test suite as tests/sys/kern/mmap_test r282104: Move tests/sys/kern/mmap_test to tests/sys/vm/mmap_test As jhb noted, the actual mmap(2) implementation is under sys/vm, not sys/kern/, so the correct logical place is tests/sys/vm/, not tests/sys/kern/
* MFC r262526,r262730:ngie2015-05-132-1/+80
| | | | | | | | | | | | | | | | | r262526 (by pho): Added a regression test for r234131. Discussed with: asomers Sponsored by: EMC / Isilon storage division r262730 (by pho): Changed name of test case to a more descriptive one and moved comment to the "descr" property. Suggested by: jmmv Sponsored by: EMC / Isilon storage division
* MFC r282067:ngie2015-05-1314-0/+5256
| | | | | Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo and tools/regression/file into the FreeBSD test suite as tests/sys/file
* MFC r282063:ngie2015-05-1312-0/+1770
| | | | | Integrate tools/regression/kqueue into the FreeBSD test suite as tests/sys/kqueue
* MFC r264400,r265836:ngie2014-12-311-1/+1
| | | | | | | | | | | | | | r264400: NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit. r265836: Remove last two NO_MAN= in the tree. In both of these cases, MAN= is what is needed.
* MFC r272057,r272083,r272084,r272087,r274016:ngie2014-12-0521-1/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r272057: Import pjdfstest from ^/vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91 - Remove tools/regression/pjdfstest - Add upgrade directions for contrib/pjdfstest - Add a note to UPDATING for the move (the reachover Makefiles are coming soon) Functional differences: - ftruncate testcases are added from upstream (github) Non-functional differences: - The copyright for the project has been updated to 2012 - pjd's contact information has been updated Discussed with: -testing, jmmv, pjd Sponsored by: EMC / Isilon Storage Division r272083: Expect ELOOP on Darwin/Linux with "O_NOFOLLOW was specified and the target is a symbolic link" case. Assume EMLINK on the rest of the OSes (FreeBSD, Solaris, etc) Sponsored by: EMC / Isilon Storage Division r272084: Fix the executed testplan count Sponsored by: EMC / Isilon Storage Division r272087: Increase the memory disk size in the following testcases to avoid mount failures, which would cause cascade failures in the rest of the test run: link/15.t, open/19.t, mkdir/11.t, mkfifo/11.t, symlink/11.t Fail quickly in all of the testcases if mdconfig, mount, umount, etc fails to avoid issues similar to this in the future Submitted by: Casey Peel <cpeel@isilon.com> Sponsored by: EMC / Isilon Storage Division r274016: Integrate pjdfstest test suite execution into kyua pjdfstest execution is opt-in and must be done as root due to some of the assumptions made by the test suite and lack of error checking in the non-root case A description of how to execute pjdfstest with kyua is provided in share/pjdfstest/README Phabric: D824 (an earlier prototype patch) Relnotes: yes Sponsored by: EMC / Isilon Storage Division
* MFC r274021:ngie2014-11-151-4/+0
| | | | | | | | | | Remove explicit KYUAFILE=yes from tests/sys/Makefile This causes the directory traversing Kyuafile to be installed, which in turn causes tests/sys/pjdfstest to always be run from /usr/tests/sys Let KYUAFILE default to auto, so the file generated by suite.test.mk gets installed instead
OpenPOWER on IntegriCloud