summaryrefslogtreecommitdiffstats
path: root/tools/regression
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* Make file name generation to work with both new and old versions of OpenSSL.pjd2013-03-151-2/+2
| | | | Sponsored by: The FreeBSD Foundation
* sh: When executing a trap, keep exit status along with evalskip.jilles2013-03-031-0/+10
| | | | | | | This ensures 'return' in a trap returns the correct status to the caller. If evalskip is not set or if it is overridden by a previous evalskip, keep the old behaviour of restoring the exit status from before the trap.
* If all ioctls are allowed, cap_ioctls_get(2) will return CAP_IOCTLS_ALL.pjd2013-03-021-2/+2
| | | | Update regression tests.
* Add support for bindat(2) and connectat(2).pjd2013-03-022-1/+45
| | | | Sponsored by: The FreeBSD Foundation
* Add regression tests for the new Capsicum system calls.pjd2013-03-026-0/+1387
| | | | Sponsored by: The FreeBSD Foundation
* Update existing regression tests after Capsicum overhaul.pjd2013-03-022-101/+349
|
* Add an implementation of open_memstream() and open_wmemstream(). Thesejhb2013-02-275-1/+429
| | | | | | | | | routines provide write-only stdio FILE objects that store their data in a dynamically allocated buffer. They are a string builder interface somewhat akin to a completely dynamic sbuf. Reviewed by: bde, jilles (earlier versions) MFC after: 1 month
* Enhance test(1) by adding provision to compare any combination of thepeterj2013-02-251-1/+64
| | | | | | | | | access, birth, change and modify times of two files, instead of only being able to compare modify times. The builtin test in sh(1) will automagically acquire the same expansion. Approved by: grog MFC after: 2 weeks
* sh: If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.jilles2013-02-232-0/+24
|
* sh: Test that the exit status is 1 if read encounters EOF.jilles2013-02-231-0/+5
|
* Major update for unix_cmsg from Andrey Simonenko.pluknet2013-02-113-1249/+1652
| | | | | | | | | | | | | | | | | | Quoting the submitter: - Added tests for SCM_BINTIME, LOCAL_PEERCRED, cmsghdr.cmsg_len - Code that checks correctness of groups was corrected (getgroups(2) change) - unix_cmsg.c was completely redesigned and simplified - Use less timeout value in unix_cmsg.c for faster work - Added support for not sending data in a message, not sending data and data array associated with a cmsghdr structure in a message - Existent tests were improved - unix_cmsg.t was redesigned and simplified Correctness of unix_cmsg verified on 7.1-STABLE, 9.1-STABLE and 10-CURRENT. PR: bin/131567 Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> MFC after: 2 weeks
* - Fix more style(9)-related issues (copyright header, spaces after functiongahr2013-02-011-71/+71
| | | | | | | | | names, unnecessary casts) - Change type of boolean variable from char to bool Suggested by: jhb, zont, jmallett Reviewed by: cognet Approved by: cognet
* - Remove underscores from the internal structure name, as it doesn't collidegahr2013-01-311-27/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with the user's namespace. - Correct size and position variables type from long to size_t. - Do not set errno to ENOMEM on malloc failure, as malloc already does so. - Implement the concept of "buffer data length", which mandates what SEEK_END refers to and the allowed extent for a read. - Use NULL as read-callback if the buffer is opened in write-only mode. Conversely, use NULL as write-callback when opened in read-only mode. - Implement the handling of the ``b'' character in the mode argument. A binary buffer differs from a text buffer (default mode if ``b'' is omitted) in that NULL bytes are never appended to writes and that the "buffer data length" equals to the size of the buffer. - Remove shall from the man page. Use indicative instead. Also, specify that the ``b'' flag does not conform with POSIX but is supported by glibc. - Update the regression test so that the ``b'' functionality and the "buffer data length" concepts are tested. - Minor style(9) corrections. Suggested by: jilles Reviewed by: cognet Approved by: cognet
* Add fmemopen(3), an interface to get a FILE * from a buffer in memory, alonggahr2013-01-302-0/+153
| | | | | | | | with the respective regression test. See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html Reviewed by: cognet Approved by: cognet
* sh: Pass $? to command substitution containing compound/multiple commands.jilles2013-01-141-0/+5
| | | | | Example: false; echo $(echo $?; :)
* sh: Add testcase that $? is preserved into a simple command substitution.jilles2013-01-131-0/+5
| | | | | The test builtins/trap6.0 already uses this but having it separate eases diagnosis if this would break.
* sh: Add some testcases related to subshells.jilles2013-01-135-0/+25
| | | | | These failed in earlier attempts to execute more subshells without forking. The patches are uncommitted.
* sh: Fix crash when parsing '{ } &'.jilles2013-01-131-0/+7
| | | | MFC after: 1 week
* sh: Don't lose $? when backquoted command ends with semicolon or newline.jilles2013-01-132-0/+10
| | | | | | | | | An empty simple command was added and overwrote the exit status with 0. This affects `...` but not $(...). Example: v=`false;`; echo $?
* Add an additional regression tests for other cases to ensure these do not ↵eadler2012-12-181-0/+3
| | | | get fixed by accident.
* POSIX requires that non-existent or null arguments be treated as if aeadler2012-12-182-1/+3
| | | | | | | | | | | | | zero argument were supplied. Add a regression test to catch this case as well. PR: bin/174521 Submitted by: Daniel Shahaf <danielsh@elego.de> (pr) Submitted by: Mark Johnston <markjdb@gmail.com> (initial patch) Reviewed by: jilles Approved by: cperciva (implicit) MFC after: 3 weeks
* sh: Detect and flag write errors on stdout in builtins.jilles2012-12-121-0/+3
| | | | | | | If there is a write error on stdout, a message will be printed (to stderr) and the exit status will be changed to 2 if it would have been 0 or 1. PR: bin/158206
* libc: Add a missing header to a test program.jilles2012-12-081-0/+1
| | | | Usage of dup(), mkstemp() and unlink() needs <unistd.h>.
* Non-void function should return a value.emaste2012-11-201-1/+1
| | | | Found by: clang
OpenPOWER on IntegriCloud