summaryrefslogtreecommitdiff
path: root/tools/test
Commit message (Collapse)AuthorAgeFilesLines
* Provide userland notification of gpio pin changes ("userland gpio interrupts").Ian Lepore2020-12-123-0/+655
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an import of the Google Summer of Code 2018 project completed by Christian Kramer (and, sadly, ignored by us for two years now). The goals stated for that project were: FreeBSD already has support for interrupts implemented in the GPIO controller drivers of several SoCs, but there are no interfaces to take advantage of them out of user space yet. The goal of this work is to implement such an interface by providing descriptors which integrate with the common I/O system calls and multiplexing mechanisms. The initial imported code supports the following functionality: - A kernel driver that provides an interface to the user space; the existing gpioc(4) driver was enhanced with this functionality. - Implement support for the most common I/O system calls / multiplexing mechanisms: - read() Places the pin number on which the interrupt occurred in the buffer. Blocking and non-blocking behaviour supported. - poll()/select() - kqueue() - signal driven I/O. Posting SIGIO when the O_ASYNC was set. - Many-to-many relationship between pins and file descriptors. - A file descriptor can monitor several GPIO pins. - A GPIO pin can be monitored by multiple file descriptors. - Integration with gpioctl and libgpio. I added some fixes (mostly to locking) and feature enhancements on top of the original gsoc code. The feature ehancements allow the user to choose between detailed and summary event reporting. Detailed reporting provides a record describing each pin change event. Summary reporting provides the time of the first and last change of each pin, and a count of how many times it changed state since the last read(2) call. Another enhancement allows the recording of multiple state change events on multiple pins between each call to read(2) (the original code would track only a single event at a time). The phabricator review for these changes timed out without approval, but I cite it below anyway, because the review contains a series of diffs that show how I evolved the code from its original state in Christian's github repo for the gsoc project to what is being commited here. (In effect, the phab review extends the VC history back to the original code.) Submitted by: Christian Kramer Obtained from: https://github.com/ckraemer/freebsd/tree/gsoc2018 Differential Revision: https://reviews.freebsd.org/D27398 Notes: svn path=/head/; revision=368585
* Do a sweep and remove most WARNS=6 settingsKyle Evans2020-10-016-7/+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
* Add a makefile to build and run the tests for the bsnmp library.Hartmut Brandt2020-04-011-0/+19
| | | | | | | | This is not automatically built or run but must explicitly be built with 'make' and run with 'make run'. Notes: svn path=/head/; revision=359514
* Remove libthr, csu, libthread_db and testfloat sparc64 specific directories.Warner Losh2020-02-2714-3029/+0
| | | | | | | Submitted by: kib@ (libthr) Notes: svn path=/head/; revision=358364
* Save the last callout function executed on each CPUEric van Gyzen2019-07-032-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Save the last callout function pointer (and its argument) executed on each CPU for inspection by a debugger. Add a ddb `show callout_last` command to show these pointers. Add a kernel module that I used for testing that command. Relocate `ce_migration_cpu` to reduce padding and therefore preserve the size of `struct callout_cpu` (320 bytes on amd64) despite the added members. This should help diagnose reference-after-free bugs where the callout's mutex has already been freed when `softclock_call_cc` tries to unlock it. You might hope that the pointer would still be available, but it isn't. The argument to that function is on the stack (because `softclock_call_cc` uses it later), and that might be enough in some cases, but even then, it's very laborious. A pointer to the callout is saved right before these newly added fields, but that callout might have been freed. We still have the pointer to its associated mutex, and the name within might be enough, but it might also have been freed. Reviewed by: markj jhb MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20794 Notes: svn path=/head/; revision=349677
* Remove apparently unused 0-byte files that cause grief on WindowsEd Maste2018-11-038-0/+0
| | | | | | | | | | | | | | | r235274 added a sort regression test (it operates by comparing output against GNU sort). The commit included a number of 0-byte files, one of which ends in a trailing . which reportedly breaks svn/git checkouts on Windows. It appears these were added accidentally, so just remove them. PR: 232479 MFC after: 1 month Notes: svn path=/head/; revision=340095
* Add a test for vm86(2), simple to use and diagnose.Konstantin Belousov2018-05-123-0/+171
| | | | | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=333534
* Add the test program to examine CPU behaviour for pop ss issueKonstantin Belousov2018-05-101-0/+183
| | | | | | | | | | | CVE-2018-8897. Requested by: emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Notes: svn path=/head/; revision=333460
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | 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
* Update scescx test to print syscall number and arguments.Konstantin Belousov2017-06-121-0/+21
| | | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Notes: svn path=/head/; revision=319876
* Decode recently added flags.Konstantin Belousov2017-06-121-0/+5
| | | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 3 days Notes: svn path=/head/; revision=319869
* Eliminate a "format string is not a string literal" warning.Ian Lepore2017-03-211-1/+1
| | | | Notes: svn path=/head/; revision=315692
* Fix spelling and grammer in tools/test/README.Eric van Gyzen2015-10-281-3/+3
| | | | | | | Reviewed by: gnn Notes: svn path=/head/; revision=290112
* Add a test for the listen queue using two test programs,George V. Neville-Neil2015-10-283-0/+201
| | | | | | | | | | | | | | listen, and connect. The listen program is a simple server that accepts and closes sockets, until a fixed limit, then sets the listen queue to 0 and counts how many remaining connections it processes. The connect program repeatedly opens connections and closes them serving as the driver for the listen program. Sponsored by: Limelight Networks Notes: svn path=/head/; revision=290089
* Update the README to describe all the current tests in this directory.George V. Neville-Neil2015-10-281-3/+13
| | | | Notes: svn path=/head/; revision=290088
* Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSDEnji Cooper2015-10-172-163/+0
| | | | | | | | | | | | | | | 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. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289441
* Remove the old DTrace test suite makefile - it was somewhat primitive andMark Johnston2015-02-282-395/+0
| | | | | | | | | | | mostly unmaintained, and it has been superseded by the infrastructure added in r279418. Reviewed by: ngie Sponsored by: EMC / Isilon Storage Divison Notes: svn path=/head/; revision=279419
* Add a ${CP} alias for copying files in the build.Will Andrews2015-01-161-1/+1
| | | | | | | | | | | | | | | | | Some users build FreeBSD as non-root in Perforce workspaces. By default, Perforce sets files read-only unless they're explicitly being edited. As a result, the -f argument must be used to cp in order to override the read-only flag when copying source files to object directories. Bare use of 'cp' should be avoided in the future. Update all current users of 'cp' in the src tree. Reviewed by: emaste MFC after: 1 week Sponsored by: Spectra Logic Notes: svn path=/head/; revision=277273
* Ignore a test program which doesn't compile at the moment. It will beMark Johnston2014-09-211-1/+2
| | | | | | | addresed properly when integrating the DTrace tests with Kyua. Notes: svn path=/head/; revision=271938
* Use the right length.Xin LI2014-07-251-1/+1
| | | | | | | | Submitted by: Sascha Wildner MFC after: 2 weeks Notes: svn path=/head/; revision=269097
* Avoid hardcoding "gcc" in the DTrace tests.Pedro F. Giffuni2014-07-111-1/+1
| | | | | | | | | | | | At least one test doesn't work yet without gcc, however gcc is not always available in base. Using the environment compiler is more trustable and will also work with an external compiler. Reviewed by: markj MFC after: 3 days Notes: svn path=/head/; revision=268538
* Fix tst.ZeroModuleProbes.d.ksh, which was incorrectly modified in r178534.Mark Johnston2014-05-191-1/+0
| | | | | | | | | Since "BEGIN" is not the name of a module, the test would just hang. MFC after: 3 days Notes: svn path=/head/; revision=266454
* NO_MAN= has been deprecated in favor of MAN= for some time, go aheadWarner Losh2014-04-1310-10/+10
| | | | | | | | | 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. Notes: svn path=/head/; revision=264400
* Silence an unnecessary warning.George V. Neville-Neil2014-04-011-0/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=264016
* Some DTrace tests (mostly in the pid provider directory) make use ofMark Johnston2013-12-311-2/+11
| | | | | | | | | | executable ksh scripts. These are currently not copied into the test directory the way that compiled executables are, so the tests which make use of them cannot work. This changes the test Makefile to copy the scripts into the test directory. Notes: svn path=/head/; revision=260133
* Enable some previously-disabled DTrace tests for umod, ufunc and usym. TheyMark Johnston2013-12-041-5/+0
| | | | | | | | | expect the installed ksh binary to be named "ksh", which is not the case when it's installed on FreeBSD via the shells/ksh93 port. Allow for it to be "ksh93" as well so that the tests can actually pass. Notes: svn path=/head/; revision=258903
* Add simple test for the read/write/lseek on posix shm filedescriptor.Konstantin Belousov2013-08-211-6/+21
| | | | | | | | Tested by: pho Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=254604
* This test is working now, so remove it from NOTWORK.Mark Johnston2013-06-021-1/+0
| | | | Notes: svn path=/head/; revision=251239
* As python3 does not have raw_input(), convert it to input() when weHiren Panchasara2013-05-131-1/+5
| | | | | | | | | | | are using python3. PR: 177214 Reviewed by: gnn Approved by: sbruno (mentor) Notes: svn path=/head/; revision=250612
* fix this script so we don't expand the second $FreeBSD since svn thinksJohn-Mark Gurney2013-02-271-1/+1
| | | | | | | the $ in $1 ends the keyword, and expands it... Notes: svn path=/head/; revision=247414
* Rework the handling of the children for the pthread_vfork_test. TheKonstantin Belousov2013-01-301-7/+25
| | | | | | | | | | | | trivial handler for SIGCHLD is installed, and SIGCHLD is blocked, to not abandon our zombies to init(8). This way, the zombies are around slightly longer, allowing to actually exercise the logic for p_pwait use by the test. MFC after: 1 week Notes: svn path=/head/; revision=246119
* A number of places in the source tree still reference cuad.* afterEitan Adler2012-12-082-3/+3
| | | | | | | | | | | | | | sio(4) was deprecated by uart(4). s/cuad/cuau/g/ PR: docs/171533 Reviewed by: imp Approved by: cperciva (implicit) MFC after: 3 weeks Notes: svn path=/head/; revision=244040
* Covert to python 3Eitan Adler2012-10-221-4/+4
| | | | | | | | Approved by: cperciva MFC after: 3 days Notes: svn path=/head/; revision=241826
* Add SOFT as a possible section to exclude from counter list.Fabien Thomas2012-09-101-1/+1
| | | | Notes: svn path=/head/; revision=240323
* Add a reasonable error message telling the caller to specify a programGeorge V. Neville-Neil2012-09-041-0/+4
| | | | | | | | to be executed under hwpmc. If there is no program to run then exit. Notes: svn path=/head/; revision=240101
* Add a test program, written by Stephan Uphoff, which demonstrates theKonstantin Belousov2012-07-112-0/+181
| | | | | | | | | | deadlock due to i/o performed over the buffers backed by file mappings. MFC after: 2 weeks Approved by: ups Notes: svn path=/head/; revision=238374
* Add a test for number of CPUs configured/online.Konstantin Belousov2012-06-271-0/+8
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=237661
* - Add regression tests for BSD sortGabor Kovesdan2012-05-11449-0/+2661
| | | | Notes: svn path=/head/; revision=235274
* Use = rather than == for expressions to test(1) builtin(1) in sh(1) toBjoern A. Zeeb2012-03-061-1/+1
| | | | | | | | | | | | | comply with standards. On modern branches there is an undocumented alias (see r219084) but on stable/7 this is still an error. Sponsored by: Cisco Systems, Inc. MFC after: 3 days Notes: svn path=/head/; revision=232609
* Update scripts to work around two sh(1) bugs found in stable/8:Bjoern A. Zeeb2012-02-244-252/+263
| | | | | | | | | | | | | | | | | | 1) _x=$((_x + 1)) does not work while x=$((x + 1)) does. 2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted. Correct typos and improve some details forwarding.sh already had in initiator, esp. related to ipfw accepting if the default is deny. Add an extra stat call to the "delay" function in addition to the touch which together is still a lot faster than sleep 1 but seems to help a lot more to mitigate the unrelated kernel race seen. Sponsored by: Cisco Systems, Inc. Notes: svn path=/head/; revision=232114
* Add regression tests scripts for multi-IP FIBs exercising the send,Bjoern A. Zeeb2012-02-177-0/+4697
| | | | | | | | | | | | | | | | | | receive and forward path tagging packets with both the ifconfig fib option or using ipfw, running ICMP6, TCP/v6 and UDP/v6 tests and testing both setfib(2) as well as the SO_SETFIB socket option. At 16 FIBs a total of over 64k return codes/replies/stati are checked, sometimes multiple times (in different ways, e.g. the reflected request as well as ipfw counter values). The scripts need two or three machines to run and are thus not added to the tools/regression framework but only to tools/test. Sponsored by: Cisco Systems, Inc. Notes: svn path=/head/; revision=231858
* Remove UCP from the list of countersGeorge V. Neville-Neil2012-02-141-1/+1
| | | | Notes: svn path=/head/; revision=231699
* Add options for program (-p) and to turn off waiting (-w) which is nowGeorge V. Neville-Neil2012-02-141-5/+20
| | | | | | | | | | | | on by default. The default is to wait after each counter is tested. Since the prompt would go to stdout you won't see it if you're redirecting the output of the executed sub-program to /dev/null, so just press return to continue or Ctrl-D to stop. Notes: svn path=/head/; revision=231698
* Add a rudimentary test to run through all the available counters on aGeorge V. Neville-Neil2012-02-141-0/+79
| | | | | | | | | | | system and then execute a program with pmcstat in counting mode. The program will verify that all counters fire and that the code neither panics the system nor locks it up. This should be considered a first pass conformance test for new sets of counters being added to hwpmc(4). Notes: svn path=/head/; revision=231634
* Add a test program for recently added ptrace(2) interfaces.Konstantin Belousov2012-02-102-0/+413
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=231443
* Spelling fixes for tools/Ulrich Spörlein2011-12-304-6/+6
| | | | | | | Add some $FreeBSD$ tags so svn will allow the commit. Notes: svn path=/head/; revision=228975
* Fix warnings and style(9) issues.Rebecca Cran2011-03-112-14/+16
| | | | | | | | | Set WARNS to 6. MFC after: 1 week Notes: svn path=/head/; revision=219511
* - Add two more iconv-related files, which were left out from previous commitGabor Kovesdan2011-02-251-0/+70
| | | | | | | Approved by: delphij (mentor) Notes: svn path=/head/; revision=219020
* Add the BSD-licensed Citrus iconv to the base system with default offGabor Kovesdan2011-02-25257-0/+1417385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setting. It can be built by setting the WITH_ICONV knob. While this knob is unset, the library part, the binaries, the header file and the metadata files will not be built or installed so it makes no impact on the system if left turned off. This work is based on the iconv implementation in NetBSD but a great number of improvements and feature additions have been included: - Some utilities have been added. There is a conversion table generator, which can compare conversion tables to reference data generated by GNU libiconv. This helps ensuring conversion compatibility. - UTF-16 surrogate support and some endianness issues have been fixed. - The rather chaotic Makefiles to build metadata have been refactored and cleaned up, now it is easy to read and it is also easier to add support for new encodings. - A bunch of new encodings and encoding aliases have been added. - Support for 1->2, 1->3 and 1->4 mappings, which is needed for transliterating with flying accents as GNU does, like "u. - Lots of warnings have been fixed, the major part of the code is now WARNS=6 clean. - New section 1 and section 5 manual pages have been added. - Some GNU-specific calls have been implemented: iconvlist(), iconvctl(), iconv_canonicalize(), iconv_open_into() - Support for GNU's //IGNORE suffix has been added. - The "-" argument for stdin is now recognized in iconv(1) as per POSIX. - The Big5 conversion module has been fixed. - The iconv.h header files is supposed to be compatible with the GNU version, i.e. sources should build with base iconv.h and GNU libiconv. It also includes a macro magic to deal with the char ** and const char ** incompatibility. - GNU compatibility: "" or "char" means the current local encoding in use - Various cleanups and style(9) fixes. Approved by: delphij (mentor) Obtained from: The NetBSD Project Sponsored by: Google Summer of Code 2009 Notes: svn path=/head/; revision=219019
* Update for the new tests.Rui Paulo2010-08-211-263/+199
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211567