Commit Graph

1802 Commits

Author SHA1 Message Date
davidxu
1053aec712 Add test code for POSIX semaphore implementation. 2010-01-05 12:34:13 +00:00
obrien
d2744b88e9 Add ability to search up the directory hierarchy for the system directory.
Do by specifying ".../" with '-m' or MAKESYSPATH (new) environment variable.

Reviewed by:	<sjg@NetBSD.org>
Obtained from:	NetBSD (+ embellishment by me, sent back to NetBSD)
2010-01-04 18:57:22 +00:00
obrien
0eb7553bed Fix formatting. 2010-01-04 11:11:37 +00:00
obrien
9085cab1b2 There are actually 129 tests here. 2010-01-04 11:00:12 +00:00
obrien
c08a21642c Catch up with UNIX98-style PTY's. 2010-01-04 10:59:14 +00:00
obrien
ed014ff383 'prove -r' isn't as smart as grog thought. 2010-01-04 10:58:08 +00:00
obrien
7c3c566c89 You need to be root to run this test. 2010-01-04 09:59:18 +00:00
obrien
4e367e4214 Also cleanup after the test run. 2010-01-04 09:57:00 +00:00
obrien
f34b58c695 Don't process 'lastcomm' if "AUTOMATED" is defined.
The tests for it require manual setup.
2010-01-04 09:54:24 +00:00
obrien
4e434d007d It is expected these are chmod +x. 2010-01-04 09:50:30 +00:00
obrien
9f5a22f4e5 Regression test for r201456. 2010-01-04 09:49:23 +00:00
jilles
e314ef3281 sh: Send the "not found" message for builtin <cmd> to redirected fd 2. 2010-01-03 15:01:38 +00:00
jilles
6568fbfc9d sh: Add a regression test that tries out all arithmetic ops.
MFC after:	1 week
2010-01-03 12:50:27 +00:00
obrien
82a9840cd0 Use t1 & t2 as more symbolic than 'a' and 'b' for the two times. 2010-01-03 12:17:51 +00:00
obrien
8ab1021a62 Provide clean output with 'prove -r'. 2010-01-03 11:53:48 +00:00
obrien
d29fa0f85f Hide expected error output so the 'prove -r' results are easy to read. 2010-01-03 09:31:33 +00:00
obrien
447a847b68 Allow to be driven by 'prove -r'. 2010-01-03 09:30:50 +00:00
obrien
07c66d81be Make sure 'pack' is usable for 'prove -r'. 2010-01-03 08:44:18 +00:00
obrien
88d1aeccc5 Transform from kernel file to userland source. 2010-01-03 08:33:24 +00:00
jilles
446838eef9 sh: Fix some bugs with backquoted builtins:
- correctly handle error output in $(builtin 2>&1), clarify out1/out2 vs
  output/errout in the code
- treat all builtins as regular builtins so errors do not abort the shell
  and variable assignments do not persist
- respect the caller's INTOFF

Some bugs still exist:
- expansion errors may still abort the shell
- some side effects of expansions and builtins persist
2010-01-01 18:17:46 +00:00
brooks
a5cc24440b The devices that supported EVFILT_NETDEV kqueue filters were removed in
r195175.  Remove all definitions, documentation, and usage.

fifo_misc.c:
	Remove all kqueue tests as fifo_io.c performs all those that
	would have remained.

Reviewed by:	rwatson
MFC after:	3 weeks
X-MFC note:	don't change vlan_link_state() function signature
2009-12-31 20:29:58 +00:00
jilles
9f56916a97 sh: Use PATH= assignment in type.
Example:
  PATH=/var/empty; PATH=/bin type ls
2009-12-31 17:44:24 +00:00
jilles
8e6aa134e5 sh: Allow command -pv and command -pV (lookup using _PATH_STDPATH). 2009-12-31 16:13:33 +00:00
jilles
5633dfdd79 sh: arith: Return only 0 and 1 from && and ||.
This agrees with C, POSIX and other shells.
2009-12-30 15:59:40 +00:00
antoine
bfd388c026 (S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
Fix some wrong usages.
Note: this does not affect generated binaries as this argument is not used.

PR:		137213
Submitted by:	Eygene Ryabinkin (initial version)
MFC after:	1 month
2009-12-28 22:56:30 +00:00
trasz
d4630ade7b Make tests for ACL preservation by mv(1) and cp(1) more complete
and easier to follow.
2009-12-27 13:05:56 +00:00
jilles
545cc5fec7 sh: Do not run callers' exception handlers in subshells.
Reset the exception handler in the child to main's.

This avoids inappropriate double cleanups or shell duplication when the
exception is caught, such as 'fc' and future 'command eval' and 'command .'.
2009-12-25 20:21:35 +00:00
jhb
1d27c062b6 Add a new tool which attempts to check for kernel configuration options that
are missing from NOTES files.
2009-12-24 14:32:11 +00:00
trasz
b12b4cb50e Add regression test for NFSv4 ACLs on UFS. 2009-12-21 20:47:41 +00:00
rwatson
2bc44b9609 Merge libkqueue test suite through r119
Submitted by:	Mark Heily <mark@heily.com>
2009-12-15 10:43:20 +00:00
rwatson
b8a76a26d7 Add Mark Heily's libkqueue test suite as a general kqueue test suite to
tools/regression.  It tests a number of aspects of kqueue behavior,
although not all currently pass (possibly bugs in the test suite?).

Submitted by:	Mark Heily <mark at heily.com>
Obtained from:	svn://mark.heily.com/libkqueue/trunk/test (r114)
2009-12-13 20:27:46 +00:00
jh
6f2f9130ae Don't read the newline character to line buffer because lines are passed
to wcscoll(3). Newline characters could cause incorrect results when
comparing lines.

Also, if an input line didn't contain a newline character, it was
omitted from the output. According to my interpretation, SUSv3 requires
that the newline is always printed.

Add regression tests for the cases. [1]

PR:		bin/140976
Submitted by:	D'Arcy Cain (original version) [1]
Approved by:	trasz (mentor)
2009-12-12 18:18:46 +00:00
jilles
c4ae3de634 sh: Test ;<newline> as well as ; in the 'for' parser test. 2009-12-06 23:31:23 +00:00
phk
6c4860700c Add disk-magic for amd64: same as i386.
Pass PORTS_OPTS wherever we invoke ports makefiles

Add a logfile where we can see the progress of distfile prefetching
2009-12-04 10:57:01 +00:00
green
32cc2b56a7 Do not gratuitously fail *env(3) operations due to corrupt ('='-less)
**environ entries.  This puts non-getenv(3) operations in line with
getenv(3) in that bad environ entries do not cause all operations to
fail.  There is still some inconsistency in that getenv(3) in the
absence of any environment-modifying operation does not emit corrupt
environ entry warnings.

I also fixed another inconsistency in getenv(3) where updating the
global environ pointer would not be reflected in the return values.
It would have taken an intermediary setenv(3)/putenv(3)/unsetenv(3)
in order to see the change.
2009-12-01 05:04:31 +00:00
jilles
11d90a01c3 Disable job control when running 'sh -i' in the testsuite.
Job control tty manipulations sometimes cause the tests to stop (SIGTTOU
and the like) when run from the 'prove' tool.
2009-11-29 22:58:10 +00:00
jilles
171b4944c1 Fix some cases where file descriptors from redirections leak to programs.
- Redirecting fds that were not open before kept two copies of the
  redirected file.
    sh -c '{ :; } 7>/dev/null; fstat -p $$; true'
    (both fd 7 and 10 remained open)
- File descriptors used to restore things after redirection were not
  set close-on-exec, instead they were explicitly closed before executing
  a program normally and before executing a shell procedure. The latter
  must remain but the former is replaced by close-on-exec.
    sh -c 'exec 7</; { exec fstat -p $$; } 7>/dev/null; true'
    (fd 10 remained open)

The examples above are simpler than the testsuite because I do not want to
use fstat or procstat in the testsuite.
2009-11-29 22:33:59 +00:00
julian
bf4b9dad83 exit if "make distribition" fails
Submitted by:	patrick tracanelli
MFC after:	1 week
2009-11-25 19:00:30 +00:00
jkim
f95642ae2b Make this test case little bit more interesting. 2009-11-23 22:28:15 +00:00
jilles
20812b17e0 sh: Ensure the same command input file is on top after executing a builtin.
This avoids weirdness when 'fc -e vi' or the like is done and there is a
syntax error in the file. Formerly an interactive shell tried to execute
stuff after the syntax error and exited.

This should also avoid similar issues with 'command eval' and 'command .'
when 'command' is implemented properly as in NetBSD sh.

Special builtins did not have this problem since errors in them cause the
shell to exit or to reset various state such as the current command input
file.
2009-11-22 14:04:20 +00:00
jilles
b93ea764d1 trap: do not consider a bad signal name a fatal error.
POSIX explicitly prescribes this.
Continue processing any other signals and return status 1.
2009-11-21 20:44:34 +00:00
stefanf
e3acc4fb35 Add a test for r199631. 2009-11-21 14:54:35 +00:00
stefanf
a85bade2b1 Add a few very basic tests for cd -{L,P} and pwd -{L,P}. 2009-11-21 14:12:51 +00:00
jkim
be8a54e0c3 Correct copyright date in the BPF regression test. 2009-11-20 19:01:09 +00:00
jkim
ad0b2feb64 Adjust BPF JIT compiler regression tests to catch up with r199603. 2009-11-20 18:53:38 +00:00
mr
9aa490f096 Add nanobsd example for the PC Engines ALIX board (serial console). 2009-11-19 16:27:51 +00:00
jkim
23da766d8b Add a test case for very long BPF program. 2009-11-19 00:00:31 +00:00
attilio
9dd892aeae Collapse devinfo_state_t with device_state_t in order to avoid a
structure replication and improve manteneability.

Reviewed by:	jhb, imp
Tested by:	Riccardo Torrini <riccardo at torrini dot org>
2009-11-15 16:44:43 +00:00
jilles
6655f1214a sh: Allow a newline before "in" in a for command, as required by POSIX. 2009-11-14 22:08:32 +00:00
ed
368f00cc58 Convert {small prefix}BSD to TERM=xterm as well.
Clean up the ttys files shipped with PicoBSD, NanoBSD and TinyBSD. While
there, it seems one of them still had references to sio(4). Make it in
sync with what we do in the base system.
2009-11-13 11:32:14 +00:00