summaryrefslogtreecommitdiff
path: root/tools/regression
Commit message (Collapse)AuthorAgeFilesLines
* Drop "All rights reserved" from all my stuff. This includesEdward Tomasz Napierala2020-10-281-1/+0
| | | | | | | | | | | | Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980 Notes: svn path=/head/; revision=367105
* Do a sweep and remove most WARNS=6 settingsKyle Evans2020-10-0130-33/+0
| | | | | | | | | | | | | | | Repeating the default WARNS here makes it slightly more difficult to experiment with default WARNS changes, e.g. if we did something absolutely bananas and introduced a WARNS=7 and wanted to try lifting the default to that. Drop most of them; there is one in the blake2 kernel module, but I suspect it should be dropped -- the default WARNS in the rest of the build doesn't currently apply to kernel modules, and I haven't put too much thought into whether it makes sense to make it so. Notes: svn path=/head/; revision=366304
* fsx: fix build with WARNS=6Alan Somers2020-09-212-44/+24
| | | | | | | | | | | | | | | * signed/unsigned comparisons * use standard warn(3) * Suppress warnings about local vars and funcs not declared static * const-correctness * declaration shadows a variable in the global scope Reviewed by: kevans MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26516 Notes: svn path=/head/; revision=365956
* Update flp test for new diskinfo outputWarner Losh2020-09-121-1/+1
| | | | | | | | | | The floppy test passes with this. The others fail due to 'integrity checks' failing in GPART. It's not at all clear those integrity checks are legit or if the test samples were bogusly generated by FreeBSD. Notes: svn path=/head/; revision=365665
* Fix trailing whitespaceWarner Losh2020-09-121-3/+3
| | | | Notes: svn path=/head/; revision=365664
* Make this compile again by fixing err args to have formatsWarner Losh2020-09-122-1/+2
| | | | | | | | Also, add NO_OBJ=t top the Makefie, since the test-harnest expects to run it in place. Notes: svn path=/head/; revision=365663
* Remove disk images / tests from alpha, sun and pc98Warner Losh2020-09-1115-1280/+0
| | | | | | | | | These images are no longer relevant... However, I've also not tested the regression test here to see if it still works or not... It needs a lot of love regardless... Notes: svn path=/head/; revision=365645
* fsx: seed more randomly with the -S0 optionAlan Somers2019-04-281-13/+24
| | | | | | | | | | | | | | | When using -S0, seed the PRNG with the current time in nanoseconds, not seconds, so consecutive runs don't accidentally use the same seed. Also, rename some variables for clarity. Reviewed by: ngie MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20078 Notes: svn path=/head/; revision=346847
* Make timespecadd(3) and friends publicAlan Somers2018-07-303-81/+13
| | | | | | | | | | | | | | | | | | | | | | The timespecadd(3) family of macros were imported from NetBSD back in r35029. However, they were initially guarded by #ifdef _KERNEL. In the meantime, we have grown at least 28 syscalls that use timespecs in some way, leading many programs both inside and outside of the base system to redefine those macros. It's better just to make the definitions public. Our kernel currently defines two-argument versions of timespecadd and timespecsub. NetBSD, OpenBSD, and FreeDesktop.org's libbsd, however, define three-argument versions. Solaris also defines a three-argument version, but only in its kernel. This revision changes our definition to match the common three-argument version. Bump _FreeBSD_version due to the breaking KPI change. Discussed with: cem, jilles, ian, bde Differential Revision: https://reviews.freebsd.org/D14725 Notes: svn path=/head/; revision=336914
* Fix the build of tools/regression/sockets/unix_cmsgAlan Somers2018-07-191-0/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=336466
* Convert tools/regression/sockets/socketpair to ATFAlan Somers2018-02-102-170/+0
| | | | | | | | | Reviewed by: cem MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D14305 Notes: svn path=/head/; revision=329108
* other: Fix several typos and minor errorsEitan Adler2017-12-271-1/+1
| | | | | | | | | | | - duplicate words - typos - references to old versions of FreeBSD Reviewed by: imp, benno Notes: svn path=/head/; revision=327233
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-204-0/+8
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-185-5/+15
| | | | | | | | | | | | | | | | | | | | The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Add a test case for a connection on accept queue that is reset beforeGleb Smirnoff2017-08-241-8/+35
| | | | | | | | it is accepted. In that case accept(2) shall return ECONNABORTED. Accept filters provide help with easily replicating that case. Notes: svn path=/head/; revision=322858
* Improve handling with system stateEnji Cooper2017-06-101-2/+15
| | | | | | | | | | | | - Always unlink $cmd after exit via END block. - The tests don't function well if kern.geom.debugflags != 0. Save debugflags, then restore them at the end of the test. MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=319806
* Don't explicitly get the class to PART in gctl_test_helper.cEnji Cooper2017-06-102-34/+33
| | | | | | | | | | | | This will allow the tool to be used with arbitrary geom(4) classes, like GEOM. Specify class=PART explicitly in the tester to keep existing behavior. MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=319800
* Make the test to leave one connection on the incomplete queueGleb Smirnoff2017-06-081-0/+14
| | | | | | | before exiting. This examines some race conditions in kernel. Notes: svn path=/head/; revision=319684
* Improve this unit test: make sure that the accept filter actually works.Gleb Smirnoff2017-06-081-7/+38
| | | | | | | | | | Before this test just checked scenario of setting and removing the accept filter at different states of the socket. Now it also checks that accept filter works: we connect to the server, and then check that we can't accept, then we send 1 byte of data and check again. Notes: svn path=/head/; revision=319683
* Use calloc instead of malloc + memsetEnji Cooper2017-05-271-2/+1
| | | | | | | | MFC after: 3 days Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=319015
* 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