summaryrefslogtreecommitdiffstats
path: root/tools/regression
Commit message (Collapse)AuthorAgeFilesLines
* wordexp(): Fix syntax validation for backslashes in single-quotes.jilles2013-07-231-0/+12
|
* Fix several warnings.kib2013-07-211-8/+10
| | | | | | | | Fix crash in aio_pty_cleanup() by initializing the pointer before dereferencing. Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Include stdint.h when use intmax_t.kevlo2013-07-181-1/+1
| | | | Reported by: bde
* Replace PRId64 with "jd" in a printf call. Cast the corresponding value tokevlo2013-07-181-1/+1
| | | | | | intmax_t, because the original type is off_t. Reported by: bde
* Add missing headers.kevlo2013-07-172-0/+3
|
* Use PRId64 instead of %gd to print an int64_t.kevlo2013-07-171-1/+2
|
* Need to define NO_MAN here.kevlo2013-07-161-0/+1
|
* Use MAN= instead of NO_MAN=kevlo2013-07-161-1/+1
| | | | | For some reason it still tries to install a priv.1 when using NO_MAN, even though there isn't one yet.
* Add missing header needed by sleep(3).kevlo2013-07-161-0/+1
|
* sh: Do not read from stdin if an error occurs during -i -c cmd.jilles2013-07-121-0/+3
| | | | | | | | | | | | Although using -i with -c does not seem very useful, it seems inappropriate to read commands from the terminal in this case. Side effect: if the -s -c extension is used and the -s option is turned off using 'set +s' during the interactive part, the shell now exits after an error or interrupt. Note that POSIX only specifies -s as option to sh, not to set. See also Austin Group issue #718.
* Restore "all rights reserved" (spelled correctly). This was actually part ↵eadler2013-06-178-0/+8
| | | | | | of the standard text of the license which I did not realize prior. Approved by: bushman
* Remove lines declaring "All rights reserved" or similar comments: theyeadler2013-06-169-9/+0
| | | | | | are not true as the files are actually under the BSD-2 license Approved by: bushman
* sh: Add tests for 'local -' (save shell options).jilles2013-06-152-0/+43
|
* Fix some bugs in the complex trig tests so that they test both doubledas2013-06-101-33/+68
| | | | and float precision properly.
* Add testing utility for behavior of atomic ops.ed2013-06-082-0/+135
| | | | | | | This small utility performs a sequence of atomic operations with random parameters on an atomic variable. For every type, we also create 16 variables, to ensure that we test the correctness at different alignments.
* sh: Return status 127 for unknown jobs in wait builtin.jilles2013-06-052-0/+8
| | | | | | | | | | This is required by POSIX, at least for pids that are not known child processes. Other problems with job specifications still cause wait to abort with exit status 2. PR: 176916
* sh: Allow multiple operands in wait builtin.jilles2013-06-051-0/+7
| | | | | | | | This is only part of the PR; the behaviour for unknown/invalid pids/jobs remains unchanged (aborts the builtin with status 2). PR: 176916 Submitted by: Vadim Goncharov
* Match the options of the kernel.obrien2013-06-043-17/+54
|
* Add libiconv based versions of *c16*() and *c32*().ed2013-06-032-0/+75
| | | | | | | | | | | | | I initially thought wchar_t was locale independent, but this seems to be only the case on Linux. This means that we cannot depend on the *wc*() routines to implement *c16*() and *c32*(). Instead, use the Citrus libiconv that is part of libc. I'll see if there is anything I can do to make the existing functions somewhat useful in case the system is built without libiconv in the nearby future. If not, I'll simply remove the broken implementations. Reviewed by: jilles, gabor
* Add more tests for log functions. A few are commented out because thedas2013-06-031-1/+114
| | | | | | long double versions don't pass yet. (They are rather nit-picky cases, so there's ongoing discussion with Bruce about whether it is worth the performance cost.)
* Factor out some common code from the libm tests. This is a bit messydas2013-06-0215-628/+412
| | | | | | | | because different tests have different ideas about what it means to be "close enough" to the right answer, depending on the properties of the function being tested. In the process, I fixed some warnings and added a few more 'volatile' hacks, which are sufficient to make all the tests pass at -O2 with clang.
* test: Remove -ntXY and -otXY primaries.jilles2013-05-311-64/+1
| | | | | | | | | | | | | | | This reverts commit r247274. As maintainer of sh, I disapprove of this feature addition. It is too specific and can be done without easily using find(1) or stat(1). I will add some hints to the test(1) man page shortly. In general, FreeBSD sh is not the place to invent new shell language features. This is how it has been maintained and adding features randomly does not work with that. The new syntax (e.g. [ FILE1 -ntca FILE2 ]) looks cryptic to me.
* sh: Add test cases for break outside a loop.jilles2013-05-312-0/+19
| | | | | | In most shells (including our sh), break outside a loop does nothing with status 0, or at least does not abort. Therefore, scripts sometimes (buggily) depend on this.
* Different approach to making all compilers happy.obrien2013-05-311-2/+1
|
* Allow building with clang (which is being really stupid here...).obrien2013-05-311-0/+1
|
* Fix some harmless bugs in a test.das2013-05-301-2/+2
|
* Basic tests for complex inverse trig and hyperbolic functions.das2013-05-302-1/+444
|
* Fix cexp regression tests that have an infinite real part. The signs of thetijl2013-05-281-12/+26
| | | | | | | | result depend on the cosine and sine of the imaginary part. Small values are used in the new tests such that cosine and sine are well defined. Reviewed by: das
* Fix some regressions caused by the switch from gcc to clang. The fixesdas2013-05-271-19/+25
| | | | | | | | | | are workarounds for various symptoms of the problem described in clang bugs 3929, 8100, 8241, 10409, and 12958. The regression tests did their job: they failed, someone brought it up on the mailing lists, and then the issue got ignored for 6 months. Oops. There may still be some regressions for functions we don't have test coverage for yet.
* Add missing #includes, to keep Clang silent.ed2013-05-253-0/+3
|
* Add <uchar.h>.ed2013-05-213-1/+268
| | | | | | | | | | | | The <uchar.h> header, part of C11, adds a small number of utility functions for 16/32-bit "universal" characters, which may or may not be UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight wrappers around wcrtomb() and mbrtowc(). While there, also add (non-yet-standard) _l functions, similar to the ones we already have for the other locale-dependent functions. Reviewed by: theraven
* popen(): Add 'e' mode character to set close-on-exec on the new fd.jilles2013-05-201-4/+4
| | | | | | | | | | | | | | If 'e' is used, the kernel must support the recently added pipe2() system call. The use of pipe2() with O_CLOEXEC also fixes race conditions between concurrent popen() calls from different threads, even if the close-on-exec flag on the fd of the returned FILE is later cleared (because popen() closes all file descriptors from earlier popen() calls in the child process). Therefore, this approach should be used in all cases when pipe2() can be assumed present. The old version of popen() rejects "re" and "we" but treats "r+e" like "r+".
* Add a test program for popen().jilles2013-05-202-1/+228
|
* Tidy up some CVS workarounds.peter2013-05-121-2/+0
|
* Add simple testcases for fcntl(F_DUP2FD_CLOEXEC).jilles2013-05-111-1/+47
|
* Add simple testcases for fcntl(F_DUPFD_CLOEXEC).jilles2013-05-111-1/+23
|
* Add missing argument to fcntl(F_DUPFD) in regression test.jilles2013-05-111-2/+6
|
* Add a few xargs tests related to -0, -n and quoting.stefanf2013-05-0411-1/+71
|
* sh: Remove racy test case for read builtin.jilles2013-05-031-13/+0
| | | | | | | This test case sometimes fails because of an EINTR-related race condition. Fixing this race condition likely requires an extra system call per byte, which would make the read builtin even slower than it already is, or very complicated trickery. Therefore, remove the test case for now.
* sh: Improve error handling in read builtin:jilles2013-05-032-0/+18
| | | | | | | | | | | | * If read -t times out, return status as if interrupted by SIGALRM (formerly 1). * If a trapped signal interrupts read, return status 128+sig (formerly 1). * If [EINTR] occurs but there is no trap, retry the read (for example because of a SIGWINCH in interactive mode). * If a read error occurs, write an error message and return status 2. As before, a variable assignment error returns 2 and discards the remaining data read.
* Style cleanups.pjd2013-04-171-11/+23
|
* - Correct mispellings of the word occurrencegabor2013-04-172-2/+2
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
* sh: Don't modify exit status when break/continue/return passes !.jilles2013-04-122-0/+10
| | | | | | | | This matches what would happen if ! P were to be replaced with if P; then false; else true; fi. Example: f() { ! return 0; }; f
* sh: Add a variation on builtins/eval4.0 where the cmdsubst returns 0.jilles2013-04-061-0/+5
|
* wordexp(): Remove wrong IFS usage.jilles2013-04-011-0/+19
| | | | | | | | | | | Words in shell script are separated by spaces or tabs independent of the value of IFS. The value of IFS is only relevant for the result of substitutions. Therefore, there should be a space between 'wordexp' and the words to be expanded, not an IFS character. Paranoia might dictate that the shell ignore IFS from the environment (even though our sh currently uses it), so do not depend on it in the new test case.
* Update regression tests after adding chflagsat(2).pjd2013-03-213-7/+23
| | | | Sponsored by: The FreeBSD Foundation
* - Make 'flags' argument to chflags(2), fchflags(2) and lchflags(2) of typepjd2013-03-211-1/+2
| | | | | | | | | | | u_long. Before this change it was of type int for syscalls, but prototypes in sys/stat.h and documentation for chflags(2) and fchflags(2) (but not for lchflags(2)) stated that it was u_long. Now some related functions use u_long type for flags (strtofflags(3), fflagstostr(3)). - Make path argument of type 'const char *' for consistency. Discussed on: arch Sponsored by: The FreeBSD Foundation
* Update the tests now that absence of the O_APPEND flag requires CAP_SEEKpjd2013-03-161-13/+46
| | | | | | capability. Add some more tests. Sponsored by: The FreeBSD Foundation
* The mode argument for open(2)/openat(2) only makes sense if the O_CREAT flagpjd2013-03-161-6/+6
| | | | | | was given. Sponsored by: The FreeBSD Foundation
* sh: Recognize "--" and explicitly reject options in wait builtin.jilles2013-03-152-0/+7
| | | | | | If syntactically invalid job identifiers are to be taken as jobs that exited with status 127, this should not apply to options, so that we can add options later if need be.
OpenPOWER on IntegriCloud