summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Insulate the nanobsd build from the current system by opting out ofimp2010-11-101-0/+2
| | | | | | the SRCCONF processing. Noted by: gcopper@
* Build make.conf when the world is not selected to build, but theimp2010-11-101-0/+3
| | | | | | | kernel is. PR: 151696 Submitted by: lev@
* Document NANO_CFGDIR and NANO_DATADIRimp2010-11-101-0/+6
| | | | Submitted by: n_hibma@
* Hide 460.chkportsum in MK_PKGTOOLS != no case.delphij2010-11-091-0/+1
| | | | | Submitted by: Alex Kozlov <spam rm-rf kiev ua> MFC after: 2 weeks
* test: Move tests to tools/regression/bin/test.jilles2010-11-084-1/+170
| | | | | | | | | Convert the tests to the perl prove format. Remove obsolete TEST.README (results of an old TEST.sh for some old Unices) and TEST.csh (old tests without correct values, far less complete than TEST.sh). MFC after: 1 week
* - Set -x flag when executing customisation scripts to aid in debugging them.n_hibma2010-11-071-10/+31
| | | | | | | | | | | - Use KERNCONFDIR with KERNCONF instead of copying the kernel config into the source tree so included kernel configs work. - Put more stuff in the _.bk/_.ik log file, not just make statements. - Add the kernel config name to the pprint during kernel installation. - Add NANO_MODULES providing a list of modules to build and install. Reviewed by: imp MFC after: 2 weeks
* Remove useless comment.trasz2010-11-071-1/+0
|
* sh: Add simple tests for printf.jilles2010-11-052-0/+6
| | | | | These are not meant as a replacement for tools/regression/usr.bin/printf/* but to detect errors specific to making it a shell builtin.
* sh: Fix some issues with aliases and case, by importing dash checkkwd code.jilles2010-11-021-0/+6
| | | | | | | | | | | This moves the function of the noaliases variable into the checkkwd variable. This way it is properly reset on errors and aliases can be used normally in the commands for each case (the case labels recognize the keyword esac but no aliases). The new code is clearer as well. Obtained from: dash
* sh: Detect various additional errors in the parser.jilles2010-10-291-0/+4
| | | | | | | | | | | | | Apart from detecting breakage earlier or at all, this also fixes a segfault in the testsuite. The "handling" of the breakage left an invalid internal representation in some cases. Examples: echo a; do echo b echo `) echo a` echo `date; do do do` Exp-run done by: pav (with some other sh(1) changes)
* sh: Fix some issues with CTL* bytes and ${var#pat}.jilles2010-10-291-0/+22
| | | | | | | | | | | | | | subevalvar() incorrectly assumed that CTLESC bytes were present iff the expansion was quoted. However, they are present iff various processing such as word splitting is to be done later on. Example: v=@$e@$e@$e@ y="${v##*"$e"}" echo "$y" failed if $e contained the magic CTLESC byte. Exp-run done by: pav (with some other sh(1) changes)
* sh: Do IFS splitting on word in ${v+word} and ${v-word}.jilles2010-10-291-0/+34
| | | | | | | | | | | | | | | | | The code is inspired by NetBSD sh somewhat, but different because we preserve the old Almquist/Bourne/Korn ability to have an unquoted part in a quoted ${v+word}. For example, "${v-"*"}" expands to $v as a single field if v is set, but generates filenames otherwise. Note that this is the only place where we split text literally from the script (the similar ${v=word} assigns to v and then expands $v). The parser must now add additional markers to allow the expansion code to know whether arbitrary characters in substitutions are quoted. Example: for i in ${$+a b c}; do echo $i; done Exp-run done by: pav (with some other sh(1) changes)
* sh: Only accept a '}' inside ${v+-=?...} if double-quote state matches.jilles2010-10-281-0/+31
| | | | | | | | | | | | | If double-quote state does not match, treat the '}' literally. This ensures double-quote state remains the same before and after a ${v+-=?...} which helps with expand.c. It makes things like ${foo+"\${bar}"} which I have seen in the wild work as expected. Exp-run done by: pav (with some other sh(1) changes)
* sh: Make double-quotes quote a '}' inside ${v#...} and ${v%...}.jilles2010-10-281-0/+28
| | | | | Exp-run done by: pav (with some other sh(1) changes) PR: bin/57554
* sh: Do not allow overriding a special builtin with a function.jilles2010-10-241-0/+7
| | | | | | | | | | | | | | | | | This is a syntax error. POSIX does not say explicitly whether defining a function with the same name as a special builtin is allowed, but it does say that it is impossible to call such a function. A special builtin can still be overridden with an alias. This commit is part of a set of changes that will ensure that when something looks like a special builtin to the parser, it is one. (Not the other way around, as it remains possible to call a special builtin named by a variable or other substitution.) Exp-run done by: pav (with some other sh(1) changes)
* sh: Make sure defined functions can actually be called.jilles2010-10-241-0/+25
| | | | | | | | | | | | | | | | | Add some conservative checks on function names: - Disallow expansions or quoting characters; these can only be called via strange control characters - Disallow '/'; these functions cannot be called anyway, as exec.c assumes they are pathnames - Make the CTL* bytes work properly in function names. These are syntax errors. POSIX does not require us to support more than names (letters, digits and underscores, not starting with a digit), but I do not want to restrict it that much at this time. Exp-run done by: pav (with some other sh(1) changes)
* sh: Check whether dup2 was successful for >&FD and <&FD.jilles2010-10-241-0/+4
| | | | | | A failure (usually caused by FD not being open) is a redirection error. Exp-run done by: pav (with some other sh(1) changes)
* sh: Add a test trying to close a descriptor that is not open.jilles2010-10-241-0/+3
| | | | | In stable/8 and older, this fails. Some of the redirection changes in head have fixed it.
* sh: Change ! within a pipeline to start a new pipeline instead.jilles2010-10-241-0/+3
| | | | | | | | | | | | | | This is how ksh93 treats ! within a pipeline and makes the ! in a | ! b | c negate the exit status of the pipeline, as if it were a | { ! b | c; } Side effect: something like f() ! a is now a syntax error, because a function definition takes a command, not a pipeline. Exp-run done by: pav (with some other sh(1) changes)
* sh: Add some testcases for alias expansion.jilles2010-10-242-0/+11
|
* Add microbenchmark for create/unlink of a zero-byte file.rwatson2010-10-241-3/+32
| | | | | Sponsored by: Google, Inc. MFC after: 2 weeks
* Validate syscall_timing test names before starting to provide earlierrwatson2010-10-221-12/+68
| | | | | | | | | | | | | | feedback regarding user error. Provide default loop and timing settings. Add a new test that just times pread() without the open()/close(). Mark tests requiring a path argument so we can provide better feedback to the user than EFAULT on (null). Sponsored by: Google, Inc. MFC after: 2 weeks
* Universally use uintmax_t in syscall_timing; rearrange arithmetic torwatson2010-10-211-64/+65
| | | | | | | | suffer fewer rounding errors with smaller numbers; fix argc validation so multiple tests run on a single command line. Sponsored by: Google, Inc. MFC after: 2 weeks
* Add Cambridge/Google tag since the copyright has been updated.rwatson2010-10-211-0/+3
| | | | MFC after: 2 weeks
* Further syscall_timing improvements: allow an arbitrary "path" stringrwatson2010-10-211-45/+41
| | | | | | | | argument to be passed on the command line, allowing file-related tests to be pointed at wherever desired. Sponsored by: Google, Inc. MFC after: 2 weeks
* Fix bug in recent syscall_timing change: measure the number of iterationsrwatson2010-10-211-3/+4
| | | | | | | | each loop, rather than once up front. The distinction is unimportant when doing a fix iteration count, but when using a timer, it should vary. Sponsored by: Google, Inc. MFC after: 2 weeks
* Further enhancements to syscall_timing:rwatson2010-10-211-79/+258
| | | | | | | | | | | | - Use getopt rather than hand-parsed arguments - Allow iterations to be specified and/or a new number of seconds bound on the number of iterations - Fix printout of timer resolution - Add new tests, such as TCP and UDP socket creation, and open/read/close of /dev/zero and /dev/null. Sponsored by: Google, Inc. MFC after: 2 weeks
* Improve the structure and implementation of the syscall_timingrwatson2010-10-211-106/+374
| | | | | | | | | | | | | | | | microbenchmark suite: - Use common benchmark_start/benchmark_stop routines to simplify individual benchmarks. - Add a central table of tests with names, where new tests can be hooked in easily. - Add new benchmarks for dup, shm_open, shm_open + fstat, fork, vfork, vfork + exec, chroot, setuid. - Accept a number of loops, not just a number of iterations. - Report results more usefully in a table. Sponsored by: Google, Inc. MFC after: 2 weeks
* sh: Allow running 'prove' from tools/regression/bin/sh againjilles2010-10-151-5/+1
| | | | | without needing to set special environment variables, testing the 'sh' from PATH.
* Embellish this testcase a little bit to be more clear what the output isobrien2010-10-142-0/+18
| | | | | | and why. The first case is correct usage which has but one correct output. The 2nd and 3rd cases are incorrect usage in which the exact output is not standardized and various shells give various allowable output.
* Do not assume in growstackstr() that a "precious" character will beobrien2010-10-131-0/+15
| | | | | | | | | | | | | | | | immediately written into the stack after the call. Instead let the caller manage the "space left". Previously, growstackstr()'s assumption causes problems with STACKSTRNUL() where we want to be able to turn a stack into a C string, and later pretend the NUL is not there. This fixes a bug in STACKSTRNUL() (that grew the stack) where: 1. STADJUST() called after a STACKSTRNUL() results in an improper adjust. This can be seen in ${var%pattern} and ${var%%pattern} evaluation. 2. Memory leak in STPUTC() called after a STACKSTRNUL(). Reviewed by: jilles
* Allow one to regression test 'sh' changes without having to installobrien2010-10-1228-82/+97
| | | | a potentially bad /bin/sh first.
* Correct regression test to not show a false positive when run as root.obrien2010-10-111-6/+9
|
* Don't blow away /bin/rmail symlink if we are keeping mailwrapper.markm2010-10-081-0/+2
| | | | | Mailwrapper can provide a perfectly good rmail with other mailers.
* Clean up tools in tools/tools/netrate.pluknet2010-10-082-6/+11
| | | | | | | | | | | | | - tcpconnect incorrectly uses err() in usage() with errx() semantics [1] That produces dirty error message: tcpconnect: usage: tcpconnect [ip]: Unknown error: 0 - 64-bit aware fixes in printf() usage [2] o netrate/juggle: time_t has arch-dependent size o netrate/tcpconnect: don't assume %ll has always 64bit. PR: 146088 [1], 146086 [2] (modified) Approved by: kib (mentor) MFC after: 1 week
* Add some missing files to optionally delete.netchild2010-10-061-0/+27
| | | | Submitted by: Paul B Mahol <onemda@gmail.com>
* - Add WITH_GPIO entry to src.conf(5) man pagegonzo2010-10-051-0/+2
|
* Change the output of mctest to give a summary of the results insteadgnn2010-10-012-13/+34
| | | | | | | | | | | | of printing a long list. Add a default base port, and default mulitcast address to the runner script. Add support for specifying a different local and remote interface in the runner script. MFC after: 1 week
* - simplify by using one build scriptmr2010-10-018-678/+32
| | | | | | - use label for mounting - use GENERIC kernel - create empty Pkg directory
* tr: Fix '[=]=]' equivalence class.jilles2010-09-293-1/+5
| | | | | | | | | | | A closing bracket immediately after '[=' should not be treated as special. Different from the submitted patch, a string ending with '[=' does not cause access beyond the terminating '\0'. PR: bin/150384 Submitted by: Richard Lowe MFC after: 2 weeks
* Correct message.pjd2010-09-271-1/+1
| | | | | Pointed out by: jhb MFC after: 2 weeks
* Add some regression tests for newly added -J and -j options.pjd2010-09-251-0/+126
| | | | MFC after: 2 weeks
* Don't hardcode md0 in message, use $md instead.pjd2010-09-251-1/+1
| | | | Reported by: Ronald Klop <ronald-freebsd8@klop.yi.org>
* Don't leave zombies behind.trasz2010-09-251-0/+2
|
* Add a shell script to generate a test script for trivial ACLs.trasz2010-09-251-0/+53
|
* Update regression tests after AES-XTS addition.pjd2010-09-257-21/+70
| | | | MFC after: 2 weeks
* - Use $md instead of md0, which fixes tests when md(4) device is alreadypjd2010-09-251-2/+2
| | | | | | | present. - Correct message - we create GPT, not MBR. MFC after: 2 weeks
* Add test cases for stack unwinding.davidxu2010-09-258-0/+265
|
* Make the labels match the device name that's mounted, not just theimp2010-09-221-2/+4
| | | | | | | | | | slice they are on. When NANO_LABEL is not defined, the fstab generates entries that specify /dev/ad0s1a. When NANO_LABEL is defined, it generates /dev/usb/${NANO_LABEL}s1a. The prior code created the file system with a label of ${NANO_LABEL}s1, leading to problems on boot. Pointy hat to: imp@
* tools/umastat: more cleanupsavg2010-09-211-3/+5
| | | | | | PR: misc/146119 Submitted by: pluknet <pluknet@gmail.com> MFC after: 1 week
OpenPOWER on IntegriCloud