summaryrefslogtreecommitdiffstats
path: root/tools/regression
Commit message (Collapse)AuthorAgeFilesLines
* MFC r319015:ngie2017-05-301-2/+1
| | | | Use calloc instead of malloc + memset
* MFC r317313:ngie2017-05-291-7/+19
| | | | | | | gctl_test.t: catch errors with the mdcfg directive While here, add a note about certain testcases relying on `count=1024` in the "create" portion.
* MFC ↵ngie2017-05-273-35/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r317290,r317291,r317292,r317293,r317294,r317295,r317304,r317306,r317307,r317308,r317309: r317290: Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h #include below the stdio.h #include. gctl_dump(3) needs stdio.h, per reasoning noted in r317289. PR: 218809 r317291: Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c This is being done to reduce ambiguity and to make the tests more portable in the future to other locations in the source tree. r317292: gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly r317293: gctl_test_helper: apply polish - Staticize variables to fix warnings. - Sprinkle asserts around for calls that can fail - Apply style(9) for main(..) definition. - ANSIify usage(..) definition. r317294: Bump WARNS to 6 per previous commits which fixed warnings Tested with: clang (4.0), gcc (4.2.1, 6.3.0) r317295: The GPT class no longer exists; use the PART class instead r317304: gctl_test_helper: add diagnostic output for parse_retval(..) This will help end-users better diagnose issues with the function. r317306: gctl_test.t: minor tweaks - Declare $count with the `my` scope operator to permit `use strict`. - Add `use strict`. - Use `use warnings` instead of using `-w` in the shebang. - Don't unlink $cmd when done (prevents unnecessary rebuilding). - Improve the error message when running with insufficient permissions, e.g., non-root. r317307: Use verb=delete not verb=remove The `remove` verb hasn't been present in geom_part*(4) for well over a decade, if ever. I couldn't find any references to it in ^/stable/5 at least, which is around the timeframe that this test was written. r317308: gctl_test.t: more tweaks to try and update the code and get it functional (again?) - Make the logfile for $out be built off the basename for $cmd, instead of $cmd. (r317292 broke this assumption). - Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for mountpoints. - Reindent the umount directive block while here to match the rest of the code. r317309: gctl_test.t: improve error reporting with mdcfg and mount directives If the commands had failed previously, it would press on and result in a series of cascading failures. Fail early and continue on to the next case instead of executing additional commands after a previously failed series of steps.
* tools: minor spelling fixes.pfg2016-05-011-1/+1
| | | | | | Mostly comments but also some user-visible strings. MFC after: 2 weeks
* Set NULL to the ai_next pointer which fix cap_getaddrinfo().oshogbo2016-04-141-8/+122
| | | | | | | | Add regression test case. PR: 195551 Submitted by: Mikhail <mp39590@gmail.com> Approved by: pjd (mentor)
* Remove these broken filemon tests.bdrewery2016-03-094-390/+0
| | | | | | | | | | They were not very useful in their current state. It only ran a fork bomb, confirmed headers/footers matched, hard-coded the number of expected entries (rather than ensuring each entry is present when expected), and was missing a sizeof_long.c file from r251368 which makes its intent for testing 32-bit binaries unclear. More extensive tests should be written with ATF now.
* Convert casperd(8) daemon to the libcasper.oshogbo2016-02-255-14/+13
| | | | | | | | | | | | | | | | | | | | After calling the cap_init(3) function Casper will fork from it's original process, using pdfork(2). Forking from a process has a lot of advantages: 1. We have the same cwd as the original process. 2. The same uid, gid and groups. 3. The same MAC labels. 4. The same descriptor table. 5. The same routing table. 6. The same umask. 7. The same cpuset(1). From now services are also in form of libraries. We also removed libcapsicum at all and converts existing program using Casper to new architecture. Discussed with: pjd, jonathan, ed, drysdale@google.com, emaste Partially reviewed by: drysdale@google.com, bdrewery Approved by: pjd (mentor) Differential Revision: https://reviews.freebsd.org/D4277
* semget(): Check for [EEXIST] error first.jilles2016-02-071-0/+9
| | | | | | | | | | Although POSIX literally permits failing with [EINVAL] if IPC_CREAT and IPC_EXCL were both passed, the semaphore set already exists and has fewer semaphores than nsems, this does not allow an application to retry safely: if the [EINVAL] is actually because of the semmsl limit, an infinite loop would result. PR: 206927
* Use different ports in the TCP/UDP testcases with the first set andngie2016-01-231-10/+10
| | | | | | | | | | | | | | the second set (increment the original ports by 10) This avoids issues where the first listening socket might not be torn down by the time it makes it to the second set of testcases. The sockets should likely only be setup once, but this keeps in the spirit of the original testcases, so this will be easier to backport to ^/stable/9 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Don't run the t_cmsg_len testcase on 64-bit architecturesngie2016-01-231-0/+12
| | | | | | | | | | | It always fails when trying to send through the sendit(9) private KPI in the kernel due to a size mismatch between the msghdr and data being sent [*], which suspiciously seems like it's related to sizeof pointers instead of scalars, or something of that ilk MFC after: 1 week PR: 206543, 206544 [*] Sponsored by: EMC / Isilon Storage Division
* - Don't return immediately in check_xucred, check_scm_creds_cmsgcred, andngie2016-01-231-81/+98
| | | | | | | | | | | | | | check_scm_creds_sockcred after initial != NULL checks have been done for debugging purposes - Use more terse names for bintime (bt), cmesgcred (cmcred), sockcred (sc), and timeval (tv) [*] - Add some debug messages to better understand some of the flow of the test program MFC after: 1 week Requested by: bde [*] Use of the word "terse" (^.^) corrected by: jhb, rpokala [*] Sponsored by: EMC / Isilon Storage Division
* sem: Don't free nameinfo that is still in list when open() fails.jilles2016-01-221-0/+35
| | | | | | | | | | This bug could be reproduced easily by calling sem_open() with O_CREAT | O_EXCL on a semaphore that is already open in the process. The struct sem_nameinfo would be freed while still in sem_list and later calls to sem_open() or sem_close() could access freed memory. PR: 206396 MFC after: 5 days
* Fix -Wunused warning with clang/gccngie2016-01-162-2/+2
| | | | | | | | - Get rid of unused argc/argv variables in main - Bump WARNS to 6 MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* Fix warnings with clang/gccngie2016-01-162-33/+33
| | | | | | | | | | - Get rid of unused argc/argv variables in main - Exit on failure with a return code of 1 instead of -1 with err/errx as a return code of -1 is implementation dependent - Bump WARNS to 6 MFC after: 5 days Sponsored by: EMC / Isilon Storage Division
* Fix warnings with gcc 5.0ngie2016-01-162-4/+2
| | | | | | | | | | | | | | reconnect.c: - Convert the K&R prototype of main to an ANSI prototype to mute a warning from gcc 4.2.1 - Close s_sock2 after finishing off the last test to plug a leak and mute a warning from gcc 5.0 about a -Wunused-but-set variable sendfile.c: - Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..) MFC after: 5 days Sponsored by: EMC / Isilon Storage Division
* Test for EPROTOTYPE not EPROTONOSUPPORTngie2016-01-162-5/+5
| | | | | | | | | | - `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4) - localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so the prototype is invalid (this isn't explicitly documented anywhere I could find) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Add missing newline to message about requiring root privilegesngie2016-01-161-1/+1
| | | | | | | | This will help ensure that scripts/parsers don't get confused when the message is printed out MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* - Check for accf_filter before running the tests, otherwise it will alwaysngie2016-01-151-2/+13
| | | | | fail at subtest 9/11 - Use strncpy instead of strcpy with afa.af_name
* Integratengie2016-01-1364-3272/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * MFhead @ r293006ngie2015-12-312-397/+0
| |\
| * \ MFhead @ r292618ngie2015-12-2920-2627/+6
| |\ \
| * \ \ MFhead @ r292396ngie2015-12-1752-9472/+3
| |\ \ \
| * \ \ \ MFhead @ r292005ngie2015-12-093-6/+14
| |\ \ \ \
| * \ \ \ \ MFhead@r291879ngie2015-12-0621-607/+594
| |\ \ \ \ \
| * | | | | | r291359 was incorrect. Skip over tokens that start with `#' as fgetln canngie2015-11-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | return more than one '\n' delimited line in a buffer Handle empty lines too, just in case MFC after: 3 days X-MFC with: r291359
| * | | | | | - Remove cnftp.bjpu.edu.cn (it no longer resolves)ngie2015-11-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add localhost to resolv/mach for parity with nss/mach
| * | | | | | Skip over lines that start with commentsngie2015-11-261-0/+2
| | | | | | |
| * | | | | | MFhead @ r291235ngie2015-11-241-0/+1
| |\ \ \ \ \ \
| * | | | | | | Integrate tools/regression/geom* into the FreeBSD test suite under sbin/geom/...ngie2015-11-16116-9327/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XXX: test
| * | | | | | | MFhead @ r290922ngie2015-11-163-169/+0
| | | | | | | |
* | | | | | | | Add conf.sh file missed in r293621ngie2016-01-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 16 days Sponsored by: EMC / Isilon Storage Division
* | | | | | | | Remove Makefile now that the testcases are all TAP based andngie2016-01-091-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prove -rv can be used on them MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Delete non-TAP testcasesngie2016-01-097-162/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a conf.sh file for executing common functions with geom_gate - Use attach_md for attaching md(4) devices - Don't hardcode /tmp for temporary files, which violates the kyua sandbox - Add/increase sleeps to try and improve synchronization - Add debug output for when checksums fail test-1.t: - Use pkill for killing ggated MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Move functions that might be used in class-specific cleanup functionsngie2016-01-081-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (geom_test_cleanup, etc) down so the testcases don't emit noise when bailing - Conform to the TAP protocol better when dealing with classes that can't be loaded and with temporary files that can't be allocated for tracking md(4) devices. MFC after: 2 weeks X-MFC with: r293028, r293029, r293048 Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Make test-1.sh into a TAP testable testcasengie2016-01-086-62/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Delete test-2.sh as it was an incomplete testcase, and the contents were basically a subset of test-1.sh - Add a conf.sh file for executing common functions with geom_uzip - Use attach_md for attaching md(4) devices - Don't hardcode /tmp for temporary files, which violates the kyua sandbox MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Add a geom_stripe specific cleanup function and trap on that function atngie2016-01-083-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exit so things are cleaned up properly - Use attach_md for attaching md(4) devices - Don't hardcode /tmp for temporary files, which violates the kyua sandbox MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Add a geom_shsec specific cleanup function and trap on that function atngie2016-01-083-29/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exit so things are cleaned up properly - Use attach_md for attaching md(4) devices - Don't hardcode /tmp for temporary files, which violates the kyua sandbox MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Add a geom_raid3 specific cleanup function and trap on that function atngie2016-01-0813-177/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exit so things are cleaned up properly - Use attach_md for attaching md(4) devices - Don't hardcode /tmp for temporary files, which violates the kyua sandbox MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Add a conf.sh file for executing common functions with gnopngie2016-01-083-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use attach_md for attaching md(4) devices - Don't hardcode /tmp for temporary files, which violates the kyua sandbox MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Add a conf.sh file for executing common functions with gelingie2016-01-0821-73/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- Use linear probing to find the first unique md(4) device, unlike the other code which uses attach_md, as geli(8) allocates the md(4) devices itself - Don't hardcode /tmp for temporary files, which violates the kyua sandbox MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Use attach_md for memory disks so they can be tracked.ngie2016-01-083-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a geom_concat specific cleanup function and trap on that function at exit so things are cleaned up properly - Don't hardcode /tmp for temporary files, which violates the kyua sandbox MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Use attach_md instead of hardcoding md(4) provider unit numbersngie2016-01-038-107/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Implement a gmirror_test_cleanup function, which in turn calls geom_test_cleanup to clean up all md(4) providers allocated in the test run. - Remove duplicate logic in test scripts for removing md(4) providers. - Don't create files in /tmp (outside the kyua sandbox); use the current directory instead MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Use a temporary file for the temporary md(4) devices instead ofngie2016-01-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hardcoding it - Remove the temporary file in the cleanup routine MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | Use randomly generated device names in testcases via mktemp -u instead of usingngie2016-01-015-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the hardcoded device name, "test" MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | Add functions for managing md(4) devices and cleaning up said md(4) devicesngie2016-01-011-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These will be used soon in the various test scripts that source geom_subr.sh MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | | - Use geom <class> load instead of g<class> load; g<class> doesn't existngie2016-01-011-1/+6
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for all geom classes, e.g. geom_uzip(4) - These tests require root. Skip all of the tests if they're run as non-root MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* | | | | | | Integrate tools/regression/sockets/unix_passfd into the FreeBSD testngie2015-12-302-397/+0
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | - Explicitly initialize ch to 0ngie2015-12-281-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Delete some spurious whitespace - Use calloc instead of malloc in the last test to ensure that sendspace is properly zero'ed out Differential Revision: https://reviews.freebsd.org/D689 (part of a larger diff) MFC after: 1 week Reviewed by: asomers, ngie Submitted by: markj Sponsored by: EMC / Isilon Storage Division
* | | | | | Integrate tools/regression/mac/mac_bsdextended andngie2015-12-217-868/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Make the mac_portacl testcases work / more robustngie2015-12-213-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - A trap(1) call has been added to the test scripts to better ensure that the tests do a better job at trying to restore the test host state at the end of the tests (if the test was interrupted before it would leave the system in an odd state, potentially making the test results for subsequent runs non-deterministic). - Add root user checks - Fix nc(1) usage: -- -o is deprecated -- Using `-w 10` will make the call timeout after 10 seconds so it doesn't block indefinitely - Use local variables - Be more terse in the error messages - Parameterize out "127.0.0.1" MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
OpenPOWER on IntegriCloud