aboutsummaryrefslogtreecommitdiff
path: root/tools/regression
Commit message (Collapse)AuthorAgeFilesLines
...
* gctl_test.t: catch errors with the mdcfg directiveEnji Cooper2017-04-231-7/+19
| | | | | | | | | | | While here, add a note about certain testcases relying on `count=1024` in the "create" portion. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317313
* gctl_test.t: improve error reporting with mdcfg and mount directivesEnji Cooper2017-04-221-9/+19
| | | | | | | | | | | | | 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. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317309
* gctl_test.t: more tweaks to try and update the code and get it functional ↵Enji Cooper2017-04-221-7/+9
| | | | | | | | | | | | | | | | (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. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317308
* Use verb=delete not verb=removeEnji Cooper2017-04-221-2/+2
| | | | | | | | | | | | | 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. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317307
* gctl_test.t: minor tweaksEnji Cooper2017-04-221-5/+6
| | | | | | | | | | | | | | | - 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. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317306
* gctl_test_helper: add diagnostic output for parse_retval(..)Enji Cooper2017-04-221-4/+8
| | | | | | | | | | This will help end-users better diagnose issues with the function. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317304
* The GPT class no longer exists; use the PART class insteadEnji Cooper2017-04-221-1/+1
| | | | | | | | MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317295
* Bump WARNS to 6 per previous commits which fixed warningsEnji Cooper2017-04-221-0/+2
| | | | | | | | | MFC after: 5 weeks Tested with: clang (4.0), gcc (4.2.1, 6.3.0) Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317294
* gctl_test_helper: apply polishEnji Cooper2017-04-221-4/+8
| | | | | | | | | | | | | - Staticize variables to fix warnings. - Sprinkle asserts around for calls that can fail - Apply style(9) for main(..) definition. - ANSIify usage(..) definition. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317293
* gctl_test.t: use make to compile gctl_test_helper instead of calling cc directlyEnji Cooper2017-04-222-6/+12
| | | | | | | | MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317292
* Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.cEnji Cooper2017-04-222-1/+1
| | | | | | | | | | | This is being done to reduce ambiguity and to make the tests more portable in the future to other locations in the source tree. MFC after: 5 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317291
* Fix -Wimplicit-function-declaration compilation warning by moving libgeom.hEnji Cooper2017-04-221-1/+1
| | | | | | | | | | | | | | #include below the stdio.h #include. gctl_dump(3) needs stdio.h, per reasoning noted in r317289. MFC after: 5 weeks PR: 218809 Submitted by: Chang-Hsien Tsai <luke.tw@gmail.com> Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=317290
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Add a regression test for putting a socket on kqueue, and then doingGleb Smirnoff2017-02-142-0/+121
| | | | | | | listen(2) on it (see r313043). Based on Hartmut's code. Notes: svn path=/head/; revision=313750
* Add a new socket option SO_TS_CLOCK to pick from several different clockMaxim Sobolev2017-01-164-1/+691
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sources to return timestamps when SO_TIMESTAMP is enabled. Two additional clock sources are: o nanosecond resolution realtime clock (equivalent of CLOCK_REALTIME); o nanosecond resolution monotonic clock (equivalent of CLOCK_MONOTONIC). In addition to this, this option provides unified interface to get bintime (equivalent of using SO_BINTIME), except it also supported with IPv6 where SO_BINTIME has never been supported. The long term plan is to depreciate SO_BINTIME and move everything to using SO_TS_CLOCK. Idea for this enhancement has been briefly discussed on the Net session during dev summit in Ottawa last June and the general input was positive. This change is believed to benefit network benchmarks/profiling as well as other scenarios where precise time of arrival measurement is necessary. There are two regression test cases as part of this commit: one extends unix domain test code (unix_cmsg) to test new SCM_XXX types and another one implementis totally new test case which exchanges UDP packets between two processes using both conventional methods (i.e. calling clock_gettime(2) before recv(2) and after send(2)), as well as using setsockopt()+recv() in receive path. The resulting delays are checked for sanity for all supported clock types. Reviewed by: adrian, gnn Differential Revision: https://reviews.freebsd.org/D9171 Notes: svn path=/head/; revision=312296
* Check that SCM_XXX timestamp returned by the kernel is less 1 secondMaxim Sobolev2016-12-094-1/+143
| | | | | | | | | away in the past from the current time. This should be plenty for the scheduler to do its job. It provides assurance that the timestamp returned is actually a valid one, not just some random garbage. Notes: svn path=/head/; revision=309773
* Auto-generate 2 test cases that differ only in structure and SCM_XXX constantMaxim Sobolev2016-12-065-205/+45
| | | | | | | | | used. We can do it programmatically, but that would make code convoluted and more complex. I have two more of those types coming for the CLOCK_REALTIME and CLOCK_MONOTONIC. This seems like an elegant and scallable approach. Notes: svn path=/head/; revision=309631
* Refactor the regression test code by splitting huge monolithic CMaxim Sobolev2016-12-0520-1643/+2300
| | | | | | | | | | | file into smaller pieces that are hopefully easier to understand and extend. This is to pave the ground for adding few more socket timestamp formats that I am working on here. No functional changes (I hope). Notes: svn path=/head/; revision=309554
* Clean up and add some test cases for ALU instructions.Jung-uk Kim2016-10-2193-600/+830
| | | | Notes: svn path=/head/; revision=307708
* Move libcasper tests from regression/capsicum/libcasper/ toMariusz Zaborski2016-09-085-5330/+0
| | | | | | | | | | lib/libcasper/service/${service_name}/tests. Reviewed by: emaste, ngie Differential Revision: https://reviews.freebsd.org/D7759 Notes: svn path=/head/; revision=305626
* Fix Capsicum syscalls test suite.Mariusz Zaborski2016-08-302-4/+18
| | | | Notes: svn path=/head/; revision=305084
* Remove calls to `die` added for associated bugsEnji Cooper2016-07-313-6/+0
| | | | | | | | | | Panics are no longer hit with ^/head@r303573 on amd64 PR: 194586, 194587, 194589 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=303575
* tools: minor spelling fixes.Pedro F. Giffuni2016-05-011-1/+1
| | | | | | | | | Mostly comments but also some user-visible strings. MFC after: 2 weeks Notes: svn path=/head/; revision=298881
* Set NULL to the ai_next pointer which fix cap_getaddrinfo().Mariusz Zaborski2016-04-141-8/+122
| | | | | | | | | | | Add regression test case. PR: 195551 Submitted by: Mikhail <mp39590@gmail.com> Approved by: pjd (mentor) Notes: svn path=/head/; revision=297982
* Remove these broken filemon tests.Bryan Drewery2016-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. Notes: svn path=/head/; revision=296576
* Convert casperd(8) daemon to the libcasper.Mariusz Zaborski2016-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 Notes: svn path=/head/; revision=296047
* semget(): Check for [EEXIST] error first.Jilles Tjoelker2016-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 Notes: svn path=/head/; revision=295385
* Use different ports in the TCP/UDP testcases with the first set andEnji Cooper2016-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 Notes: svn path=/head/; revision=294647
* Don't run the t_cmsg_len testcase on 64-bit architecturesEnji Cooper2016-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 Notes: svn path=/head/; revision=294646
* - Don't return immediately in check_xucred, check_scm_creds_cmsgcred, andEnji Cooper2016-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 Notes: svn path=/head/; revision=294645
* sem: Don't free nameinfo that is still in list when open() fails.Jilles Tjoelker2016-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 Notes: svn path=/head/; revision=294565
* Fix -Wunused warning with clang/gccEnji Cooper2016-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 Notes: svn path=/head/; revision=294128
* Fix warnings with clang/gccEnji Cooper2016-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 Notes: svn path=/head/; revision=294127
* Fix warnings with gcc 5.0Enji Cooper2016-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 Notes: svn path=/head/; revision=294126
* Test for EPROTOTYPE not EPROTONOSUPPORTEnji Cooper2016-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 Notes: svn path=/head/; revision=294125
* Add missing newline to message about requiring root privilegesEnji Cooper2016-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 Notes: svn path=/head/; revision=294123
* - Check for accf_filter before running the tests, otherwise it will alwaysEnji Cooper2016-01-151-2/+13
| | | | | | | | fail at subtest 9/11 - Use strncpy instead of strcpy with afa.af_name Notes: svn path=/head/; revision=294103
* IntegrateEnji Cooper2016-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 Notes: svn path=/head/; revision=293821
* Add conf.sh file missed in r293621Enji Cooper2016-01-131-0/+10
| | | | | | | | MFC after: 16 days Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=293815
* Remove Makefile now that the testcases are all TAP based andEnji Cooper2016-01-091-8/+0
| | | | | | | | | | prove -rv can be used on them MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=293622
* - Delete non-TAP testcasesEnji Cooper2016-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 Notes: svn path=/head/; revision=293621
* - Move functions that might be used in class-specific cleanup functionsEnji Cooper2016-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 Notes: svn path=/head/; revision=293444
* - Make test-1.sh into a TAP testable testcaseEnji Cooper2016-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 Notes: svn path=/head/; revision=293443
* - Add a geom_stripe specific cleanup function and trap on that function atEnji Cooper2016-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 Notes: svn path=/head/; revision=293442
* - Add a geom_shsec specific cleanup function and trap on that function atEnji Cooper2016-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 Notes: svn path=/head/; revision=293441
* - Add a geom_raid3 specific cleanup function and trap on that function atEnji Cooper2016-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 Notes: svn path=/head/; revision=293438
* - Add a conf.sh file for executing common functions with gnopEnji Cooper2016-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 Notes: svn path=/head/; revision=293437
* - Add a conf.sh file for executing common functions with geliEnji Cooper2016-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 Notes: svn path=/head/; revision=293436
* - Use attach_md for memory disks so they can be tracked.Enji Cooper2016-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 Notes: svn path=/head/; revision=293434
* - Use attach_md instead of hardcoding md(4) provider unit numbersEnji Cooper2016-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 Notes: svn path=/head/; revision=293073