NetBSD/tests
kre 78eadc76d4 Add two new sub-tests to the echo test case of the t_builtins shell ATF test.
The first verifies that echo exits >0 when it encounters an I/O error on
its output (this part would have succeeded for a long time).  It also
verifies the POSIX requirement that when most standard utilities (or
perhaps many rather than most) exit(>0) they must write a message to stderr.
Our sh's built in echo did not do that (nor does /bin/echo but that's not
relevant here).

The second demonstrates (on an unfixed built-in echo) a bug reported in
private e-mail by Oguz <oguzismailuysal@gmail.com> where once an instance of
the built-in echo has detected an I/O error, all later invocations of
the built-in echo, with no I/O errors of their own, also exit(1) (the error
status on stdout is not cleared, each echo sees the "I/O error occurred" and
does exit(1)).

In this second sub-test, the "2>&-" on the first echo command is simply
an artifact caused by the test harness - the "check" function verifies
that exit((>0) requires a message on stderr (and vice versa), but that
only applies to most (or many) utilities, echo is one, but sh is not.
In the second test, the exit status comes from sh - sh is permitted to
write to stderr (via the echo command it runs in this case) and still
exit(0).   But the check function in the test does not understand that
subtlety.   So, we simply suppress the stderr message by closing stderr
(the first of these two new sub-tests has verified that the message exists)..
2021-05-18 21:37:56 +00:00
..
bin Add two new sub-tests to the echo test case of the t_builtins shell ATF test. 2021-05-18 21:37:56 +00:00
crypto
dev config_found_ia() -> config_found(). 2021-04-25 05:33:20 +00:00
fs Add blocklist support to libwrap which enables all programs using libwrap 2021-03-07 15:09:12 +00:00
games simplify: use two arguments again, suggested by kre@ 2020-10-11 18:43:50 +00:00
include
ipf
kernel Avoid hard-coding names and limits so this will not break again. 2020-10-31 14:57:02 +00:00
lib Add test for POSIX_SPAWN_RESETIDS flag 2021-05-02 11:18:11 +00:00
libexec Whitespace 2020-09-29 16:35:42 +00:00
modules
net Add a new link-aggregation pseudo interface named lagg(4) 2021-05-17 04:07:41 +00:00
rump for the busypage test, replace atf_tc_expect_fail() with atf_tc_skip() 2021-01-22 22:03:01 +00:00
sbin apply this change to a a couple more tests: 2020-12-10 08:16:59 +00:00
share Fix C++ file suffix (.cpp -> .cc) 2020-08-14 06:23:49 +00:00
sys add some new uses of existing GCC_NO_* variables for warning issues. 2021-04-12 02:54:07 +00:00
usr.bin lint: add more specific warning for bit-field of type plain 'int' 2021-05-16 11:11:36 +00:00
usr.sbin don't run the "offline" or "nointr" tests by default. they exercise 2021-04-12 01:18:13 +00:00
Makefile
Makefile.inc
README
h_macros.h

README

$NetBSD: README,v 1.4 2012/05/18 15:36:21 jruoho Exp $

When adding new tests, please try to follow the following conventions.

1. For library routines, including system calls, the directory structure of
   the tests should follow the directory structure of the real source tree.
   For instance, interfaces available via the C library should follow:

	src/lib/libc/gen -> src/tests/lib/libc/gen
	src/lib/libc/sys -> src/tests/lib/libc/sys
	...

2. Equivalently, all tests for userland utilities should try to follow their
   location in the source tree. If this can not be satisfied, the tests for
   a utility should be located under the directory to which the utility is
   installed. Thus, a test for env(1) should go to src/tests/usr.bin/env.
   Likewise, a test for tcpdump(8) should be in src/tests/usr.sbin/tcpdump,
   even though the source code for the program is located under src/external.

3. Otherwise use your own discretion.