Commit Graph

671 Commits

Author SHA1 Message Date
Jilles Tjoelker
eb33e843b8 sh: Fix crash when undefining or redefining a currently executing function.
Add a reference count to function definitions.
Memory may leak if multiple SIGINTs arrive in interactive mode,
this will be fixed later by changing SIGINT handling.

PR:		bin/137640
2009-08-23 21:09:46 +00:00
Bjoern A. Zeeb
e7fba5c772 Start respecting WITHOUT_INET6.
Make regression/priv compile again after the multi-IP jail
changes.  Note that we are still using the legacy jail(2)
rather than the jail_set(2)/jail(3) syscall.
Add an IPv4,  and an IPv6 loopback address in case we compile
with INET6 enabled.

Make the priv_vfs_extattr_system compile on amd64 as well using the
proper length modifier to printf(3) for ssize_t.

Reviewed by:	rwatson
Approved by:	re (kib)
2009-08-13 09:11:47 +00:00
Konstantin Belousov
5abb7fe2e9 Fix syntax error, makefile comments start with #.
Submitted by:	bde
Approved by:	re (kensmith)
2009-07-25 21:07:56 +00:00
Konstantin Belousov
5861f96654 Test suite for the poll(2)/select(2) on fifos, pipes and sockets,
and recorded results for several operating systems.

Submitted by:	bde
Approved by:	re (kensmith)
2009-07-12 12:50:43 +00:00
Brian Somers
58a654f664 Fix some uninitialise variables.
PR:		136383
Submitted by:	Ulrich Spoerlein - uqs at spoerlein dot net
Approved by:	re (kib)
MFC after:	3 weeks
2009-07-08 10:16:16 +00:00
Edward Tomasz Napierala
340263c992 Fix fpathconf(3) on fifos, in effect making ls(1) properly
display '+' on them.  Taken from kern/125613, with cosmetic
changes.

PR:		kern/125613
Submitted by:	Jaakko Heinonen <jh at saunalahti dot fi>
Approved by:	re (kib)
2009-07-02 20:05:21 +00:00
Jilles Tjoelker
886bb28357 Add some tests for r194975 and r194977.
Approved by:	ed (mentor) (implicit)
2009-06-25 17:36:08 +00:00
Jilles Tjoelker
30268dfa3f Designate special builtins as such in command -V and type.
Also document various properties of special builtins that we implement.

Approved by:	ed (mentor) (implicit)
2009-06-24 22:04:04 +00:00
Jilles Tjoelker
97ab37f704 Add test for r190698.
Submitted by:	Eygene Ryabinkin
Approved by:	ed (mentor) (implicit)
2009-06-24 20:22:54 +00:00
Jilles Tjoelker
e2451bddff Add tests for r194774.
Approved by:	ed (mentor) (implicit)
2009-06-23 22:03:56 +00:00
Robert Watson
046a577d69 Up the scale of the SPX loopback check a bit: use much larger data sizes
so that we need to do segmentation.
2009-06-20 18:13:20 +00:00
Jilles Tjoelker
57c21ee73a Add tests for r194406 and r194516.
Approved by:	ed (mentor)
2009-06-19 22:15:59 +00:00
John Baldwin
c4f16b69e1 Add a new 'void closefrom(int lowfd)' system call. When called, it closes
any open file descriptors >= 'lowfd'.  It is largely identical to the same
function on other operating systems such as Solaris, DFly, NetBSD, and
OpenBSD.  One difference from other *BSD is that this closefrom() does not
fail with any errors.  In practice, while the manpages for NetBSD and
OpenBSD claim that they return EINTR, they ignore internal errors from
close() and never return EINTR.  DFly does return EINTR, but for the common
use case (closing fd's prior to execve()), the caller really wants all
fd's closed and returning EINTR just forces callers to call closefrom() in
a loop until it stops failing.

Note that this implementation of closefrom(2) does not make any effort to
resolve userland races with open(2) in other threads.  As such, it is not
multithread safe.

Submitted by:	rwatson (initial version)
Reviewed by:	rwatson
MFC after:	2 weeks
2009-06-15 20:38:55 +00:00
Jilles Tjoelker
1251149b3c Add tests for r194127 and r194128.
Approved by:	ed (mentor)
2009-06-14 16:21:51 +00:00
Dag-Erling Smørgrav
4138849fa7 Check that flopen() can lock against self and that children inherit the lock. 2009-06-06 19:07:15 +00:00
Pawel Jakub Dawidek
bf64a6b6b4 lchflags(2) takes int, not u_long like chflags(2) and fchflags(2).
Strange, isn't it?

Pointed out by:	bde
2009-06-03 09:24:58 +00:00
Stefan Farfeleder
912ee8a8a3 Add tests for r193169. 2009-05-31 17:23:27 +00:00
Zachary Loafman
cc79e34966 Add a regression test for multiple threads of the same process acquiring the same fcntl lock.
Approved by:        dfr (mentor)
2009-05-28 02:39:07 +00:00
Dag-Erling Smørgrav
2234b22628 Increment the counter outside the subshell. 2009-05-27 15:15:58 +00:00
Edwin Groothuis
84ccb25dc7 Add the regression test for bin/date. 2009-05-27 12:31:55 +00:00
Dag-Erling Smørgrav
93f2449bee Add a regression test for kern/21768.
MFC after:	1 week
2009-05-26 20:13:06 +00:00
Brian Somers
258f721bc9 Regression test the 'addr1,+N' feature added in r192732 2009-05-25 06:58:42 +00:00
Edwin Groothuis
a2f237f8b7 Add regression tests for the date(1) + argument for user-defined
format strings.

PR:		bin/127514
Submitted by:	edwin@
MFC after:	1 week
2009-05-20 22:01:43 +00:00
Stefan Farfeleder
c410810eb7 Add a test for r191009. 2009-04-13 19:12:28 +00:00
Edward Tomasz Napierala
00a76e962d Add a few more regression tests for POSIX.1e ACLs. 2009-04-13 13:51:53 +00:00
David Schultz
6685ac34d9 Return -1 instead of 0 upon reaching EOF. This is somewhat ill-advised
because it means getdelim() returns -1 for both error and EOF, and
never returns 0. However, this is what the original GNU	implementation
does, and POSIX inherited the bug.

Reported by:	marcus@
2009-04-06 13:50:04 +00:00
Stefan Farfeleder
acd5c42915 Test the r190298 change. 2009-03-22 23:00:52 +00:00
Stefan Farfeleder
8b1fa08c95 Add a few tests for the read built-in. 2009-03-22 22:14:46 +00:00
Stefan Farfeleder
d956d1eed5 Update test for r190284. 2009-03-22 21:12:00 +00:00
Stefan Farfeleder
2c93c8f251 Update and extend the tests for alias. 2009-03-22 17:22:14 +00:00
Pawel Jakub Dawidek
a71f46d368 Oops. Correct comment in the LICENSE file. 2009-03-14 21:59:12 +00:00
Pawel Jakub Dawidek
2f9e552de1 Regression tests for mac_portacl(4). 2009-03-14 21:54:19 +00:00
Roman Divacky
300d03a832 Switch over to gnu99 compilation on default for userland.
Tested by:	make universe
Tested by:	ports exp build (done by pav)
Reviewed by:	ru
Reviewed by:	silence on arch
Approved by:	ed (mentor)
2009-03-14 17:55:16 +00:00
Robert Watson
76b6a59f9d Rename files that collide on case-insensitive file systems by encoding
colliding upper case letters as the lower case letter with a '_' in
front.

MFC after:	3 days
Discussed with:	ed
Spotted by:	Michael David Crawford <mdc at prgmr.com>
2009-03-10 09:33:22 +00:00
Robert Watson
0ca4746bcb In UNIX domain socket GC regression test, after setting a socket
non-blocking, EINPROGRESS is an acceptable result from connect().
2009-03-08 21:06:02 +00:00
David Schultz
7fb2aa104f Tests for getdelim(). 2009-02-28 06:39:39 +00:00
David Schultz
e2ef8d9b1d Add a file containing tests for simple format specifiers.
Currently it only has tests for a few sign issues with integer
formats, including PR 131880.
2009-02-28 06:37:10 +00:00
David Schultz
f04a5a6c81 Tests for wcscasecmp(), wcsnlen(), and stpncpy(). 2009-02-28 06:34:04 +00:00
Ed Schouten
b3aaa0cc21 Rename all symbols in libmp(3) to mp_*, just like Solaris.
The function pow() in libmp(3) clashes with pow(3) in libm. We could
rename this single function, but we can just take the same approach as
the Solaris folks did, which is to prefix all function names with mp_.

libmp(3) isn't really popular nowadays. I suspect not a single
application in ports depends on it. There's still a chance, so I've
increased the SHLIB_MAJOR and __FreeBSD_version.

Reviewed by:	deischen, rdivacky
2009-02-26 21:43:15 +00:00
Pawel Jakub Dawidek
af30ab766e Add explicit casting in few places.
It is only really necessary for open(2)'s third argument, which is optional and
obtained through stdarg(3). open(2)'s third argument is 32bit and we pass 64
bits. On little endian it works, because we take lower 32 bits, but on big
endian platforms we take upper 32 bits, so we end up with 0.

Reported by:	Milan Čermák <Milan.Cermak@Sun.COM>
2009-02-23 07:33:29 +00:00
Robert Watson
d0e723a10c Add a regresion test to determine whether or not a file descriptor is
allocated in a fork(2)-inheritable way at the beginning or end of an
accept(2) system call.  This test creates a test thread and blocks it
in accept(2), then forks a child process which tests to see if the
next available file descriptor is defined or not (EBADF vs EINVAL for
ftruncate(2)).

This detects a regression introduced during the network stack locking
work, in which a very narrow race during which fork(2) from one
thread during accept(2) in a second thread lead to an extra inherited
file descriptor turned into a very wide race ensuring that a
descriptor was leaked into the child even though it hadn't been
returned.

PR:		kern/130348
2009-02-11 13:44:27 +00:00
David Schultz
acb3b7c668 Test wprintf() in addition to printf(). 2009-01-31 18:32:39 +00:00
David Schultz
d7b27f3d13 Add tests for conj{,f,l}() that I wrote some time ago. These test the
versions in libm, not the gcc builtins.
2009-01-31 18:31:57 +00:00
Pawel Jakub Dawidek
092513dad4 Be more Solaris-friendly.
Submitted by:	Milan Cermak <Milan.Cermak@Sun.COM>
2009-01-16 18:09:49 +00:00
Ed Schouten
af65d772a0 Allow jot(1) regression tests to be checked out on Windows filesystems.
The jot(1) regression tests directory contained two tests named `wx' and
`wX', which doesn't work on case insensitive filesystems. Rename `wX' to
`wX1'.

MFC after:	1 month
2009-01-16 15:47:35 +00:00
Stefan Farfeleder
b0cb038bc5 Update for 185401, errors now go to stderr. 2008-11-28 18:59:04 +00:00
Edward Tomasz Napierala
c55f5be9d1 Add tools-level test for POSIX.1e functionality.
Approved by:	rwatson (mentor)
2008-11-25 18:29:33 +00:00
Pawel Jakub Dawidek
bbc9c92b45 This actually works on Linux, I just had wrong directory permission.
Found by:	trasz
2008-11-24 16:33:23 +00:00
Pawel Jakub Dawidek
6362fd6090 Include TODO messages even if tests succeeds, so we can detect when something
suddenly started to work.
2008-11-24 16:32:39 +00:00
Stefan Farfeleder
a5e27424dd Add a test for r185231. 2008-11-23 20:27:03 +00:00