History log of /freebsd-10-stable/tools/regression/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
321137 18-Jul-2017 ngie

MFC r319800,r319806:

r319800:

Don't explicitly get the class to PART in gctl_test_helper.c

This will allow the tool to be used with arbitrary geom(4) classes, like GEOM.

Specify class=PART explicitly in the tester to keep existing behavior.

r319806:

Improve handling with system state

- Always unlink $cmd after exit via END block.
- The tests don't function well if kern.geom.debugflags != 0. Save debugflags,
then restore them at the end of the test.

319170 30-May-2017 ngie

MFC r319015:

Use calloc instead of malloc + memset

319154 29-May-2017 ngie

MFC r317313:

gctl_test.t: catch errors with the mdcfg directive

While here, add a note about certain testcases relying on `count=1024` in
the "create" portion.

319014 27-May-2017 ngie

MFC r317290,r317291,r317292,r317293,r317294,r317295,r317304,r317306,r317307,r317308,r317309:

r317290:

Fix -Wimplicit-function-declaration compilation warning by moving libgeom.h
#include below the stdio.h #include.

gctl_dump(3) needs stdio.h, per reasoning noted in r317289.

PR: 218809

r317291:

Rename gctl.t to gctl_test.t and test.c to gctl_test_helper.c

This is being done to reduce ambiguity and to make the tests more portable
in the future to other locations in the source tree.

r317292:

gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly

r317293:

gctl_test_helper: apply polish

- Staticize variables to fix warnings.
- Sprinkle asserts around for calls that can fail
- Apply style(9) for main(..) definition.
- ANSIify usage(..) definition.

r317294:

Bump WARNS to 6 per previous commits which fixed warnings

Tested with: clang (4.0), gcc (4.2.1, 6.3.0)

r317295:

The GPT class no longer exists; use the PART class instead

r317304:

gctl_test_helper: add diagnostic output for parse_retval(..)

This will help end-users better diagnose issues with the function.

r317306:

gctl_test.t: minor tweaks

- Declare $count with the `my` scope operator to permit `use strict`.
- Add `use strict`.
- Use `use warnings` instead of using `-w` in the shebang.
- Don't unlink $cmd when done (prevents unnecessary rebuilding).
- Improve the error message when running with insufficient permissions, e.g.,
non-root.

r317307:

Use verb=delete not verb=remove

The `remove` verb hasn't been present in geom_part*(4) for well
over a decade, if ever. I couldn't find any references to it in
^/stable/5 at least, which is around the timeframe that this test
was written.

r317308:

gctl_test.t: more tweaks to try and update the code and get it functional (again?)

- Make the logfile for $out be built off the basename for $cmd, instead of $cmd.
(r317292 broke this assumption).
- Rename $mntpt to $mntpt_prefix for clarity, as this variable is a prefix for
mountpoints.
- Reindent the umount directive block while here to match the rest of the code.

r317309:

gctl_test.t: improve error reporting with mdcfg and mount directives

If the commands had failed previously, it would press on and result in a
series of cascading failures. Fail early and continue on to the next case
instead of executing additional commands after a previously failed series
of steps.

299826 15-May-2016 pfg

MFC r298881, 298882, 298883, 298885:

Minor spelling fixes in:
tools, share, bluetooth, pmcstat, etc

Many of these have user-visible strings.

297747 09-Apr-2016 jilles

MFC r295385: semget(): Check for [EEXIST] error first.

Although POSIX literally permits failing with [EINVAL] if IPC_CREAT and
IPC_EXCL were both passed, the semaphore set already exists and has fewer
semaphores than nsems, this does not allow an application to retry safely:
if the [EINVAL] is actually because of the semmsl limit, an infinite loop
would result.

PR: 206927

296821 14-Mar-2016 ngie

MFC r293821:

Integrate
tools/regression/geom_{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}
in to the FreeBSD test suite as
tests/sys/geom/class/{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}

The tools/regression/geom and tools/regression/geom_part testcases are being
left alone because both test sets are both currently broken.

The majority of this work was done on ^/user/ngie/more-tests2 . The differences
are as follows:
- tests/sys/geom/class/Makefile.inc is not present; it was
inlined into the class's Makefiles for explicitness.
- The testcases officially require root via kyua
- The geom_gate(4) tests don't use the pidfile changes proposed in
https://reviews.freebsd.org/D4836 .

296814 13-Mar-2016 ngie

MFC r293621,r293622,r293815:

r293621:

- Delete non-TAP testcases
- Add a conf.sh file for executing common functions with geom_gate
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox
- Add/increase sleeps to try and improve synchronization
- Add debug output for when checksums fail

test-1.t:
- Use pkill for killing ggated

r293622:

Remove Makefile now that the testcases are all TAP based and
prove -rv can be used on them

r293815:

Add conf.sh file missed in r293621

296787 13-Mar-2016 ngie

MFC r293443:

- Make test-1.sh into a TAP testable testcase
- Delete test-2.sh as it was an incomplete testcase, and the contents were
basically a subset of test-1.sh
- Add a conf.sh file for executing common functions with geom_uzip
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

296786 13-Mar-2016 ngie

MFC r293442:

- Add a geom_stripe specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

296785 13-Mar-2016 ngie

MFC r293441:

- Add a geom_shsec specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

296784 13-Mar-2016 ngie

MFC r293438:

- Add a geom_raid3 specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

296783 13-Mar-2016 ngie

MFC r293437:

- Add a conf.sh file for executing common functions with gnop
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

296782 13-Mar-2016 ngie

MFC r293436:

- Add a conf.sh file for executing common functions with geli
-- Use linear probing to find the first unique md(4) device, unlike the other
code which uses attach_md, as geli(8) allocates the md(4) devices itself
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

296777 12-Mar-2016 ngie

MFC r293434:

- Use attach_md for memory disks so they can be tracked.
- Add a geom_concat specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

294963 27-Jan-2016 jilles

MFC r294565: sem: Don't free nameinfo that is still in list when open()
fails.

This bug could be reproduced easily by calling sem_open() with O_CREAT |
O_EXCL on a semaphore that is already open in the process. The struct
sem_nameinfo would be freed while still in sem_list and later calls to
sem_open() or sem_close() could access freed memory.

PR: 206396

294657 24-Jan-2016 ngie

MFC r293073:

- Use attach_md instead of hardcoding md(4) provider unit numbers
- Implement a gmirror_test_cleanup function, which in turn calls
geom_test_cleanup to clean up all md(4) providers allocated in the test
run.
- Remove duplicate logic in test scripts for removing md(4) providers.
- Don't create files in /tmp (outside the kyua sandbox); use the current
directory instead

294641 23-Jan-2016 ngie

MFC r294125:

Test for EPROTOTYPE not EPROTONOSUPPORT

- `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4)
- localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so
the prototype is invalid (this isn't explicitly documented anywhere I could
find)

294550 22-Jan-2016 ngie

MFC r293048,r293444:

r293048:

- Use a temporary file for the temporary md(4) devices instead of
hardcoding it
- Remove the temporary file in the cleanup routine

r293444:

- Move functions that might be used in class-specific cleanup functions
(geom_test_cleanup, etc) down so the testcases don't emit noise when
bailing
- Conform to the TAP protocol better when dealing with classes that can't
be loaded and with temporary files that can't be allocated for tracking
md(4) devices.

294486 21-Jan-2016 ngie

MFC r294126:

Fix warnings with gcc 5.0

reconnect.c:
- Convert the K&R prototype of main to an ANSI prototype to mute a
warning from gcc 4.2.1
- Close s_sock2 after finishing off the last test to plug a leak and
mute a warning from gcc 5.0 about a -Wunused-but-set variable

sendfile.c:
- Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)

294485 21-Jan-2016 ngie

MFC r294127:

Fix warnings with clang/gcc

- Get rid of unused argc/argv variables in main
- Exit on failure with a return code of 1 instead of -1 with err/errx as a
return code of -1 is implementation dependent
- Bump WARNS to 6

294305 19-Jan-2016 ngie

MFC r294128:

Fix -Wunused warning with clang/gcc

- Get rid of unused argc/argv variables in main
- Bump WARNS to 6

294303 19-Jan-2016 ngie

MFC r294103:

- Check for accf_filter before running the tests, otherwise it will always
fail at subtest 9/11
- Use strncpy instead of strcpy with afa.af_name

294302 19-Jan-2016 ngie

MFC r294123:

Add missing newline to message about requiring root privileges

This will help ensure that scripts/parsers don't get confused when the message
is printed out

294244 18-Jan-2016 ngie

Remove tools/regression/lib/msun (follow up to r292497)

Sponsored by: EMC / Isilon Storage Division

294066 15-Jan-2016 ngie

MFC r293032:

Use randomly generated device names in testcases via mktemp -u instead of using
the hardcoded device name, "test"

294063 15-Jan-2016 ngie

MFC r293028,r293029:

r293028:

- Use geom <class> load instead of g<class> load; g<class> doesn't exist
for all geom classes, e.g. geom_uzip(4)
- These tests require root. Skip all of the tests if they're run as non-root

r293029:

Add functions for managing md(4) devices and cleaning up said md(4) devices

These will be used soon in the various test scripts that source geom_subr.sh

293272 06-Jan-2016 ngie

MFC r292914,r292957:

r292914:

Integrate tools/regression/sockets/unix_passfd into the FreeBSD test
suite as tests/sys/kern/unix_passfd_test

- Convert testcases to ATF
- Fix an alignment issues
- Mark rights_creds_payload(..) as an expected failure (see PR # 181741)

https://reviews.freebsd.org/D689

Submitted by: markj

r292957:

Rename `recvfd` and `sendfd` variables in recvfd/sendfd functions to avoid
-Wshadow issues with gcc

293267 06-Jan-2016 ngie

MFC r292328:

Integrate a number of testcases from tools/regression/lib/msun
into the FreeBSD test suite

There's no functional change with these testcases; they're purposely
being left in TAP format for the time being

Other testcases which crash on amd64/i386 as-is have not been
integrated yet (they need to be retested on a later version of
CURRENT, as I haven't used i386 in some time)

293246 06-Jan-2016 ngie

MFC r292530,r292546:

r292530:

- Use 1 for an exit code instead of -1 with err, errx, and exit
- Add unistd.h for getuid(3)
- Sort #includes

r292546:

- Convert testcase to TAP format
- Use nitems(x) instead of handrolled sizeof(x) / sizeof(*x) macro
- Do not mark count != 0 case with bsde_get_rule_count as a failure; this
generates false positives on systems with ugidfw rules set on it

293145 04-Jan-2016 ngie

MFC r292814:

- Explicitly initialize ch to 0
- Delete some spurious whitespace
- Use calloc instead of malloc in the last test to ensure that
sendspace is properly zero'ed out

Submitted by: markj

293138 04-Jan-2016 ngie

MFC r292531,r292532,r292533,r292545:

r292531:

Make test_matches.sh into a series of TAP testcases

Use temporary filesystems / memory disks instead of a hardcoded path
which doesn't exist on test systems

r292532:

Mark `subject matching jailid` testcase as an unexpected failure with
TODO to ensure that the testcase isn't marked as a failure

PR: 205481

r292533:

Skip the testcases if mac_bsdextended(4) isn't detected on the
system

r292545:

Redo the TAP integration so it works with Kyua

Kyua needs numbers in the TAP results :/, but prove doesn't

292845 28-Dec-2015 ngie

MFC r292569:

Make the mac_portacl testcases work / more robust

- A trap(1) call has been added to the test scripts to better
ensure that the tests do a better job at trying to restore the
test host state at the end of the tests (if the test was
interrupted before it would leave the system in an odd state,
potentially making the test results for subsequent runs
non-deterministic).
- Add root user checks
- Fix nc(1) usage:
-- -o is deprecated
-- Using `-w 10` will make the call timeout after 10 seconds so it
doesn't block indefinitely
- Use local variables
- Be more terse in the error messages
- Parameterize out "127.0.0.1"

Sponsored by: EMC / Isilon Storage Division

292801 27-Dec-2015 ngie

MFC r292489:

Disable test-ctrig.t testcases which fail assertions on i386

Tested on: stable/10 (amd64/i386), head (amd64/i386)
PR: 205446
X-MFC to: stable/10
Sponsored by: EMC / Isilon Storage Division

292799 27-Dec-2015 ngie

MFC r292492,r292495,r292647:

r292492:

- Use nitems instead of handrolling the macro
- Use a separate variable for tracking the testcase count instead
of hardcoding the offset for the testcases

Sponsored by: EMC / Isilon Storage Division

r292495:

Initialize j so it doesn't print out a garbage index

Use it consistently instead of i in the first loop

Sponsored by: EMC / Isilon Storage Division

r292647:

Use j instead of a hardcoded index (9) and increment it after
running the NaNs testcases

Pointyhat to: ngie
Sponsored by: EMC / Isilon Storage Division

292795 27-Dec-2015 ngie

MFC r292491,r292493,r292496:

r292491:

Disable test-ctrig.t testcases which fail assertions on i386 [*]

Also, don't compile the exp2l(3) testcases on platforms that don't support the
libcall (technically only x86 right now). This makes this test buildable on
arm*/mips*/powerpc*

Tested on: stable/10 (amd64/i386), head (amd64/i386)
PR: 205446 [*]
X-MFC to: stable/10
Sponsored by: EMC / Isilon Storage Division

r292493:

Don't run test-fma on i386

It completely fails all assertions on i386 on both stable/9 and stable/10

PR: 205448
X-MFC to: stable/10
Sponsored by: EMC / Isilon Storage Division

r292496:

Skip the testcases on i386 (all the assertions fail) [*]

Also, don't compile the ldexpl(3) testcases on platforms that don't support
the libcall (technically only x86 right now). This makes this test buildable on
arm*/mips*/powerpc*

PR: 205449 [*]
Tested on: stable/10 (amd64/i386), head (amd64/i386)
Sponsored by: EMC / Isilon Storage Division

292769 27-Dec-2015 ngie

MFC r292493:

Don't run test-fma on i386

It completely fails all assertions on i386 on both stable/9 and stable/10

PR: 205448
X-MFC to: stable/10
Sponsored by: EMC / Isilon Storage Division

292652 23-Dec-2015 ngie

MFC r292316:

Remove hosts that don't resolve properly with the nss and resolv tests

Sponsored by: EMC / Isilon Storage Division

292649 23-Dec-2015 ngie

MFC r292327:

Use fabsl instead of fabs to mute -Wabsolute-value warnings from clang
because `nums[]` is an array of long doubles

Sponsored by: EMC / Isilon Storage Division

292251 15-Dec-2015 ngie

MFC r291982:

Skip the MAC portacl tests if MAC_PORTACL support is missing instead of
marking them failed

Sponsored by: EMC / Isilon Storage Division

292142 13-Dec-2015 ngie

MFC r291983,r291984:

r291983:

Fix compilation warnings by adding unistd.h #include and missing return
statements

Sponsored by: EMC / Isilon Storage Division

r291984:

Add missing stdlib.h header

Apply some minor style(9) fixes

Sponsored by: EMC / Isilon Storage Division

291841 05-Dec-2015 ngie

Remove stale tools/regression directory that should have been deleted
in r291840

Sponsored by: EMC / Isilon Storage Division

291761 04-Dec-2015 ngie

MFC r291359,r291362:

r291359:

Skip over lines that start with # (comments)

r291362:

r291359 was incorrect. Skip over tokens that start with `#' as fgetln can
return more than one '\n' delimited line in a buffer

Handle empty lines too, just in case

291759 04-Dec-2015 ngie

MFC r291363:

Clean up trailing whitespace

291758 04-Dec-2015 ngie

MFC r291358:

Remove cnftp.bjpu.edu.cn (it no longer resolves)
Add localhost to resolv/mach for parity with nss/mach

291293 25-Nov-2015 ngie

MFC r264737:

Discussed with: jilles

r264737 (by jilles):

libc/stdio: Fail fdopen() on an execute-only fd.

An execute-only fd (opened with O_EXEC) allows neither read() nor write()
and is therefore incompatible with all stdio modes. Therefore, the [EINVAL]
error applies.

Also adjust the similar check in freopen() with a NULL path, even though
this checks an fd which is already from a FILE.

291183 23-Nov-2015 ngie

MFC r290914:

Integrate tools/regression/pipe in to the FreeBSD test suite as
tests/sys/kern/pipe

- Fix style(9) bugs
- Fix compiler warnings
- Use `nitems(x)` instead of `sizeof(x) / sizeof(*x)` pattern

The testcases will be converted over to ATF eventually, but for now will be
integrated in as plain C tests

Sponsored by: EMC / Isilon Storage Division

291178 23-Nov-2015 ngie

MFC r290532,r290561,r290843,r290844,r290845:

r290532:

Integrate tools/regression/lib/libc/locale into the FreeBSD test suite
as lib/libc/tests/locale

Sponsored by: EMC / Isilon Storage Division

r290561:

Delete leftover printfs from when these were TAP tests

Sponsored by: EMC / Isilon Storage Division

r290843:

Polish up the tests a bit more after projects/collation was merged to head

Provide more meaningful diagnostic messages if LC_CTYPE can't be set properly
instead of segfaulting, because setlocale returns NULL and strcmp(NULL, b) will
always segfault

Split up the testcases so one failing (in this case en_US.ISO8859-15) won't
cause the rest of the testcases to be skipped

Remove some unused variables

Sponsored by: EMC / Isilon Storage Division

r290844:

Polish up iswctype_test

- Split up the testcases into C locale and ja_JP.eucJP testcases.
- Avoid a segfault in the event that setlocale fails, similar to r290843
- Replace `sizeof(x) / sizeof(*x)` pattern with `nitems(x)`

Sponsored by: EMC / Isilon Storage Division

r290845:

Remove unused variables; sort by alignment where needed

Sponsored by: EMC / Isilon Storage Division

291175 23-Nov-2015 ngie

MFC r290563,r290868,r291038:

r290563:

Integrate tools/regression/lib/libc/net into the FreeBSD test suite
as lib/libc/tests/net

Also, fix eui64_aton_test:test_str(..). The test was comparing the result
of eui64_aton to a pointer of the expected result.

Sponsored by: EMC / Isilon Storage Division

r290868:

Fix -Wformat issues

Reported by: gcc
Sponsored by: EMC / Isilon Storage Division

r291038:

Do not print out errno if the call succeeded unexpectedly; this was a mistake
made in r290868

Reported by: jilles
Sponsored by: EMC / Isilon Storage Division

291173 23-Nov-2015 ngie

MFC r290905,r290922:

r290905:

Integrate acct(2) testcase in as tests/sys/kern/acct/acct_test

The :encode_tv_random_million testcase fails the epsilon tests a few thousand
times out of one million, so expect the testcase to fail

Submitted by: keramida
Sponsored by: EMC / Isilon Storage Division

r290922:

Remove directory made obsolete by r290905

X-MFC note: stable/10 only
Sponsored by: EMC / Isilon Storage Division

290895 16-Nov-2015 ngie

Remove tools/regression/acltools

Should have been done with r290894

Sponsored by: EMC / Isilon Storage Division

290893 15-Nov-2015 ngie

MFC r289195:

Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite

functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.

A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)

As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.

Sponsored by: EMC / Isilon Storage Division

Conflicts:
lib/libarchive/test
usr.bin/cpio/test

290876 15-Nov-2015 ngie

MFC r290538:

Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suite
as lib/libc/tests/stdlib

- Make the code a bit more style(9) compliant
- Convert a sizeof(x)/sizeof(x[0]) to nitems

Sponsored by: EMC / Isilon Storage Division

290875 15-Nov-2015 ngie

MFC r290539:

Integrate tools/regression/lib/libc/string into the FreeBSD test suite
as lib/libc/tests/string

Sponsored by: EMC / Isilon Storage Division

290585 09-Nov-2015 ngie

MFC r289441:

Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD
test suite as tests/sys/posixshm

Some other highlights:
- Convert the testcases over to ATF
- Don't use hardcoded paths to /tmp (which violate the ATF/kyua samdbox); use
mkstemp to generate temporary paths for non-SHM_ANON shm objects.

Sponsored by: EMC / Isilon Storage Division

290580 09-Nov-2015 ngie

MFC r290190,r290251:

r290190:

Fix compiler warnings with open_to_operation.c

Other sidenotes:
- Remove unused variables with main(..)
- Convert errx/exit with -1 to errx/exit with 1
- Fix a bogus test in try_directory_open
(expected_errno == expected_errno -> errno == expected_errno) [*]
- Fix some warnings related to discarded qualifiers
- Remove a bogus else-statement at the end of check_mmap_exec(..) in the
successful case. mmap(2), POSIX, Linux, etc all don't state what the
behavior is when mixing O_WRONLY + PROT_EXEC, so assume success for now to
get the test program to pass again.

PR: 201286 [*]
Submitted by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division

r290251:

Use nitems(x) instead of sizeof(x)/sizeof(x[0])

Sponsored by: EMC / Isilon Storage Division

289985 26-Oct-2015 ngie

MFC r289300:

Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs

Sponsored by: EMC / Isilon Storage Division

289984 26-Oct-2015 ngie

MFC r264965:
r264965 (by des):

Note that the bug was fixed, and when.

289970 26-Oct-2015 ngie

MFC r289332:

Fix test-fenv:test_dfl_env when run on some amd64 CPUs

Compare the fields that the AMD [1] and Intel [2] specs say will be
set once fnstenv returns.

Not all amd64 capable processors zero out the env.__x87.__other field
(example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the
env.__x87.__other field will contain after fnstenv is executed, so the values
in env.__x87.__other could be filled with arbitrary data depending on how the
CPU-specific implementation of fnstenv.

1. http://support.amd.com/TechDocs/26569_APM_v5.pdf
2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf

Discussed with: kib, Anton Rang <anton.rang@isilon.com>
Reviewed by: Daniel O'Connor <darius@dons.net.au> (earlier patch; pre-generalization)
Sponsored by: EMC / Isilon Storage Division
Reported by: Bill Morchin <wmorchin@isilon.com>

289954 25-Oct-2015 ngie

MFC r282072,r283018:

r282072:

- Fix compilation (MAP_INHERIT's dead)
- Fix warnings
- Use mkstemp instead of tmpnam

r283018:

Fix more warnings related to missing headers

285795 22-Jul-2015 brueffer

MFC: r285543

Add a missing break statement, which made the code default to IPv6.

PR: 201285
Submitted by: David Binderman
Approved by: re (gjb)

283927 02-Jun-2015 jhb

MFC 281887:
Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.


/freebsd-10-stable/lib/libc/gen/_once_stub.c
/freebsd-10-stable/lib/libc/include/compat.h
/freebsd-10-stable/lib/libc/stdio/open_memstream.3
/freebsd-10-stable/lib/libc/stdio/open_memstream.c
/freebsd-10-stable/lib/libc/stdio/open_wmemstream.c
/freebsd-10-stable/lib/libc/sys/closefrom.2
/freebsd-10-stable/lib/libc/sys/procctl.2
/freebsd-10-stable/share/man/man9/BUS_BIND_INTR.9
/freebsd-10-stable/share/man/man9/BUS_CHILD_DELETED.9
/freebsd-10-stable/share/man/man9/BUS_CHILD_DETACHED.9
/freebsd-10-stable/share/man/man9/BUS_DESCRIBE_INTR.9
/freebsd-10-stable/share/man/man9/BUS_NEW_PASS.9
/freebsd-10-stable/share/man/man9/VOP_ADVISE.9
/freebsd-10-stable/share/man/man9/VOP_ALLOCATE.9
/freebsd-10-stable/share/man/man9/bus_adjust_resource.9
/freebsd-10-stable/share/man/man9/bus_generic_new_pass.9
/freebsd-10-stable/share/man/man9/bus_set_pass.9
/freebsd-10-stable/share/man/man9/refcount.9
/freebsd-10-stable/share/man/man9/sglist.9
/freebsd-10-stable/share/man/man9/shm_map.9
/freebsd-10-stable/sys/amd64/include/vm.h
/freebsd-10-stable/sys/boot/i386/common/edd.h
/freebsd-10-stable/sys/dev/pci/pci_subr.c
/freebsd-10-stable/sys/i386/include/vm.h
/freebsd-10-stable/sys/sys/procctl.h
/freebsd-10-stable/sys/vm/sg_pager.c
/freebsd-10-stable/sys/x86/acpica/srat.c
/freebsd-10-stable/sys/x86/include/mca.h
/freebsd-10-stable/sys/x86/pci/qpi.c
/freebsd-10-stable/sys/x86/x86/mca.c
lib/libc/stdio/test-open_memstream.c
lib/libc/stdio/test-open_wmemstream.c
netinet/arphold/arphold.c
/freebsd-10-stable/usr.bin/perror/perror.1
/freebsd-10-stable/usr.bin/perror/perror.c
/freebsd-10-stable/usr.bin/procstat/procstat_rusage.c
/freebsd-10-stable/usr.bin/protect/protect.1
/freebsd-10-stable/usr.bin/protect/protect.c
/freebsd-10-stable/usr.sbin/bhyve/ioapic.c
/freebsd-10-stable/usr.sbin/bhyve/ioapic.h
/freebsd-10-stable/usr.sbin/bhyve/pci_irq.c
/freebsd-10-stable/usr.sbin/bhyve/pci_irq.h
/freebsd-10-stable/usr.sbin/bhyve/pm.c
/freebsd-10-stable/usr.sbin/etcupdate/etcupdate.8
/freebsd-10-stable/usr.sbin/etcupdate/etcupdate.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/always_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/conflicts_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/fbsdid_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/ignore_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/preworld_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/tests_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/tzsetup_test.sh
/freebsd-10-stable/usr.sbin/pciconf/err.c
283851 31-May-2015 ngie

MFC r283357:

Remove directory for test that has been integrated in under tests/sys/...

282858 13-May-2015 ngie

MFC r281593,r282071,r282074,r282133,r282134,r282135,r282136,r282137,r282138:

r282071:

Integrate tools/regression/mqueue into the FreeBSD test suite as
tests/sys/mqueue

r282074:

Integrate tools/regression/aio/aiotest and tools/regression/aio/kqueue into the
FreeBSD test suite as tests/sys/aio

r282133:

Fill in the copyright boilerplate for the test program

r282134:

Add initial (unpolished) macros for interfacing with the FreeBSD test suite

This is very rough, but will be replaced/redesigned some time soon after I fix
the Jenkins breakage I introduced

r282135:

Use ATF_REQUIRE_KERNEL_MODULE instead of aio_available function

r282136:

- Use ATF_REQUIRE_KERNEL_MDOULE to require aio(4)
- Don't use /tmp as a basis for temporary files as it's outside of the ATF
sandbox
- Don't override MAX macro in sys/param.h

r282137:

Use PLAIN_REQUIRE_KERNEL_MODULE to require "mqueuefs"

r282138:

Adjust CFLAGS to find freebsd_test_suite/macros.h

282855 13-May-2015 ngie

MFC r280894,r280895:

r280894:

Minor cleanup before converting to ATF testcases

- Remove blank (tab-only) lines.
- Fix -Wunused warnings.
- Bump up to WARNS= 6

r280895:

- Fix -Wsign issue
- Bump up to WARNS=6

282853 13-May-2015 ngie

MFC r282076,r282104:

r282076:

Integrate tools/regression/mmap into the FreeBSD test suite as
tests/sys/kern/mmap_test

r282104:

Move tests/sys/kern/mmap_test to tests/sys/vm/mmap_test

As jhb noted, the actual mmap(2) implementation is under sys/vm, not
sys/kern/, so the correct logical place is tests/sys/vm/, not
tests/sys/kern/

282851 13-May-2015 ngie

MFC r282075:

Convert this testcase over to a TAP format testcase

282843 13-May-2015 ngie

MFC r282073:

- Fix style(9) a bit
-- Fix whitespace
-- Use err/errx
-- Remove superfluous braces
- Be a bit more defensive with input from the end-user
- Don't throw a floating point exception by dividing by 0 when processing a
zero-byte file

282842 13-May-2015 ngie

MFC r282067:

Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo
and tools/regression/file into the FreeBSD test suite as tests/sys/file

282841 13-May-2015 ngie

MFC r282063:

Integrate tools/regression/kqueue into the FreeBSD test suite as
tests/sys/kqueue

282837 13-May-2015 ngie

MFC r282062:

Fix -Wformat warnings by using proper format string qualifiers for
long and unsigned[ long] types

281974 25-Apr-2015 ngie

MFC r261550,r281354,r281355,r281356,r281358,r281359,r281360,r281361,r281362,r281391,r281392,r281393,r281394,r281395,r281397,r281398,r281399,r281400,r281401,r281402,r281403,r281404,r281407,r281408,r281409,r281410,r281411:

r261550 (by glebius):

Add test case for kern/181741. Right now test fails.

PR: 181741
Sponsored by: Nginx, Inc.

r281354:

Fix warnings, fix a typo in a testcase description, bump WARNS to 3

- Remove argc/argv (-Wunused)
- Cast len in comparison to size_t (-Wsign-compare)

Sponsored by: EMC / Isilon Storage Division

r281355:

Fix -Wunused warnings, bump WARNS to 6

The testcase fails today on subtest # 9

The output is still broken if prove -rv is run and the testcase aborts
prematurely (the testcase doesn't really conform to TAP protocol properly,
except when it completes fully)

Sponsored by: EMC / Isilon Storage Division

r281356:

Fix -Wunused warnings, bump WARNS to 6

The output is still broken if prove -rv is run and the testcase aborts
prematurely with fail_assertion (the testcase doesn't really conform to TAP
protocol properly, except when it completes fully)

Sponsored by: EMC / Isilon Storage Division

r281358:

- Parameterize out the number of accept/connect attempts
- Randomize the bind port to allow 2+ consecutive calls in < 10 minutes, and
to also not fail if (for instance) there's a server already listening on port
8080
- Don't leak the listening socket / fds into the child process
- Fix warnings:
-- Remove argc/argv (-Wunused)
-- Mark sig __unused (-Wunused)
-- Mark quit static (-Wmissing-variable-declarations)

Sponsored by: EMC / Isilon Storage Division

r281359:

Remove argc/argv (-Wunused)

Sponsored by: EMC / Isilon Storage Division

r281360:

Fix warnings

- Remove argc/argv (-Wunused)
- Mark some parameters to socket_listen_update __unused (-Wunused)

Sponsored by: EMC / Isilon Storage Division

r281361:

Remove argc/argv (-Wunused)

Sponsored by: EMC / Isilon Storage Division

r281362:

Use _exit, not exit in forked process

Sponsored by: EMC / Isilon Storage Division

r281391:

- Use static buffers for temporary file paths instead of strdup of constant strings
- Don't use /tmp because it's outside ATF's prescribed sandbox
- Use mkstemp instead of mktemp to eliminate warning

Sponsored by: EMC / Isilon Storage Division

r281392:

- Garbage collect argc/argv (-Wunused)
- Bump WARNS to 6

Sponsored by: EMC / Isilon Storage Division

r281393:

Fix warnings and bump WARNS to 6
- Garbage collect argc/argv (-Wunused)
- sleep(3) will always return an unsigned int; don't check for return codes <0
(-Wsign-compare)

Sponsored by: EMC / Isilon Storage Division

r281394:

- Don't use /tmp because it's outside ATF's prescribed sandbox
- Replace a hardcoded PATH_MAX value with sizeof(path)
- Use path like an array, not a pointer, and always try to unlink it in cleanup

Sponsored by: EMC / Isilon Storage Division

r281395:

Fix a -Wuninitialized warning by setting the socket to -1 and bump WARNS to 6

Sponsored by: EMC / Isilon Storage Division

r281397:

Mark signum unused in signal_handler; bump WARNS to 6

Sponsored by: EMC / Isilon Storage Division

r281398:

Garbage collect argc/argv and bump WARNS to 6

Sponsored by: EMC / Isilon Storage Division

r281399:

Fix warnings and bump WARNS to 6
- Staticize variables as needed
- Garbage collect argc/argv
- Fix -Wsign-compare warnings by casting small sizeof to (int)

Sponsored by: EMC / Isilon Storage Division

r281400:

- Garbage collect argc/argv; bump WARNS to 6
- Make the socket path random and move it out of /tmp as that's outside ATF's
prescribed path

Sponsored by: EMC / Isilon Storage Division

r281401:

- Garbage collect argc/argv
- Use random paths instead of one in /tmp

Sponsored by: EMC / Isilon Storage Division

r281402:

Garbage collect argc/argv and bump WARNS to 6

Sponsored by: EMC / Isilon Storage Division

r281403:

Garbage collect argc/argv and bump WARNS to 6

Sponsored by: EMC / Isilon Storage Division

r281404:

Generate temporary files with mkstemp instead of mktemp

Sponsored by: EMC / Isilon Storage Division

r281407:

Fix the knob twiddling to work properly per src.opts.mk

Sponsored by: EMC / Isilon Storage Division

r281408:

- Remove the .t wrapper and put the "magic" of determining the number of
testcases into the .c file
- Require root for now because it fails with SOCK_RAW without root privileges
- Increment the test count properly on socket create failure

Sponsored by: EMC / Isilon Storage Division

r281409:

Fix warnings, bump WARNS to 6, and use a temporary socket instead of one in /tmp

Sponsored by: EMC / Isilon Storage Division

r281410:

Fix more warnings I didn't catch in the first go-around

Sponsored by: EMC / Isilon Storage Division

r281411:

Fix even more warnings..

Sponsored by: EMC / Isilon Storage Division

281969 25-Apr-2015 ngie

MFC r280893:

Cleanup and do minor refactoring before converting testcases to ATF

- Convert errx(-1, ..) to errx(1, ..)
- Move the aio(4) checks to a single function (aio_available); use modfind(2)
instead of depending on SIGSYS (doesn't work when aio(4) support is missing,
not documented in the aio syscall manpages).
- Use aio_available liberally in the testcase functions
- Use mkstemp(3) + unlink(2) instead of mktemp(3)
- Fix some -Wunused warnings
- Bump WARNS to 6

Submitted by: mjohnston [*]
Sponsored by: EMC / Isilon Storage Division

281742 19-Apr-2015 jilles

MFC r280830: wordexp(): Add testcase for non-default IFS in environment.

The non-default IFS is expected to be used.

280494 25-Mar-2015 kib

MFC r280232:
Cosmetics.

280250 19-Mar-2015 rwatson

Merge an applicable subset of r263234 from HEAD to stable/10:

Update most userspace consumers of capability.h to use capsicum.h instead.

auditdistd is not updated as I will make the change upstream and then do a
vendor import sometime in the next week or two.

Note that a significant fraction does not apply, as FreeBSD 10 doesn't
contain a Capsicumised ping, casperd, libcasper, etc. When these features
are merged, the capsicum.h change will need to be merged with them.

Sponsored by: Google, Inc.

280027 15-Mar-2015 jilles

MFC r279779: env: Fix crash when -S string is not empty but no operand
follows.

split_spaces() set argc in main() incorrectly, which caused trouble for
getopt().

Examples:
env -S '\c'
env -S -i

PR: 197769

280002 14-Mar-2015 jilles

MFC r279722: env: Fix testsuite for additional variables set by sh.

277684 25-Jan-2015 ngie

MFC r277527:

r277527 (by ngie):

Make this compile with WARNS=6 and clang/gcc

Sponsored by: EMC / Isilon Storage Division

277548 23-Jan-2015 ngie

MFC r277453:

r277453 (by ngie):

Garbage collect a prove test wrapper

Sponsored by: EMC / Isilon Storage Division

277446 20-Jan-2015 ngie

MFC r267004,r274592:

r267004 (by gahr):

- Use strlen instead of hardcoding a number
- Terminate a sentence with a period

Approved by: cognet

r274592 (by ngie):

Convert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase and
rename as lib/libc/stdio/fmemopen2_test

Sponsored by: EMC / Isilon Storage Division

277441 20-Jan-2015 ngie

MFC r274075,r274581,r274582,r274595:

r274075 (by ngie):

Add reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds approximately
500 new testcases

Various TODOs have been sprinkled around the Makefiles for items that even need
to be ported (missing features), testcases have issues with building/linking, or
issues at runtime.

A variant of this code has been tested extensively on amd64 and i386
10-STABLE/11-CURRENT for several months without issue. It builds on other
architectures, but the code will remain off until I have prove it works on
virtual hardware or real hardware on other architectures

In collaboration with: pho, Casey Peel <casey.peel@isilon.com>
Sponsored by: EMC / Isilon Storage Division

r274581 (by ngie):

Convert tools/regression/lib/libc/gen/test-arc4random into an ATF testcase and
rename as lib/libc/gen/arc4random_test

Sponsored by: EMC / Isilon Storage Division

r274582 (by ngie):

Remove test-arc4random from this Makefile so others can continue to use
this as-is for the time being

r274595 (by ngie):

Convert tools/regression/lib/libc/stdio/test-fpclassify into an ATF testcase and
Rename as lib/libc/stdio/fpclassify2_test

Sponsored by: EMC / Isilon Storage Division

277016 11-Jan-2015 ngie

MFC discussed with: jilles, -developers

MFC r266971:

- Return NULL and set errno to EINVAL if size is 0 (as required by POSIX).
Update the manpage to reflect this change.
- Always set the current position to the first null-byte when opening in append
mode. This makes the implementation compatible with glibc's. Update the test
suite.

Reported by: pho
Approved by: cognet

276486 31-Dec-2014 ngie

MFC r264400,r265836:

r264400:

NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.

r265836:

Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
what is needed.


/freebsd-10-stable/cddl/usr.bin/sgsmsg/Makefile
/freebsd-10-stable/cddl/usr.bin/zinject/Makefile
/freebsd-10-stable/cddl/usr.bin/zlook/Makefile
/freebsd-10-stable/cddl/usr.bin/ztest/Makefile
/freebsd-10-stable/cddl/usr.sbin/zhack/Makefile
/freebsd-10-stable/contrib/libucl/Makefile.am
/freebsd-10-stable/contrib/libucl/doc/Makefile.am
/freebsd-10-stable/contrib/libucl/tests/Makefile.am
/freebsd-10-stable/contrib/libucl/utils/Makefile.am
/freebsd-10-stable/contrib/ofed/usr.bin/ibsendtrap/Makefile
/freebsd-10-stable/contrib/ofed/usr.lib/libsdp/Makefile
/freebsd-10-stable/crypto/heimdal/appl/Makefile.am
/freebsd-10-stable/crypto/heimdal/appl/ftp/Makefile.am
/freebsd-10-stable/crypto/heimdal/appl/ftp/common/Makefile.am
/freebsd-10-stable/crypto/heimdal/lib/Makefile.am
/freebsd-10-stable/crypto/heimdal/lib/ipc/Makefile.am
/freebsd-10-stable/games/fortune/unstr/Makefile
/freebsd-10-stable/games/ppt/Makefile
/freebsd-10-stable/games/primes/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/c++/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/c++filt/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/cc1/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/cc1plus/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/collect2/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/protoize/Makefile
/freebsd-10-stable/gnu/usr.bin/gdb/Makefile.inc
/freebsd-10-stable/gnu/usr.bin/gdb/gdbtui/Makefile
/freebsd-10-stable/gnu/usr.bin/groff/src/devices/grohtml/Makefile
/freebsd-10-stable/gnu/usr.bin/groff/src/preproc/html/Makefile
/freebsd-10-stable/kerberos5/libexec/digest-service/Makefile
/freebsd-10-stable/kerberos5/libexec/ipropd-slave/Makefile
/freebsd-10-stable/kerberos5/tools/asn1_compile/Makefile
/freebsd-10-stable/kerberos5/tools/make-roken/Makefile
/freebsd-10-stable/kerberos5/tools/slc/Makefile
/freebsd-10-stable/kerberos5/usr.bin/hxtool/Makefile
/freebsd-10-stable/kerberos5/usr.bin/ksu/Makefile
/freebsd-10-stable/lib/libarchive/test/Makefile
/freebsd-10-stable/lib/libauditd/Makefile
/freebsd-10-stable/lib/libproc/Makefile
/freebsd-10-stable/lib/libproc/test/t1-bkpt/Makefile
/freebsd-10-stable/lib/libproc/test/t2-name2map/Makefile
/freebsd-10-stable/lib/libproc/test/t3-name2sym/Makefile
/freebsd-10-stable/lib/ncurses/form/Makefile
/freebsd-10-stable/lib/ncurses/menu/Makefile
/freebsd-10-stable/lib/ncurses/ncurses/Makefile
/freebsd-10-stable/lib/ncurses/panel/Makefile
/freebsd-10-stable/libexec/bootpd/bootpgw/Makefile
/freebsd-10-stable/libexec/ulog-helper/Makefile
/freebsd-10-stable/release/picobsd/tinyware/aps/Makefile
/freebsd-10-stable/release/picobsd/tinyware/help/Makefile
/freebsd-10-stable/release/picobsd/tinyware/msg/Makefile
/freebsd-10-stable/release/picobsd/tinyware/ns/Makefile
/freebsd-10-stable/release/picobsd/tinyware/oinit/Makefile
/freebsd-10-stable/release/picobsd/tinyware/simple_httpd/Makefile
/freebsd-10-stable/release/picobsd/tinyware/sps/Makefile
/freebsd-10-stable/release/picobsd/tinyware/view/Makefile
/freebsd-10-stable/release/picobsd/tinyware/vm/Makefile
/freebsd-10-stable/rescue/rescue/Makefile
/freebsd-10-stable/sbin/geom/Makefile
/freebsd-10-stable/sbin/rtsol/Makefile
/freebsd-10-stable/secure/lib/libcrypto/engines/lib4758cca/Makefile
/freebsd-10-stable/share/examples/FreeBSD_version/Makefile
/freebsd-10-stable/share/examples/find_interface/Makefile
/freebsd-10-stable/share/examples/kld/cdev/test/Makefile
/freebsd-10-stable/share/examples/kld/syscall/test/Makefile
/freebsd-10-stable/share/examples/libvgl/Makefile
/freebsd-10-stable/share/examples/perfmon/Makefile
/freebsd-10-stable/share/examples/ppi/Makefile
/freebsd-10-stable/share/mk/bsd.README
/freebsd-10-stable/share/mk/bsd.test.mk
/freebsd-10-stable/sys/boot/amd64/boot1.efi/Makefile
/freebsd-10-stable/sys/boot/amd64/efi/Makefile
/freebsd-10-stable/sys/boot/arm/at91/boot0/Makefile
/freebsd-10-stable/sys/boot/arm/at91/boot0iic/Makefile
/freebsd-10-stable/sys/boot/arm/at91/boot0spi/Makefile
/freebsd-10-stable/sys/boot/arm/at91/boot2/Makefile
/freebsd-10-stable/sys/boot/arm/at91/bootiic/Makefile
/freebsd-10-stable/sys/boot/arm/at91/bootspi/Makefile
/freebsd-10-stable/sys/boot/arm/at91/libat91/Makefile
/freebsd-10-stable/sys/boot/arm/ixp425/boot2/Makefile
/freebsd-10-stable/sys/boot/i386/boot0/Makefile
/freebsd-10-stable/sys/boot/i386/btx/btx/Makefile
/freebsd-10-stable/sys/boot/i386/btx/btxldr/Makefile
/freebsd-10-stable/sys/boot/i386/btx/lib/Makefile
/freebsd-10-stable/sys/boot/i386/cdboot/Makefile
/freebsd-10-stable/sys/boot/i386/kgzldr/Makefile
/freebsd-10-stable/sys/boot/i386/mbr/Makefile
/freebsd-10-stable/sys/boot/i386/pmbr/Makefile
/freebsd-10-stable/sys/boot/i386/zfsloader/Makefile
/freebsd-10-stable/sys/boot/ia64/efi/Makefile
/freebsd-10-stable/sys/boot/ia64/ski/Makefile
/freebsd-10-stable/sys/boot/libstand32/Makefile
/freebsd-10-stable/sys/boot/pc98/boot0.5/Makefile
/freebsd-10-stable/sys/boot/pc98/boot0/Makefile
/freebsd-10-stable/sys/boot/pc98/btx/btx/Makefile
/freebsd-10-stable/sys/boot/pc98/btx/btxldr/Makefile
/freebsd-10-stable/sys/boot/pc98/btx/lib/Makefile
/freebsd-10-stable/sys/boot/pc98/cdboot/Makefile
/freebsd-10-stable/sys/boot/pc98/kgzldr/Makefile
/freebsd-10-stable/sys/boot/powerpc/boot1.chrp/Makefile
/freebsd-10-stable/sys/boot/powerpc/uboot/Makefile
/freebsd-10-stable/sys/boot/sparc64/boot1/Makefile
/freebsd-10-stable/sys/boot/userboot/libstand/Makefile
/freebsd-10-stable/sys/boot/userboot/test/Makefile
/freebsd-10-stable/sys/boot/userboot/userboot/Makefile
/freebsd-10-stable/sys/crypto/rijndael/Makefile
/freebsd-10-stable/sys/dev/aic7xxx/aicasm/Makefile
/freebsd-10-stable/sys/dev/patm/genrtab/Makefile
/freebsd-10-stable/tests/sys/netinet/Makefile
/freebsd-10-stable/tools/KSE/ksetest/Makefile
/freebsd-10-stable/tools/KSE/rr/Makefile
/freebsd-10-stable/tools/bsdbox/Makefile
/freebsd-10-stable/tools/diag/dumpvfscache/Makefile
/freebsd-10-stable/tools/diag/localeck/Makefile
acct/Makefile
aio/aiop/Makefile
aio/aiotest/Makefile
aio/kqueue/Makefile
aio/kqueue/lio/Makefile
audit/audit_pipe_ioctl/Makefile
doat/Makefile
environ/Makefile.envctl
environ/Makefile.retention
environ/Makefile.timings
ethernet/ethermulti/Makefile
execve/Makefile
fifo/fifo_create/Makefile
fifo/fifo_io/Makefile
fifo/fifo_misc/Makefile
fifo/fifo_open/Makefile
file/dup/Makefile
file/flock/Makefile
file/ftruncate/Makefile
file/newfileops_on_fork/Makefile
filemon/Makefile
fsx/Makefile
gaithrstress/Makefile
geom/ConfCmp/Makefile
geom/MdLoad/Makefile
include/stdatomic/Makefile
include/tgmath/Makefile
kgssapi/Makefile
kqueue/Makefile
kthread/kld/Makefile
lib/libc/resolv/Makefile
mac/mac_bsdextended/Makefile
mlock/Makefile
mmap/Makefile
mqueue/mqtest1/Makefile
mqueue/mqtest2/Makefile
mqueue/mqtest3/Makefile
mqueue/mqtest4/Makefile
mqueue/mqtest5/Makefile
netinet/arphold/Makefile
netinet/ipbroadcast/Makefile
netinet/ipdivert/Makefile
netinet/ipmulticast/Makefile
netinet/ipsockopt/Makefile
netinet/msocket/Makefile
netinet/msocket_ifnet_remove/Makefile
netinet/rawconnect/Makefile
netinet/tcpconnect/Makefile
netinet/tcpdrop/Makefile
netinet/tcpfullwindowrst/Makefile
netinet/tcpsockclosebeforeaccept/Makefile
netinet/tcpsocktimewait/Makefile
netinet/tcpstream/Makefile
netinet/udpconnectjail/Makefile
netinet/udpzerobyte/Makefile
netinet6/icmp6_filter/Makefile
netinet6/inet6_rth/Makefile
netinet6/ip6_sockets/Makefile
nfsmmap/test1/Makefile
nfsmmap/test2/Makefile
p1003_1b/Makefile
pipe/Makefile
posixsem/Makefile
posixsem2/Makefile
posixshm/Makefile
pthread/cv_cancel1/Makefile
pthread/mutex_isowned_np/Makefile
rpcsec_gss/Makefile
security/access/Makefile
security/cap_test/Makefile
security/open_to_operation/Makefile
security/proc_to_proc/Makefile
sigqueue/sigqtest1/Makefile
sigqueue/sigqtest2/Makefile
sockets/accept_fd_leak/Makefile
sockets/accf_data_attach/Makefile
sockets/fstat/Makefile
sockets/kqueue/Makefile
sockets/listen_backlog/Makefile
sockets/listenclose/Makefile
sockets/pr_atomic/Makefile
sockets/reconnect/Makefile
sockets/rtsocket/Makefile
sockets/sblock/Makefile
sockets/sendfile/Makefile
sockets/shutdown/Makefile
sockets/sigpipe/Makefile
sockets/so_setfib/Makefile
sockets/socketpair/Makefile
sockets/unix_bindconnect/Makefile
sockets/unix_close_race/Makefile
sockets/unix_cmsg/Makefile
sockets/unix_gc/Makefile
sockets/unix_passfd/Makefile
sockets/unix_sendtorace/Makefile
sockets/unix_socket/Makefile
sockets/unix_sorflush/Makefile
sockets/zerosend/Makefile
sysvmsg/Makefile
sysvsem/Makefile
sysvshm/Makefile
tls/ttls1/Makefile
tls/ttls2/Makefile
tls/ttls4/Makefile
tmpfs/Makefile
ufs/uprintf/Makefile
/freebsd-10-stable/tools/test/auxinfo/Makefile
/freebsd-10-stable/tools/test/iconv/gnu/Makefile
/freebsd-10-stable/tools/test/iconv/posix/Makefile
/freebsd-10-stable/tools/test/iconv/refgen/Makefile
/freebsd-10-stable/tools/test/iconv/tablegen/Makefile
/freebsd-10-stable/tools/test/malloc/Makefile
/freebsd-10-stable/tools/test/netfibs/Makefile
/freebsd-10-stable/tools/test/ppsapi/Makefile
/freebsd-10-stable/tools/test/ptrace/Makefile
/freebsd-10-stable/tools/test/upsdl/Makefile
/freebsd-10-stable/tools/tools/aac/Makefile
/freebsd-10-stable/tools/tools/ath/Makefile.inc
/freebsd-10-stable/tools/tools/ath/ath_ee_9287_print/Makefile
/freebsd-10-stable/tools/tools/ath/ath_ee_9300_print/Makefile
/freebsd-10-stable/tools/tools/ath/ath_ee_v14_print/Makefile
/freebsd-10-stable/tools/tools/ath/ath_ee_v4k_print/Makefile
/freebsd-10-stable/tools/tools/ath/athstats/Makefile
/freebsd-10-stable/tools/tools/atsectl/Makefile
/freebsd-10-stable/tools/tools/bootparttest/Makefile
/freebsd-10-stable/tools/tools/cfi/Makefile
/freebsd-10-stable/tools/tools/cxgbetool/Makefile
/freebsd-10-stable/tools/tools/cxgbtool/Makefile
/freebsd-10-stable/tools/tools/drm/radeon/mkregtable/Makefile
/freebsd-10-stable/tools/tools/find-sb/Makefile
/freebsd-10-stable/tools/tools/gdb_regofs/Makefile
/freebsd-10-stable/tools/tools/ifinfo/Makefile
/freebsd-10-stable/tools/tools/ifpifa/Makefile
/freebsd-10-stable/tools/tools/ipw/Makefile
/freebsd-10-stable/tools/tools/iwi/Makefile
/freebsd-10-stable/tools/tools/mfi/Makefile
/freebsd-10-stable/tools/tools/mwl/mwldebug/Makefile
/freebsd-10-stable/tools/tools/mwl/mwlstats/Makefile
/freebsd-10-stable/tools/tools/ncpus/Makefile
/freebsd-10-stable/tools/tools/net80211/stumbler/Makefile
/freebsd-10-stable/tools/tools/net80211/w00t/Makefile.inc
/freebsd-10-stable/tools/tools/net80211/wesside/dics/Makefile
/freebsd-10-stable/tools/tools/net80211/wesside/udps/Makefile
/freebsd-10-stable/tools/tools/net80211/wesside/wesside/Makefile
/freebsd-10-stable/tools/tools/net80211/wlaninject/Makefile
/freebsd-10-stable/tools/tools/net80211/wlanstats/Makefile
/freebsd-10-stable/tools/tools/net80211/wlantxtime/Makefile
/freebsd-10-stable/tools/tools/net80211/wlanwatch/Makefile
/freebsd-10-stable/tools/tools/net80211/wlanwds/Makefile
/freebsd-10-stable/tools/tools/netmap/Makefile
/freebsd-10-stable/tools/tools/netrate/http/Makefile
/freebsd-10-stable/tools/tools/netrate/httpd/Makefile
/freebsd-10-stable/tools/tools/netrate/juggle/Makefile
/freebsd-10-stable/tools/tools/netrate/netblast/Makefile
/freebsd-10-stable/tools/tools/netrate/netreceive/Makefile
/freebsd-10-stable/tools/tools/netrate/netsend/Makefile
/freebsd-10-stable/tools/tools/netrate/tcpconnect/Makefile
/freebsd-10-stable/tools/tools/netrate/tcpp/Makefile
/freebsd-10-stable/tools/tools/netrate/tcpreceive/Makefile
/freebsd-10-stable/tools/tools/npe/npestats/Makefile
/freebsd-10-stable/tools/tools/nxge/Makefile
/freebsd-10-stable/tools/tools/pciroms/Makefile
/freebsd-10-stable/tools/tools/pirtool/Makefile
/freebsd-10-stable/tools/tools/syscall_timing/Makefile
/freebsd-10-stable/tools/tools/tionxcl/Makefile
/freebsd-10-stable/tools/tools/umastat/Makefile
/freebsd-10-stable/tools/tools/vxge/Makefile
/freebsd-10-stable/tools/tools/wtap/vis_map/Makefile
/freebsd-10-stable/tools/tools/wtap/wtap/Makefile
/freebsd-10-stable/tools/tools/zfsboottest/Makefile
/freebsd-10-stable/usr.bin/bzip2recover/Makefile
/freebsd-10-stable/usr.bin/clang/clang-tblgen/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-mc/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-objdump/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-rtdyld/Makefile
/freebsd-10-stable/usr.bin/clang/macho-dump/Makefile
/freebsd-10-stable/usr.bin/cpio/test/Makefile
/freebsd-10-stable/usr.bin/dirname/Makefile
/freebsd-10-stable/usr.bin/locate/bigram/Makefile
/freebsd-10-stable/usr.bin/locate/code/Makefile
/freebsd-10-stable/usr.bin/mkcsmapper_static/Makefile
/freebsd-10-stable/usr.bin/mkesdb_static/Makefile
/freebsd-10-stable/usr.bin/svn/svn/Makefile
/freebsd-10-stable/usr.bin/svn/svnadmin/Makefile
/freebsd-10-stable/usr.bin/svn/svndumpfilter/Makefile
/freebsd-10-stable/usr.bin/svn/svnlook/Makefile
/freebsd-10-stable/usr.bin/svn/svnmucc/Makefile
/freebsd-10-stable/usr.bin/svn/svnrdump/Makefile
/freebsd-10-stable/usr.bin/svn/svnserve/Makefile
/freebsd-10-stable/usr.bin/svn/svnsync/Makefile
/freebsd-10-stable/usr.bin/svn/svnversion/Makefile
/freebsd-10-stable/usr.bin/tar/test/Makefile
/freebsd-10-stable/usr.bin/unexpand/Makefile
/freebsd-10-stable/usr.bin/uudecode/Makefile
/freebsd-10-stable/usr.bin/vgrind/RETEST/Makefile
/freebsd-10-stable/usr.bin/xlint/lint2/Makefile
/freebsd-10-stable/usr.sbin/bhyvectl/Makefile
/freebsd-10-stable/usr.sbin/bootparamd/callbootd/Makefile
/freebsd-10-stable/usr.sbin/bsdinstall/distextract/Makefile
/freebsd-10-stable/usr.sbin/bsdinstall/distfetch/Makefile
/freebsd-10-stable/usr.sbin/bsdinstall/scripts/Makefile
/freebsd-10-stable/usr.sbin/crunch/examples/Makefile
/freebsd-10-stable/usr.sbin/ctm/ctm_dequeue/Makefile
/freebsd-10-stable/usr.sbin/ctm/ctm_smail/Makefile
/freebsd-10-stable/usr.sbin/ctm/mkCTM/Makefile
/freebsd-10-stable/usr.sbin/fifolog/fifolog_reader/Makefile
/freebsd-10-stable/usr.sbin/fifolog/fifolog_writer/Makefile
/freebsd-10-stable/usr.sbin/lpr/filters.ru/koi2855/Makefile
/freebsd-10-stable/usr.sbin/lpr/filters.ru/koi2alt/Makefile
/freebsd-10-stable/usr.sbin/lpr/filters/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntp-keygen/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpd/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpdate/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpdc/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpq/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntptime/Makefile
/freebsd-10-stable/usr.sbin/portsnap/make_index/Makefile
/freebsd-10-stable/usr.sbin/portsnap/phttpget/Makefile
/freebsd-10-stable/usr.sbin/rpc.ypupdated/Makefile
275501 05-Dec-2014 ngie

MFC r271796 (by will):

Use 'cc' for the C compiler instead of 'gcc'.

Sponsored by: Spectra Logic
MFSpectraBSD: 1079507 on 2014/07/24

274543 15-Nov-2014 ngie

MFC r273627,r273628:

r273627:

- Print out "Bail out!" in die(..) so prove terminates immediately
- Handle the output from newer versions of openssl md5, similar to what
pjd@ did in r248304

Sponsored by: EMC / Isilon Storage Division

r273628:

Move the redirection to stderr out of the cmd variable assignment

Putting 2>/dev/null in cmd= escapes the redirection operation, which causes
mdconfig to think it's a filename

Sponsored by: EMC / Isilon Storage Division

273503 23-Oct-2014 ngie

MFC r271349:

Add diagnostic printfs and disable test # 4 on i386

Reviewed by: jmmv, rpaulo
Phabric: D749
PR: 191676
Sponsored by: EMC / Isilon Storage Division

273502 23-Oct-2014 ngie

MFC r271336:

Expand the tests structure in test_small(..) to workaround the
"initializer not constant" warning with gcc

Approved by: jmmv (mentor)
Phabric: D744
Sponsored by: EMC / Isilon Storage Division

271962 22-Sep-2014 trasz

MFC r271459:

Fix ACL tests to correctly work with ZFS; previous version used wrong
paths.

PR: 191545
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

270724 27-Aug-2014 ngie

MFC r270180:

r269906:

Add missing BSD.tests.dist entry for lib/libutil to unbreak installworld with
MK_TESTS == no

Phabric: D555
Approved by: jmmv (mentor, implicit)
Pointyhat to: ngie

r269904:

Integrate lib/libutil into the build/kyua

Remove the .t wrappers

Rename all of the TAP test applications from test-<test> to
<test>_test to match the convention described in the TestSuite
wiki page

humanize_number_test.c:

- Fix -Wformat warnings with counter variables
- Fix minor style(9) issues:
-- Header sorting
-- Variable declaration alignment/sorting in main(..)
-- Fit the lines in <80 columns
- Fix an off by one index error in the testcase output [*]
- Remove unnecessary `extern char * optarg;` (this is already provided by
unistd.h)

Phabric: D555
Approved by: jmmv (mentor)
Obtained from: EMC / Isilon Storage Division [*]
Submitted by: Casey Peel <cpeel@isilon.com> [*]
Sponsored by: EMC / Isilon Storage Division

270285 21-Aug-2014 ngie

MFC r269534:

Integrate lib/libmp into the build/kyua

- Remove the .t wrapper
- Fix -Wreturn-type warnings with clang

This change has been tested on amd64/i386

Phabric: D530
Reviewed by: jmmv
Approved by: jmmv (co--mentor)
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

MFC note: src.opts.mk in the original commit was changed to
bsd.own.mk.

269738 08-Aug-2014 delphij

MFC r269098:

Use the right lengths.

Submitted by: Sascha Wildner

268663 15-Jul-2014 kib

MFC r268385:
Make this compilable on latest Linux'es without warnings.

264996 27-Apr-2014 jmmv

MFC various moves of tools/regressions/ tests to the new infrastructure.

- r263220 Migrate tools/regression/sbin/ to the new tests layout.
- r263222 Add Makefile missed in r263220.
- r263226 Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout.
- r263227 Migrate most of tools/regression/usr.bin/ to the new tests layout.
- r263345 Expand tabs that sneaked in into spaces.
- r263346 Migrate tools/regression/usr.bin/make/ to the new tests layout.
- r263348 Add Makefiles missed in r263346.
- r263351 Migrate tools/regression/usr.bin/pkill/ to the new tests layout.
- r263388 Mark multi_test as requiring /usr/share/dict/words.
- r263814 Fix path to the run.pl script to let these tests run.
- r264742 Prevent building tests when bootstrapping make.

This is 'make tinderbox' clean.


/freebsd-10-stable/Makefile
/freebsd-10-stable/bin/pkill/Makefile
/freebsd-10-stable/bin/pkill/tests
/freebsd-10-stable/etc/mtree/BSD.tests.dist
/freebsd-10-stable/sbin/Makefile
/freebsd-10-stable/sbin/dhclient/Makefile
/freebsd-10-stable/sbin/dhclient/tests
/freebsd-10-stable/sbin/growfs/Makefile
/freebsd-10-stable/sbin/growfs/tests
/freebsd-10-stable/sbin/mdconfig/Makefile
/freebsd-10-stable/sbin/mdconfig/tests
/freebsd-10-stable/sbin/mdconfig/tests/Makefile
/freebsd-10-stable/sbin/mdconfig/tests/legacy_test.sh
/freebsd-10-stable/sbin/tests
/freebsd-10-stable/tools/build/mk/OptionalObsoleteFiles.inc
sbin
usr.bin/Makefile
usr.bin/apply
usr.bin/calendar
usr.bin/comm
usr.bin/file2c
usr.bin/join
usr.bin/jot
usr.bin/lastcomm
usr.bin/m4
usr.bin/make
usr.bin/ncal
usr.bin/pkill
usr.bin/printf
usr.bin/regress.m4
usr.bin/sed
usr.bin/tr
usr.bin/uudecode
usr.bin/uuencode
usr.bin/xargs
usr.bin/yacc
usr.sbin
/freebsd-10-stable/usr.bin/apply/Makefile
/freebsd-10-stable/usr.bin/apply/tests
/freebsd-10-stable/usr.bin/calendar/Makefile
/freebsd-10-stable/usr.bin/calendar/tests
/freebsd-10-stable/usr.bin/comm/Makefile
/freebsd-10-stable/usr.bin/comm/tests
/freebsd-10-stable/usr.bin/file2c/Makefile
/freebsd-10-stable/usr.bin/file2c/tests
/freebsd-10-stable/usr.bin/join/Makefile
/freebsd-10-stable/usr.bin/join/tests
/freebsd-10-stable/usr.bin/jot/Makefile
/freebsd-10-stable/usr.bin/jot/tests
/freebsd-10-stable/usr.bin/lastcomm/Makefile
/freebsd-10-stable/usr.bin/lastcomm/tests
/freebsd-10-stable/usr.bin/m4/Makefile
/freebsd-10-stable/usr.bin/m4/tests
/freebsd-10-stable/usr.bin/make/Makefile
/freebsd-10-stable/usr.bin/make/tests
/freebsd-10-stable/usr.bin/make/tests/Makefile
/freebsd-10-stable/usr.bin/make/tests/archives/Makefile
/freebsd-10-stable/usr.bin/make/tests/archives/fmt_44bsd/Makefile
/freebsd-10-stable/usr.bin/make/tests/archives/fmt_44bsd_mod/Makefile
/freebsd-10-stable/usr.bin/make/tests/archives/fmt_oldbsd/Makefile
/freebsd-10-stable/usr.bin/make/tests/basic/Makefile
/freebsd-10-stable/usr.bin/make/tests/basic/t0/Makefile
/freebsd-10-stable/usr.bin/make/tests/basic/t1/Makefile
/freebsd-10-stable/usr.bin/make/tests/basic/t2/Makefile
/freebsd-10-stable/usr.bin/make/tests/basic/t3/Makefile
/freebsd-10-stable/usr.bin/make/tests/execution/Makefile
/freebsd-10-stable/usr.bin/make/tests/execution/ellipsis/Makefile
/freebsd-10-stable/usr.bin/make/tests/execution/empty/Makefile
/freebsd-10-stable/usr.bin/make/tests/execution/joberr/Makefile
/freebsd-10-stable/usr.bin/make/tests/execution/plus/Makefile
/freebsd-10-stable/usr.bin/make/tests/shell/Makefile
/freebsd-10-stable/usr.bin/make/tests/shell/builtin/Makefile
/freebsd-10-stable/usr.bin/make/tests/shell/meta/Makefile
/freebsd-10-stable/usr.bin/make/tests/shell/path/Makefile
/freebsd-10-stable/usr.bin/make/tests/shell/path_select/Makefile
/freebsd-10-stable/usr.bin/make/tests/shell/replace/Makefile
/freebsd-10-stable/usr.bin/make/tests/shell/select/Makefile
/freebsd-10-stable/usr.bin/make/tests/suffixes/Makefile
/freebsd-10-stable/usr.bin/make/tests/suffixes/basic/Makefile
/freebsd-10-stable/usr.bin/make/tests/suffixes/src_wild1/Makefile
/freebsd-10-stable/usr.bin/make/tests/suffixes/src_wild2/Makefile
/freebsd-10-stable/usr.bin/make/tests/syntax/Makefile
/freebsd-10-stable/usr.bin/make/tests/syntax/directive-t0/Makefile
/freebsd-10-stable/usr.bin/make/tests/syntax/enl/Makefile
/freebsd-10-stable/usr.bin/make/tests/syntax/funny-targets/Makefile
/freebsd-10-stable/usr.bin/make/tests/syntax/semi/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t0/2/1/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t0/2/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t0/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t0/mk/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t1/2/1/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t1/2/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t1/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t1/mk/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t2/2/1/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t2/2/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t2/Makefile
/freebsd-10-stable/usr.bin/make/tests/sysmk/t2/mk/Makefile
/freebsd-10-stable/usr.bin/make/tests/variables/Makefile
/freebsd-10-stable/usr.bin/make/tests/variables/modifier_M/Makefile
/freebsd-10-stable/usr.bin/make/tests/variables/modifier_t/Makefile
/freebsd-10-stable/usr.bin/make/tests/variables/opt_V/Makefile
/freebsd-10-stable/usr.bin/make/tests/variables/t0/Makefile
/freebsd-10-stable/usr.bin/ncal/Makefile
/freebsd-10-stable/usr.bin/ncal/tests
/freebsd-10-stable/usr.bin/printf/Makefile
/freebsd-10-stable/usr.bin/printf/tests
/freebsd-10-stable/usr.bin/sed/Makefile
/freebsd-10-stable/usr.bin/sed/tests
/freebsd-10-stable/usr.bin/sed/tests/Makefile
/freebsd-10-stable/usr.bin/tests/Makefile
/freebsd-10-stable/usr.bin/tests/regress.m4
/freebsd-10-stable/usr.bin/tr/Makefile
/freebsd-10-stable/usr.bin/tr/tests
/freebsd-10-stable/usr.bin/uudecode/Makefile
/freebsd-10-stable/usr.bin/uudecode/tests
/freebsd-10-stable/usr.bin/uuencode/Makefile
/freebsd-10-stable/usr.bin/uuencode/tests
/freebsd-10-stable/usr.bin/xargs/Makefile
/freebsd-10-stable/usr.bin/xargs/tests
/freebsd-10-stable/usr.bin/yacc/Makefile
/freebsd-10-stable/usr.bin/yacc/tests
/freebsd-10-stable/usr.sbin/Makefile
/freebsd-10-stable/usr.sbin/etcupdate/Makefile
/freebsd-10-stable/usr.sbin/etcupdate/tests
/freebsd-10-stable/usr.sbin/newsyslog/Makefile
/freebsd-10-stable/usr.sbin/newsyslog/tests
/freebsd-10-stable/usr.sbin/sa/Makefile
/freebsd-10-stable/usr.sbin/sa/tests
/freebsd-10-stable/usr.sbin/tests
264457 14-Apr-2014 jmmv

MFC various fixes to the tools/regression/ tests.

- r262953 Fix m4 tests so that they run cleanly with prove.
- r262954 Fix printf tests so that they run cleanly with prove.
- r262959 Fix sed tests so that they run cleanly with prove.
- r262960 Fix yacc tests so that they run cleanly with prove.
- r262961 Fix pkill tests so that they run cleanly with prove.
- r262962 Fix ncal tests so that they run cleanly with prove.
- r263081 Fix lastcomm tests under amd64.
- r263082 Only run the make tests when make is fmake.
- r263083 Fix sa tests.
- r263084 Turn a test precondition into a skip in the mdconfig tests.
- r263085 Make the strerror tests work without libtap.
- r263087 Remove broken tests for eui64_line.
- r263221 Change etcupdate tests to return 1 on test failures.
- r263352 Make the priv test program exit with non-zero if any failures are detected.
- r263353 errx prepends the program name to the message; don't do it by hand.
- r263362 Include strings.h so that bpf_filter.c can be built in userland.


/freebsd-10-stable/sys/net/bpf_filter.c
lib/libc/net/Makefile
lib/libc/net/test-eui64_line.c
lib/libc/net/test-eui64_line.t
lib/libc/string/Makefile
lib/libc/string/test-strerror.c
priv/main.c
sbin/mdconfig/00.t
usr.bin/lastcomm/regress.t
usr.bin/lastcomm/v1-amd64.out
usr.bin/lastcomm/v2-amd64.out
usr.bin/m4/regress.gnusofterror.out
usr.bin/m4/regress.sh
usr.bin/m4/regress.t
usr.bin/make/common.sh
usr.bin/ncal/regress.sh
usr.bin/pkill/pgrep-_s.t
usr.bin/printf/regress.sh
usr.bin/sed/regress.sh
usr.bin/yacc/regress.00.out
usr.bin/yacc/regress.01.out
usr.bin/yacc/regress.02.out
usr.bin/yacc/regress.03.out
usr.bin/yacc/regress.04.out
usr.bin/yacc/regress.05.out
usr.bin/yacc/regress.06.out
usr.bin/yacc/regress.07.out
usr.bin/yacc/regress.08.out
usr.bin/yacc/regress.09.out
usr.bin/yacc/regress.10.out
usr.bin/yacc/regress.11.out
usr.bin/yacc/regress.12.out
usr.bin/yacc/regress.13.out
usr.bin/yacc/regress.14.out
usr.bin/yacc/regress.sh
usr.sbin/etcupdate/always.sh
usr.sbin/etcupdate/conflicts.sh
usr.sbin/etcupdate/fbsdid.sh
usr.sbin/etcupdate/ignore.sh
usr.sbin/etcupdate/preworld.sh
usr.sbin/etcupdate/tests.sh
usr.sbin/etcupdate/tzsetup.sh
usr.sbin/sa/regress.t
usr.sbin/sa/v1-amd64-sav.out
usr.sbin/sa/v1-amd64-u.out
usr.sbin/sa/v1-amd64-usr.out
usr.sbin/sa/v1-i386-sav.out
usr.sbin/sa/v1-i386-u.out
usr.sbin/sa/v1-i386-usr.out
usr.sbin/sa/v1-sparc64-sav.out
usr.sbin/sa/v1-sparc64-u.out
usr.sbin/sa/v1-sparc64-usr.out
usr.sbin/sa/v2-amd64-u.out
usr.sbin/sa/v2-i386-u.out
usr.sbin/sa/v2-sparc64-u.out
262951 09-Mar-2014 jmmv

Sync sh(1) in stable/10 to head.

This is a MFC of all the commits listed below.

My original goal of this change was to only merge the move of the tests
from tools/regression/bin/ into the new layout (which include tests for
sh(1) and other tools as well). However, doing so is tricky due to the
ongoing work in sh(1) and, especially, the many changes to its tests
since stable/10 was first branched.

Merging everything is the simplest way to achieve this goal and, as a
bonus point, we get various fixes and miscellaneous improvements into
the branch.

Per jilles' suggestion, I'm avoiding the merge of a couple of changes
(r256850 and r257506) that required depending kernel changes. I'm also
avoiding very recent changes that have not had a long enough time to be
validated in current.

This is "make tinderbox" clean.

r256735 sh: Remove one syscall when waiting for a foreground job.
r257399 sh: Allow trapping SIGINT/SIGQUIT after ignore because of '&'.
r257504 sh: Reorder union node to reduce its size on 64-bit platforms.
r257920 sh: Add a test case for would-be assignments that are not due to quoting.
r257929 sh: Properly quote alias output from command -v.
r258489 sh: Add tests for the </dev/null implicit in a background command.
r258533 sh: Add more tests for the </dev/null implicit in a background command.
r258535 sh: Make <&0 disable the </dev/null implicit in a background command.
r258776 sh: Prefer memcpy() to strcpy() in most cases. Remove the scopy macro.
r259047 sh: Split set -x output into a separate function.
r259210 Migrate tools/regression/bin/ tests to the new layout.
r259844 sh: Remove an unused variable.
r259846 sh: Initialize OPTIND=1 even if it came from the environment.
r259874 sh: Simplify code related to PPID variable.
r259946 sh: Don't check input for non-whitespace if history is disabled.
r260246 sh(1): Discourage use of -e.
r260506 Run the sh(1) and test(1) tests as unprivileged.
r260586 Mark the bin/pax tests as requiring perl.
r260634 Use TAP_TESTS_PERL to register the legacy_test in bin/pax.
r260635 Replace hand-crafted Kyuafiles with automatic generation.
r260654 sh: Remove SIGWINCH handler and just check for resize before every read.
r261121 sh: Add test for nested alias.
r261125 sh: Solve the alias recursion problem in a less hackish way.
r261141 sh: Do not depend on parse/execute split in new alias test.
r261160 sh: Add tests for alias names after another alias.
r261192 sh: Allow aliases to force alias substitution on the following word.
r262533 sh: Make expari() static.
r262565 sh: Do not corrupt internal representation if LINENO inner expansion fails.
r262697 sh: Simplify expari().

Reviewed by: jilles


/freebsd-10-stable/bin/Makefile
/freebsd-10-stable/bin/date/Makefile
/freebsd-10-stable/bin/date/tests
/freebsd-10-stable/bin/mv/Makefile
/freebsd-10-stable/bin/mv/tests
/freebsd-10-stable/bin/pax/Makefile
/freebsd-10-stable/bin/pax/tests
/freebsd-10-stable/bin/pax/tests/Makefile
/freebsd-10-stable/bin/pax/tests/legacy_test.pl
/freebsd-10-stable/bin/pax/tests/legacy_test.sh
/freebsd-10-stable/bin/sh/Makefile
/freebsd-10-stable/bin/sh/alias.c
/freebsd-10-stable/bin/sh/cd.c
/freebsd-10-stable/bin/sh/eval.c
/freebsd-10-stable/bin/sh/exec.c
/freebsd-10-stable/bin/sh/expand.c
/freebsd-10-stable/bin/sh/expand.h
/freebsd-10-stable/bin/sh/input.c
/freebsd-10-stable/bin/sh/jobs.c
/freebsd-10-stable/bin/sh/memalloc.c
/freebsd-10-stable/bin/sh/mystring.c
/freebsd-10-stable/bin/sh/mystring.h
/freebsd-10-stable/bin/sh/nodetypes
/freebsd-10-stable/bin/sh/parser.c
/freebsd-10-stable/bin/sh/parser.h
/freebsd-10-stable/bin/sh/redir.c
/freebsd-10-stable/bin/sh/sh.1
/freebsd-10-stable/bin/sh/show.c
/freebsd-10-stable/bin/sh/tests
/freebsd-10-stable/bin/sh/tests/Makefile
/freebsd-10-stable/bin/sh/tests/builtins/Makefile
/freebsd-10-stable/bin/sh/tests/builtins/command3.0.stdout
/freebsd-10-stable/bin/sh/tests/builtins/command5.0.stdout
/freebsd-10-stable/bin/sh/tests/builtins/command6.0.stdout
/freebsd-10-stable/bin/sh/tests/builtins/lineno2.0
/freebsd-10-stable/bin/sh/tests/parameters/Makefile
/freebsd-10-stable/bin/sh/tests/parameters/optind2.0
/freebsd-10-stable/bin/sh/tests/parser/Makefile
/freebsd-10-stable/bin/sh/tests/parser/alias11.0
/freebsd-10-stable/bin/sh/tests/parser/alias12.0
/freebsd-10-stable/bin/sh/tests/parser/alias13.0
/freebsd-10-stable/bin/sh/tests/parser/alias14.0
/freebsd-10-stable/bin/sh/tests/parser/alias15.0
/freebsd-10-stable/bin/sh/tests/parser/alias15.0.stdout
/freebsd-10-stable/bin/sh/trap.c
/freebsd-10-stable/bin/sh/trap.h
/freebsd-10-stable/bin/sh/var.c
/freebsd-10-stable/bin/sh/var.h
/freebsd-10-stable/bin/test/Makefile
/freebsd-10-stable/bin/test/tests
/freebsd-10-stable/bin/test/tests/Makefile
/freebsd-10-stable/bin/tests
/freebsd-10-stable/etc/mtree/BSD.tests.dist
bin
261857 13-Feb-2014 asomers

MFC r261081, r261133, and r261615

r261081
Replace the old unix_seqpacket and unix_seqpacket_exercise
tests, which were a little broken and not automatable, with
unix_seqpacket_test. It's coverage is a superset of the old
tests and it uses ATF. It includes test cases for bugs
kern/185813 and kern/185812.

r261133
Fix the Makefiles so that the tests I submitted in r261081 will
actually get built.

r261615
tests/sys/Makefile
use TESTS_SUBDIRS for kern instead of SUBDIRS. I don't
think it makes a difference in this case, but
TESTS_SUBDIRS is generally correct for subdirectories
that contain tests.

261828 13-Feb-2014 brueffer

MFC: r261566

Use CAP_EVENT instead of the deprecated CAP_POLL_EVENT.

PR: 185382 (based on)
Submitted by: Loganaden Velvindron
Reviewed by: pjd

260728 16-Jan-2014 avg

MFC r258352: fsx: add an option to randomly call msync(MS_INVALIDATE)

260725 16-Jan-2014 avg

MFC r258351: fsx: new option to disable msync(MS_SYNC) after each write

259960 27-Dec-2013 jhb

MFC 258063,258064,258066,258097,258185,259134:
- Add an -s option to the regression tests that specifies a path to an
alternate etcupdate.sh script to test. This allows a non-installed
version of the script to be tested more easily.
- Add a pre-world mode of updating similar to the -p option that can be
passed to mergemaster.
- Fix a couple of issues with -F:
- Fix ALWAYS_INSTALL to take precedence over the FreeBSD ID checks.
- Fix the -F option in the case that the only upstream change is a
change in the FreeBSD ID and the local file is removed.
- Refresh /etc/localtime after each update using tzsetup -r.
- Regenerate /var/db/services.db when /etc/services changes.

259443 16-Dec-2013 eadler

MFC r259132,r259133,r259143:
Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i'
as a case insensitive flag.

Add regression test for recently added 'i' flag in r259132.

the i modifier was added in r259132 since POSIX recently agreed to add
it. Switch uses of /I to /i.

PR: standards/184641

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


256130 07-Oct-2013 jmg

don't assert on bad args, instead return an error..

Since so many programs don't check return value, always NUL terminate
the buf...

fix rounding when using base 1024 (the bug that started it all)...

add a set of test cases so we can make sure that things don't break
in the future...

Thanks to Clifton Royston for testing and the test program...

Approved by: re (hrs, glebius)
MFC after: 1 week


255570 14-Sep-2013 trasz

Bring in the new iSCSI target and initiator.

Reviewed by: ken (parts)
Approved by: re (delphij)
Sponsored by: FreeBSD Foundation


255451 10-Sep-2013 emaste

Add a sendfile regression test for transmit length > file size.

This test identified the issue fixed in FreeBSD-SA-13:11.sendfile.

Sponsored by: The FreeBSD Foundation
Approved by: re (glebius)


255303 06-Sep-2013 jilles

libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a).

Austin Group issue #411 requires 'e' to be accepted before and after 'x',
and encourages accepting the characters in any order, except the initial
'r', 'w' or 'a'.

Given that glibc accepts the characters after r/w/a in any order and that
diagnosing this problem may be hard, change our libc to behave that way as
well.


255302 06-Sep-2013 jilles

libc/stdio: Run mkostemp test using prove.


255301 06-Sep-2013 jilles

libc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream.

A *.t file should provide Test Anything Protocol output so that it can be
run using the Perl "prove" tool.


255215 04-Sep-2013 jilles

sh: Make return return from the closest function or dot script.

Formerly, return always returned from a function if it was called from a
function, even if there was a closer dot script. This was for compatibility
with the Bourne shell which only allowed returning from functions.

Other modern shells and POSIX return from the function or the dot script,
whichever is closest.

Git 1.8.4's rebase --continue depends on the POSIX behaviour.

Reported by: Christoph Mallon, avg


255072 30-Aug-2013 jilles

sh: Recognize "--" as end of options in type builtin.

This implementation makes minimal changes: command names starting with "-"
(other than "--") can still be queried normally.


254888 25-Aug-2013 jilles

Fix fcntl F_GETFL F_SETFL for files opened execute-only (O_EXEC).

The FFLAGS and OFLAGS now work correctly also for files opened with O_EXEC.
Except possibly fuse, the other users pass values without O_EXEC set. fuse
appears to assume O_EXEC is handled correctly.

Although F_SETFL may not be commonly used for execute-only file descriptors,
F_GETFL may be useful to find the access mode.


254849 25-Aug-2013 jilles

sh: Recognize "--" as end of options in alias builtin.

Aliases starting with "-" (which are non-POSIX) will need to be preceded by
an alias not starting with "-" or the newly added "--".


254843 25-Aug-2013 jilles

sh: Disallow empty simple commands.

As per POSIX, a simple command must have at least one redirection,
assignment word or command word.

These occured in rare cases such as eval "f()" .

The extension of allowing no commands inside { }, if, while, for, etc.
remains.


254806 24-Aug-2013 jilles

sh: Reject ++ and -- in arithmetic.

POSIX does not require ++ and -- in arithmetic. It is probably more useful
to reject them than to treat ++x and --x as x silently.

Note that the behaviour of increment and decrement can be obtained via
(x+=1), ((x+=1)-1), (x-=1) and ((x-=1)+1).

PR: bin/176444


254413 16-Aug-2013 jilles

sh: Recognize "--" as end of options in bg/fg/jobid builtins.


254412 16-Aug-2013 jilles

sh: Add test for the non-standard jobid builtin.


254411 16-Aug-2013 jilles

Add tests for dup3().


254339 14-Aug-2013 jilles

sh: Recognize "--" as end of options in local builtin.


254335 14-Aug-2013 jilles

sh: Allow a lone redirection before '|', ';;' or ';&'.

Example: </dev/null | :

PR: 181240
MFC after: 1 week


254231 11-Aug-2013 jilles

fnmatch(): Add test for r254091 (pattern with single backslash).

This test cannot be converted to an sh(1) test because the syntax would be
invalid.

PR: 181129
MFC after: 1 week


254151 09-Aug-2013 jilles

Add mkostemp() and mkostemps().

These are like mkstemp() and mkstemps() but allow passing open(2) flags like
O_CLOEXEC.


253581 23-Jul-2013 jilles

wordexp(): Fix syntax validation for backslashes in single-quotes.


253526 21-Jul-2013 kib

Fix several warnings.
Fix crash in aio_pty_cleanup() by initializing the pointer before
dereferencing.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


253447 18-Jul-2013 kevlo

Include stdint.h when use intmax_t.

Reported by: bde


253442 18-Jul-2013 kevlo

Replace PRId64 with "jd" in a printf call. Cast the corresponding value to
intmax_t, because the original type is off_t.

Reported by: bde


253403 17-Jul-2013 kevlo

Add missing headers.


253402 17-Jul-2013 kevlo

Use PRId64 instead of %gd to print an int64_t.


253386 16-Jul-2013 kevlo

Need to define NO_MAN here.


253385 16-Jul-2013 kevlo

Use MAN= instead of NO_MAN=

For some reason it still tries to install a priv.1 when using NO_MAN,
even though there isn't one yet.


253384 16-Jul-2013 kevlo

Add missing header needed by sleep(3).


253271 12-Jul-2013 jilles

sh: Do not read from stdin if an error occurs during -i -c cmd.

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.


251867 17-Jun-2013 eadler

Restore "all rights reserved" (spelled correctly). This was actually part of the standard text of the license which I did not realize prior.

Approved by: bushman


251818 16-Jun-2013 eadler

Remove lines declaring "All rights reserved" or similar comments: they
are not true as the files are actually under the BSD-2 license

Approved by: bushman


251797 15-Jun-2013 jilles

sh: Add tests for 'local -' (save shell options).


251598 10-Jun-2013 das

Fix some bugs in the complex trig tests so that they test both double
and float precision properly.


251558 08-Jun-2013 ed

Add testing utility for behavior of atomic ops.

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.


251430 05-Jun-2013 jilles

sh: Return status 127 for unknown jobs in wait builtin.

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


251429 05-Jun-2013 jilles

sh: Allow multiple operands in wait builtin.

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


251368 04-Jun-2013 obrien

Match the options of the kernel.


251314 03-Jun-2013 ed

Add libiconv based versions of *c16*() and *c32*().

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


251293 03-Jun-2013 das

Add more tests for log functions. A few are commented out because the
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.)


251241 02-Jun-2013 das

Factor out some common code from the libm tests. This is a bit messy
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.


251208 31-May-2013 jilles

test: Remove -ntXY and -otXY primaries.

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.


251180 31-May-2013 jilles

sh: Add test cases for break outside a loop.

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.


251174 31-May-2013 obrien

Different approach to making all compilers happy.


251173 31-May-2013 obrien

Allow building with clang (which is being really stupid here...).


251120 30-May-2013 das

Fix some harmless bugs in a test.


251119 30-May-2013 das

Basic tests for complex inverse trig and hyperbolic functions.


251053 28-May-2013 tijl

Fix cexp regression tests that have an infinite real part. The signs of the
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


251024 27-May-2013 das

Fix some regressions caused by the switch from gcc to clang. The fixes
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.


250989 25-May-2013 ed

Add missing #includes, to keep Clang silent.


250883 21-May-2013 ed

Add <uchar.h>.

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


250827 20-May-2013 jilles

popen(): Add 'e' mode character to set close-on-exec on the new fd.

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+".


250825 20-May-2013 jilles

Add a test program for popen().


250544 12-May-2013 peter

Tidy up some CVS workarounds.


250530 11-May-2013 jilles

Add simple testcases for fcntl(F_DUP2FD_CLOEXEC).


250513 11-May-2013 jilles

Add simple testcases for fcntl(F_DUPFD_CLOEXEC).


250512 11-May-2013 jilles

Add missing argument to fcntl(F_DUPFD) in regression test.


250242 04-May-2013 stefanf

Add a few xargs tests related to -0, -n and quoting.


250222 03-May-2013 jilles

sh: Remove racy test case for read builtin.

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.


250214 03-May-2013 jilles

sh: Improve error handling in read builtin:

* 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.


249594 17-Apr-2013 pjd

Style cleanups.


249582 17-Apr-2013 gabor

- Correct mispellings of the word occurrence

Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)


249407 12-Apr-2013 jilles

sh: Don't modify exit status when break/continue/return passes !.

This matches what would happen if ! P were to be replaced with
if P; then false; else true; fi.

Example:
f() { ! return 0; }; f


249220 06-Apr-2013 jilles

sh: Add a variation on builtins/eval4.0 where the cmdsubst returns 0.


248987 01-Apr-2013 jilles

wordexp(): Remove wrong IFS usage.

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.


248603 21-Mar-2013 pjd

Update regression tests after adding chflagsat(2).

Sponsored by: The FreeBSD Foundation


248597 21-Mar-2013 pjd

- Make 'flags' argument to chflags(2), fchflags(2) and lchflags(2) of type
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


248396 16-Mar-2013 pjd

Update the tests now that absence of the O_APPEND flag requires CAP_SEEK
capability. Add some more tests.

Sponsored by: The FreeBSD Foundation


248394 16-Mar-2013 pjd

The mode argument for open(2)/openat(2) only makes sense if the O_CREAT flag
was given.

Sponsored by: The FreeBSD Foundation


248349 15-Mar-2013 jilles

sh: Recognize "--" and explicitly reject options in wait builtin.

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.


248304 15-Mar-2013 pjd

Make file name generation to work with both new and old versions of OpenSSL.

Sponsored by: The FreeBSD Foundation


247720 03-Mar-2013 jilles

sh: When executing a trap, keep exit status along with evalskip.

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.


247676 02-Mar-2013 pjd

If all ioctls are allowed, cap_ioctls_get(2) will return CAP_IOCTLS_ALL.
Update regression tests.


247669 02-Mar-2013 pjd

Add support for bindat(2) and connectat(2).

Sponsored by: The FreeBSD Foundation


247606 02-Mar-2013 pjd

Add regression tests for the new Capsicum system calls.

Sponsored by: The FreeBSD Foundation


247605 02-Mar-2013 pjd

Update existing regression tests after Capsicum overhaul.


247411 27-Feb-2013 jhb

Add an implementation of open_memstream() and open_wmemstream(). These
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


247274 25-Feb-2013 peterj

Enhance test(1) by adding provision to compare any combination of the
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


247206 23-Feb-2013 jilles

sh: If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.


247190 23-Feb-2013 jilles

sh: Test that the exit status is 1 if read encounters EOF.


246670 11-Feb-2013 pluknet

Major update for unix_cmsg from Andrey Simonenko.

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


246206 01-Feb-2013 gahr

- Fix more style(9)-related issues (copyright header, spaces after function
names, unnecessary casts)
- Change type of boolean variable from char to bool

Suggested by: jhb, zont, jmallett
Reviewed by: cognet
Approved by: cognet


246148 31-Jan-2013 gahr

- Remove underscores from the internal structure name, as it doesn't collide
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


246120 30-Jan-2013 gahr

Add fmemopen(3), an interface to get a FILE * from a buffer in memory, along
with the respective regression test.
See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html

Reviewed by: cognet
Approved by: cognet


245422 14-Jan-2013 jilles

sh: Pass $? to command substitution containing compound/multiple commands.

Example:
false; echo $(echo $?; :)


245392 13-Jan-2013 jilles

sh: Add testcase that $? is preserved into a simple command substitution.

The test builtins/trap6.0 already uses this but having it separate eases
diagnosis if this would break.


245383 13-Jan-2013 jilles

sh: Add some testcases related to subshells.

These failed in earlier attempts to execute more subshells without forking.
The patches are uncommitted.


245382 13-Jan-2013 jilles

sh: Fix crash when parsing '{ } &'.

MFC after: 1 week


245381 13-Jan-2013 jilles

sh: Don't lose $? when backquoted command ends with semicolon or newline.

An empty simple command was added and overwrote the exit status with 0.

This affects `...` but not $(...).

Example:
v=`false;`; echo $?


244924 01-Jan-2013 jilles

sh: Fix a Subversion property.

Test scripts should have keywords; only pure output that must match exactly
should have keywords disabled.


244409 18-Dec-2012 eadler

Add an additional regression tests for other cases to ensure these do not get fixed by accident.


244407 18-Dec-2012 eadler

POSIX requires that non-existent or null arguments be treated as if a
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


244162 12-Dec-2012 jilles

sh: Detect and flag write errors on stdout in builtins.

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


244038 08-Dec-2012 jilles

libc: Add a missing header to a test program.

Usage of dup(), mkstemp() and unlink() needs <unistd.h>.


243346 20-Nov-2012 emaste

Non-void function should return a value.

Found by: clang


243319 20-Nov-2012 emaste

Remove unused variable.


243316 19-Nov-2012 emaste

Use '%zu' and '%zd' as appropriate for size_t / ssize_t.


243314 19-Nov-2012 emaste

Zero the whole struct not just the size of a pointer.

Found by: clang


243313 19-Nov-2012 emaste

Use '%zd' format specifier for ssize_t

Found by: clang


243312 19-Nov-2012 emaste

Use '%zd' printf format for ssize_t.


243252 18-Nov-2012 jilles

sh: Apply rlimits to parser/alias10.0 so it fails fast.

Requested by: uqs


242767 08-Nov-2012 jilles

sh: Add tests for modifying an alias (r242766).

Note: parser/alias10.0 will eat a lot of memory/cpu time when it fails (with
the old sh).


242721 07-Nov-2012 jilles

sh: Test that a redefined alias works.


242157 26-Oct-2012 obrien

Test both active and non-active cases.


242137 26-Oct-2012 obrien

Iterate rather than use recursion. We can blow out the kernel stack if there
is a long chain of fork(2)s.


241844 22-Oct-2012 eadler

remove duplicate semicolons where possible.

Approved by: cperciva
MFC after: 1 week


241832 22-Oct-2012 eadler

Covert regression test to python 3

Approved by: cperciva
MFC after: 3 days


241394 10-Oct-2012 kevlo

Revert previous commit...

Pointyhat to: kevlo (myself)


241370 09-Oct-2012 kevlo

Prefer NULL over 0 for pointers


240944 26-Sep-2012 emaste

Add regression test for kern/172075.

Sponsored by: ADARA Networks
PR: kern/172075


240825 22-Sep-2012 jilles

sh: Add some tests for aliasing a utility to itself.


239160 09-Aug-2012 jilles

nftw(): POSIX says directories causing loops should be silently skipped.

Formerly, loops caused nftw() to abort the traversal with ELOOP.


238469 15-Jul-2012 jilles

sh: Add a simple test for the "local" builtin.


238468 15-Jul-2012 jilles

sh: Expand assignment-like words specially for export/readonly/local.

Examples:
export x=~
now expands the tilde
local y=$1
is now safe, even if $1 contains IFS characters or metacharacters.

For a word to "look like an assignment", it must start with a name followed
by an equals sign, none of which may be quoted.

The special treatment applies when the first word (potentially after
"command") is "export", "readonly" or "local". There may be quoting
characters but no expansions. If "local" is overridden with a function there
is no special treatment ("export" and "readonly" cannot be overridden with a
function).

If things like
local arr=(1 2 3)
are ever allowed in the future, they cannot call a "local" function. This
would either be a run-time error or it would call the builtin.

This matches Austin Group bug #351, planned for the next issue of POSIX.1.

PR: bin/166771


238430 13-Jul-2012 jilles

sh: Add tests where "export" does not parse differently.

It is planned to expand variable assignments as assignments (no word
splitting, different tilde expansion) when they follow a "declaration
utility" (export, readonly or local). However, a quoted character cannot be
part of a "name" so things like \v=~ are not assignments, and the existing
behaviour applies.


238423 13-Jul-2012 jhb

The etcupdate utility is a tool for managing updates to files that are
not updated as part of `make installworld' such as files in /etc. It
manages updates by doing a three-way merge of changes made to these files
against the local versions. It is also designed to minimize the amount
of user intervention with the goal of simplifying upgrades for clusters
of machines.

The primary difference from mergemaster is that etcupdate requires less
manual work. The primary difference from etcmerge is that etcupdate
updates files in-place similar to mergemaster rather than building a
separate /etc tree.

Requested by: obrien, kib, theraven, joeld (among others)


238143 05-Jul-2012 obrien

Remove the "funny targets" make check. We no longer need embedded :: targets
to build FreeBSD (they are used in Perl man pages). We never needed embedded
"!" in targets that I can find.

We got this from OpenBSD and I cannot find any other make that supports
such things -- contrary to their commit message claim: "This behaviour
is also consistent with other versions of make.".


238110 04-Jul-2012 pjd

Recognize 'none' or '0' as no flags.


237794 29-Jun-2012 obrien

Support also running a 32-bit test on 64-bit platforms.


237344 20-Jun-2012 obrien

Provide a mechanism to not clear out the work and output dirs when
developing tests.


236977 12-Jun-2012 obrien

Add a test for the :tl & :tu modifiers.


236771 08-Jun-2012 jilles

sh: Do not assume that SIGPIPE will only kill a subshell in builtins/wait3.0
test.

POSIX says that SIGPIPE affects a process and therefore a SIGPIPE caused and
received by a subshell environment may or may not affect the parent shell
environment.

The change assumes that ${SH} is executed in a new process. This must be the
case if it contains a slash and everyone appears to do so anyway even though
POSIX might permit otherwise.

This change makes builtins/wait3.0 work in ksh93.


236620 05-Jun-2012 obrien

Correct examples to the latest version I had.


236594 04-Jun-2012 obrien

Add a regression test for filemon(4) [r236592].


236347 31-May-2012 obrien

Add regression test for '-V' command line option (requires r236346).


236339 30-May-2012 obrien

make it easier to test newly-built make.


235723 21-May-2012 bapt

Import byacc from invisible island, it brings us lots of compatibilities with
bison, keeping full compatibility with our previous yacc implementation.

Also bring the ability to create reentrant parser

This fix bin/140309 [1]

PR: bin/140309 [1]
Submitted by: Philippe Pepiot <ksh@philpep.org> [1]
Approved by: des (mentor)
MFC after: 1 month


235719 21-May-2012 kevlo

According to shared memory man pages, advice including <sys/types.h>
instead of <sys/param.h>


234852 30-Apr-2012 bapt

Import m4 regression tests from OpenBSD

Obtained from: OpenBSD
Approved by: des (mentor)


233974 07-Apr-2012 das

Add some tests from PR 166463. Also make sure that all of the tests,
old and new, check the sign bits of both the remainder and the
quotient.


232839 11-Mar-2012 jilles

sh: Add a test for variables with underscores in arithmetic.

Things like $((_x+1)) are broken in stable/8 sh but work in stable/9 and
head.


232364 01-Mar-2012 hselasky

Add regression test for USB enumeration.

MFC after: 1 week


232312 29-Feb-2012 brueffer

Fix order of arguments to lseek().

PR: 160867
Submitted by: Henning Petersen <henning.petersen@t-online.de>
MFC after: 1 week


232184 26-Feb-2012 jilles

Check fchmod()/fchown() in fifo_misc test.


231984 21-Feb-2012 jilles

libc: Add some tests for fmtmsg().


231855 17-Feb-2012 bz

Add regression tests for the setsockopt(2) SO_SETFIB socket option.

Check that the expected domain(9) families all handle the socket option
correctly and do proper bounds checks. This would catch bugs as fixed
in (r230938,)r230981.

Sponsored by: Cisco Systems, Inc.


231544 12-Feb-2012 fjoe

Include target names in diagnostic output.

Submitted by: Garrett Cooper


231535 11-Feb-2012 jilles

sh: Make 'hash' return 1 if at least one utility is not found.

Reported by: lme


230591 26-Jan-2012 trasz

More mdconfig(8) tests.


230533 25-Jan-2012 trasz

Move mdconfig(8) tests under regression/sbin/, where they belong.

Submitted by: jh@


230505 24-Jan-2012 trasz

Add some basic regression tests for mdconfig(8).


230463 22-Jan-2012 jilles

sh: Fix $? in the first command of a 'for'.

In the first command of a 'for', $? should be the exit status of the last
pipeline (command substitution in the word list or command before 'for'),
not always 0.


230368 20-Jan-2012 das

These tests check whether the compiler evaluates floating-point
expressions properly. Some of the tests depend on the compiler
implementing C99's FENV_ACCESS pragma, and only commercial compilers
do; those tests are currently skipped. If any of the enabled tests
fail, then odds are the libm regression tests will fail also.
This should make it easier to diagnose reported problems on platforms
I don't have.

Currently, gcc passes all the tests that don't depend on FENV_ACCESS
on amd64 and sparc64. Clang fails a few on amd64 (see clang bug
11406). Both gcc and clang fare poorly on i386, which has well-known
issues.


230212 16-Jan-2012 dumbbell

sh: Fix execution of multiple statements in a trap when evalskip is set

Before this fix, only the first statement of the trap was executed if
evalskip was set. This is for example the case when:
o "-e" is set for this shell
o a trap is set on EXIT
o a function returns 1 and causes the script to abort

Reviewed by: jilles
MFC after: 2 weeks


230211 16-Jan-2012 dumbbell

sh: Test EXIT trap with multiple statements in it

Reviewed by: jilles
MFC after: 2 weeks


230161 15-Jan-2012 jilles

sh: Fix some bugs with exit status from case containing ;&.

Also, rework evalcase() to not evaluate any tree. Instead, return the
NCLISTFALLTHRU node and handle it in evaltree().

Fixed bugs:

* If a ;& list with non-zero exit status is followed by an empty ;; or final
list, the exit status of the case command should be equal to the exit
status of the ;& list, not 0.

* An empty ;& case should not reset $?.


230154 15-Jan-2012 jilles

sh: Fix two bugs with case and exit status:

* If no pattern is matched, POSIX says the exit status shall be 0 (even if
there are command substitutions).
* If a pattern is matched and there are no command substitutions, the first
command should see the $? from before the case command, not always 0.


230121 14-Jan-2012 jilles

sh: Add testcases that should not be broken by future optimizations.


230115 14-Jan-2012 das

Add .t files for tests, missed in prior checkins, so that prove(1) works
in this directory.


230114 14-Jan-2012 das

Update the tests for arm and other ports where long double is the same
as double, similar to r178141.


230102 14-Jan-2012 das

Fix a test that doesn't work on architectures where long double is no
wider than double. Thanks to Ian Lepore for catching the bug.


230095 13-Jan-2012 jilles

sh: Properly show "Not a directory" error in cd builtin.

The errno message display added in r222292 did not take attempting to
cd to a non-directory or something that cannot be stat()ed into account.

PR: bin/164070
MFC after: 10 days


229742 06-Jan-2012 jilles

sh: Avoid possible echo options in a testcase.


229656 05-Jan-2012 uqs

Convert files over to UTF-8.

These files contained various combinations of Big5, eucJP and KOI8-U
encoded strings. The byte representations of their respective encodings
have been translated to $'...' escape sequences as understood by our sh(1).

With help from: jilles


229001 30-Dec-2011 dumbbell

Adapt testsuite following change in Domain Search error handling

In this testsuite, warning() and error() have the same behaviour.

PR: bin/163431
Sponsored by: Yakaz (http://www.yakaz.com)


228975 30-Dec-2011 uqs

Spelling fixes for tools/

Add some $FreeBSD$ tags so svn will allow the commit.


228953 29-Dec-2011 uqs

Reencode files from latin1 to UTF-8.


228943 28-Dec-2011 jilles

sh: Allow quoting ^ and ] in bracket expressions.


228873 25-Dec-2011 jilles

sh: Add some testcases for pasting $*/$@ directly to a literal.

This also passes on stable/8.


228524 15-Dec-2011 fjoe

Fix last-minute typo.


228523 15-Dec-2011 fjoe

Add job error output test.

make(1) with openpty() currently fails this test: there's a race condition
and error output is sometimes lost.


228512 14-Dec-2011 jilles

Add a test for r228510.


228371 09-Dec-2011 jhb

- Add a test for PR 151758.
- While here, make this compile and work on non-i386:
- Use CMSG_SPACE(), CMSG_LEN(), and CMSG_FIRSTHDR() instead of ignoring
padding between 'struct cmsghdr' and control message payloads.
- Don't initialize the control message before calling recvmsg().
Instead, check that we get a valid control message on return from
recvmsg().
- Use errx() instead of err() for some errors that don't report failures
that set errno.

Requested by: kib (1)


228274 05-Dec-2011 eadler

Fix some uninitialized variables in pipe regression tests that result in
failure.

PR: misc/161175
Submitted by: gianni@
Approved by: nwhitehorn@
MFC after: 1 week


228259 04-Dec-2011 dumbbell

Support domain-search in dhclient(8)

The "domain-search" option (option 119) allows a DHCP server to publish
a list of implicit domain suffixes used during name lookup. This option
is described in RFC 3397.

For instance, if the domain-search option says:
".example.org .example.com"
and one wants to resolve "foobar", the resolver will try:
1. "foobar.example.org"
2. "foobar.example.com"

The file /etc/resolv.conf is updated with a "search" directive if the
DHCP server provides "domain-search".

A regression test suite is included in this patch under
tools/regression/sbin/dhclient.

PR: bin/151940
Sponsored by Yakaz (http://www.yakaz.com)


228177 01-Dec-2011 kib

Add a simple test for pipe inode numbers reported by fstat(2).

Submitted by: gianni
MFC after: 1 week


228149 30-Nov-2011 fjoe

Add three execution tests for make(1):
- plus: execute "+command" when run with -jX -n
- ellipsis: ellipsis ("...") from variable
- empty: empty command (from variable)

Currently make(1) fails all three tests:
- plus: segmentation fault due to incorrect command list handling
- ellipsis: works in compat mode but fails in job (-jX) mode
- empty:
- compat mode: prints error message
- job mode: works but prints empty string


228109 28-Nov-2011 jilles

test: Add more testcases.

The new testcases pass even on old stable/7, but some other implementations
manage to get them wrong.

Also remove a few duplicate testcases.


228007 26-Nov-2011 jilles

sh: Add tests for some corner cases of 'case' exit status.

These already work properly.


227773 20-Nov-2011 jilles

sh: Allow unsetting OPTIND.

Note that only assigning the decimal value 1 resets getopts, as before.


227522 15-Nov-2011 das

A regression test to ensure that arc4random returns different sequences
in parent and child processes after a fork.


227124 05-Nov-2011 jilles

fifo_misc test: Fix swapped lseek arguments.

It worked regardless because SEEK_CUR happens to be 1.


226892 28-Oct-2011 jilles

sh: Add test for exit status of for loop without items.

POSIX says the exit status of a for loop without any items shall be 0. There
are no exceptions if the exit status of the previous command was not 0 or if
the item list contains a command substitution with non-zero exit status.


226729 25-Oct-2011 pjd

Fix resize regressions tests - we need to destroy BSDlabel before we can
create GPT.

MFC after: 3 days


226605 21-Oct-2011 das

Add regression tests for modf{,f,l}().


226603 21-Oct-2011 das

Tests for complex trig and hyperbolic functions.


226602 21-Oct-2011 das

Tests for cancellation in fma(). Also include more tests for 128-bit
long doubles. Thanks for clusteradm (simon) for making the needed
hardware available.


226523 18-Oct-2011 jilles

Fix some memory errors in *at() regression tests.


226378 15-Oct-2011 das

Add some tests for corner cases of log() in unusual rounding modes.
I wrote these ages ago, but they've been failing until now.


226377 15-Oct-2011 das

Add some tests for double-rounding bugs in fma().


225044 20-Aug-2011 bz

Add support for IPv6 to ipfw fwd:
Distinguish IPv4 and IPv6 addresses and optional port numbers in
user space to set the option for the correct protocol family.
Add support in the kernel for carrying the new IPv6 destination
address and port.
Add support to TCP and UDP for IPv6 and fix UDP IPv4 to not change
the address in the IP header.
Add support for IPv6 forwarding to a non-local destination.
Add a regession test uitilizing VIMAGE to check all 20 possible
combinations I could think of.

Obtained from: David Dolson at Sandvine Incorporated
(original version for ipfw fwd IPv6 support)
Sponsored by: Sandvine Incorporated
PR: bin/117214
MFC after: 4 weeks
Approved by: re (kib)


224989 18-Aug-2011 jonathan

Test process descriptors.

Ensure that process descriptors work as expected. We should be able to:
- pdfork(), like regular fork(), but producing a process descriptor
- pdgetpid() to convert a PD into a PID
- pdkill() to send signals to a process identified by a PD

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc


224910 16-Aug-2011 jonathan

poll(2) implementation for capabilities.

When calling poll(2) on a capability, unwrap first and then poll the
underlying object.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc


224797 12-Aug-2011 jonathan

Rename CAP_*_KEVENT to CAP_*_EVENT.

Change the names of a couple of capability rights to be less
FreeBSD-specific.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc


224793 12-Aug-2011 jonathan

Test *at(2) calls with capability-mode lookup.

This commit adds regression testing for openat(), fstatat(), etc. with
capability scoping ("strict relative" lookup), which applies:
- in capability mode
- when performing any *at() lookup relative to a capability

These tests will fail until the *at() code is committed; on my local
instance, with the *at() changes, they all pass.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc


224784 11-Aug-2011 jonathan

Use the right printf() format string without a cast to maxint_t.

As per kib's suggestion, we also change test_count from a size_t to an int;
its value at the moment is 4, and we only expect it to go up to 7.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc


224778 11-Aug-2011 rwatson

Second-to-last commit implementing Capsicum capabilities in the FreeBSD
kernel for FreeBSD 9.0:

Add a new capability mask argument to fget(9) and friends, allowing system
call code to declare what capabilities are required when an integer file
descriptor is converted into an in-kernel struct file *. With options
CAPABILITIES compiled into the kernel, this enforces capability
protection; without, this change is effectively a no-op.

Some cases require special handling, such as mmap(2), which must preserve
information about the maximum rights at the time of mapping in the memory
map so that they can later be enforced in mprotect(2) -- this is done by
narrowing the rights in the existing max_protection field used for similar
purposes with file permissions.

In namei(9), we assert that the code is not reached from within capability
mode, as we're not yet ready to enforce namespace capabilities there.
This will follow in a later commit.

Update two capability names: CAP_EVENT and CAP_KEVENT become
CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they
represent.

Approved by: re (bz)
Submitted by: jonathan
Sponsored by: Google Inc


224688 06-Aug-2011 rwatson

Properly initialise the "len" argument to getsockname(2) in the tcpdrop
regression test so that it works (more) consistently.

Approved by: re (bz)
Sponsored by: Juniper Networks


224660 05-Aug-2011 jonathan

Expect fchflags(2) to fail with EOPNOTSUPP on NFS.

Even if we have CAP_FCHFLAGS, fchflags(2) fails on NFS. This is normal
and expected, so don't fail the test because of it.

Note that, whether or not we are on NFS, fchflags(2) should always fail
with ENOTCAPABLE if we are using a capability that does not have the
CAP_FCHFLAGS right.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc


224653 04-Aug-2011 jonathan

Flesh out the cap_test regression test.

Add more regression testing, some of which is expected to fail until we
commit more kernel implementation.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc


224651 04-Aug-2011 jonathan

Flesh out the cap_test regression test.

Add more regression testing, some of which is expected to fail until we
commit more kernel implementation.

Approved by: re (kib), mentor (rwatson)
Sponsored by: Google Inc


224104 16-Jul-2011 jilles

sh: Add a test for a fairly obscure case with aliases.

This also passes on stable/8.


223907 10-Jul-2011 jilles

posix_spawn: If an error is detected in the child process, reap the zombie.

Formerly, in this case an error was returned but the pid was also returned
to the application, requiring the application to use unspecified behaviour
(the returned pid in error situations) to avoid zombies.

Now, reap the zombie and do not return the pid.

MFC after: 2 weeks


223865 08-Jul-2011 jonathan

Clarify the meaning of a test.

Rather than using err() if either of two failure conditions
fires (which can produce spurious error messages), just use
errx() if the one condition that really matters fires.

In practice, this single test is enough to detect the failure
mode we're looking for (kqueue being inherited across fork).

Approved by: mentor (rwatson), re (Capsicum blanket)
Sponsored by: Google Inc


223845 07-Jul-2011 jonathan

Ensure that kqueue is not inherited across fork().

Modify the existing unit test (from libkqueue) which already exercises process events via
fork() and kill(). Now, the child process simply checks that the 'kqfd' descriptor is invalid.

Some minor modifications were required to make err() work correctly. It seems that this test
was imported using the output of a configure script, but config.h was not included in key
places, nor was its syntax correct (need '#define HAVE_FOO 1' rather than '#define HAVE_FOO').

Finally, change main() to run the "proc" suite by default, but widened the '#if TODO' in
proc.c to include the non-functioning test event_trigger().

Approved by: mentor (rwatson), re (Capsicum blanket)
Sponsored by: Google Inc


223546 25-Jun-2011 jilles

sh: Test that '!' is literal if quoted and first char of bracket expression

This also works on stable/8.


223283 19-Jun-2011 jilles

sh: Add test for r223282.


223186 17-Jun-2011 jilles

sh: Add case statement fallthrough (with ';&' instead of ';;').

Replacing ;; with the new control operator ;& will cause the next list to be
executed as well without checking its pattern, continuing until a list ends
with ;; or until the end of the case statement. This is like omitting
"break" in a C "switch" statement.

The sequence ;& was formerly invalid.

This feature is proposed for the next POSIX issue in Austin Group issue
#449.


223183 17-Jun-2011 jilles

sh: Skip variables with invalid names in "set", "export -p", "readonly -p".

This ensures the output of these commands is valid shell input.


223163 16-Jun-2011 jilles

sh: Reduce unnecessary forks with eval.

The eval special builtin now runs the code with EV_EXIT if it was run
with EV_EXIT itself.

In particular, this eliminates one fork when a command substitution contains
an eval command that ends with an external program or a subshell.

This is similar to what r220978 did for functions.


223120 15-Jun-2011 jilles

sh: Add support for named character classes in bracket expressions.

Example:
case x in [[:alpha:]]) echo yes ;; esac


223011 12-Jun-2011 jilles

sh: Add test for LC_COLLATE-based character ranges in case.


223007 12-Jun-2011 jilles

sh: Add test for case pattern matching with iso-8859-1 charset.

This also passes on stable/8.


222957 10-Jun-2011 jilles

sh: Do parameter expansion on ENV before using it.

This is required by POSIX, and allows things like ENV=\$HOME/.shrc.

Note that tilde expansion is explicitly not performed.


222907 09-Jun-2011 jilles

sh: Do parameter expansion before printing PS4 (set -x).

The function name expandstr() and the general idea of doing this kind of
expansion by treating the text as a here document without end marker is from
dash.

All variants of parameter expansion and arithmetic expansion also work (the
latter is not required by POSIX but it does not take extra code and many
other shells also allow it).

Command substitution is prevented because I think it causes too much code to
be re-entered (for example creating an unbounded recursion of trace lines).

Unfortunately, our LINENO is somewhat crude, otherwise PS4='$LINENO+ ' would
be quite useful.


222882 08-Jun-2011 jilles

sh: Add simple tests for set -x and PS4.


222813 07-Jun-2011 attilio

etire the cpumask_t type and replace it with cpuset_t usage.

This is intended to fix the bug where cpu mask objects are
capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever
value. Anyway, as long as several structures in the kernel are
statically allocated and sized as MAXCPU, it is suggested to keep it
as low as possible for the time being.

Technical notes on this commit itself:
- More functions to handle with cpuset_t objects are introduced.
The most notable are cpusetobj_ffs() (which calculates a ffs(3)
for a cpuset_t object), cpusetobj_strprint() (which prepares a string
representing a cpuset_t object) and cpusetobj_strscan() (which
creates a valid cpuset_t starting from a string representation).
- pc_cpumask and pc_other_cpus are target to be removed soon.
With the moving from cpumask_t to cpuset_t they are now inefficient
and not really useful. Anyway, for the time being, please note that
access to pcpu datas is protected by sched_pin() in order to avoid
migrating the CPU while reading more than one (possible) word
- Please note that size of cpuset_t objects may differ between kernel
and userland. While this is not directly related to the patch itself,
it is good to understand that concept and possibly use the patch
as a reference on how to deal with cpuset_t objects in userland, when
accessing kernland members.
- KTR_CPUMASK is changed and now is represented through a string, to be
set as the example reported in NOTES.

Please additively note that no MAXCPU is bumped in this patch, but
private testing has been done until to MAXCPU=128 on a real 8x8x2(htt)
machine (amd64).

Please note that the FreeBSD version is not yet bumped because of
the upcoming pcpu changes. However, note that this patch is not
targeted for MFC.

People to thank for the time spent on this patch:
- sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested
several revision of the patches and really helped in improving
stability of this work.
- marius fixed several bugs in the sparc64 implementation and reviewed
patches related to ktr.
- jeff and jhb discussed the basic approach followed.
- kib and marcel made targeted review on some specific part of the
patch.
- marius, art, nwhitehorn and andreast reviewed MD specific part of
the patch.
- marius, andreast, gonzo, nwhitehorn and jceel tested MD specific
implementations of the patch.
- Other people have made contributions on other patches that have been
already committed and have been listed separately.

Companies that should be mentioned for having participated at several
degrees:
- Yahoo! for having offered the machines used for testing on big
count of CPUs.
- The FreeBSD Foundation for having sponsored my devsummit attendance,
which has been instrumental.
- Sandvine for having offered offices and infrastructure during
development.

(I really hope I didn't forget anyone, if it happened I apologize in
advance).


222716 05-Jun-2011 jilles

sh: Fix $? in heredocs on simple commands.

PR: bin/41410


222715 05-Jun-2011 jilles

sh: Add already working testcases for $? in here-document.

If the here-document is attached to a compound command or subshell, $?
already works properly. This is both a workaround for bin/41410 and a
requirement for a true fix for bin/41410.

PR: bin/41410
MFC after: 1 week


222689 04-Jun-2011 rwatson

Add a very simple IPDIVERT test, which creates IP divert sockets and
checks for collision/non-collision properties in binding them. This
test would have identified a bug recently reported on current@
involding my disaggregation of the pcbinfo lock.

It would be nice if this test also exercised packet diversion and
injection, but that is for another day.

MFC after: 3 days
Sponsored by: Juniper Networks, Inc.


222684 04-Jun-2011 jilles

sh: Reduce more needless differences between error messages.


222676 04-Jun-2011 jilles

sh: Honour -n while processing -c string.


222661 03-Jun-2011 jilles

sh: Add tests for -n flag. These already pass.


222512 30-May-2011 jilles

sh: Add tests for some somewhat obscure aspects of function definitions.


222487 30-May-2011 bz

Upgrade jail(2) to latest jail(2) API to make the regression test work
again. Eventually should switch to jail_set(2).

Reported by: rwatson
MFC after: 10 days


222486 30-May-2011 rwatson

Rework TIMEWAIT regression test so that kernel-allocated port numbers are
used rather than a fixed userspace one, avoiding conflicts between the two
test runs.

MFC after: 3 days
Sponsored by: Juniper Networks, Inc.


222485 30-May-2011 rwatson

Add missing include of stdio.h.

MFC after: 3 days
Sponsored by: Juniper Networks, Inc.


222484 30-May-2011 rwatson

In the tcpdrop regression test, allow the kernel to allocate us a port
rather than using a fixed port number. This means that the regression test
can be run many times in a row without waiting on TIMEWAIT to release a
hard-coded port number.

MFC after: 3 days
Sponsored by: Juniper Networks, Inc.


222483 30-May-2011 rwatson

Add missing #include of err.h.

MFC after: 3 days
Sponsored by: Juniper Networks, Inc.


222451 29-May-2011 jilles

sh: Add test for 'set +o'.


222418 28-May-2011 jilles

printf: Allow multibyte characters for '<char> form, avoid negative codes.

Examples:
LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244)
LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344)
Both of these should print 228.

Like some other shells, incomplete or invalid multibyte characters yield the
value of the first byte without a warning.

Note that there is no general way to go back from the character code to the
character.


222381 27-May-2011 jilles

sh: Correct criterion for using CDPATH in cd.

CDPATH should be ignored not only for pathnames starting with '/' but also
for pathnames whose first component is '.' or '..'.

The man page already describes this behaviour.


222379 27-May-2011 jilles

sh: Add simple CDPATH test.


222361 27-May-2011 jilles

sh: Fix unquoted $@/$* if IFS=''.

If IFS is null, unquoted $@/$* should still expand to separate words.
This differs from quoted $@ (which does not depend on IFS) in that pathname
generation is performed and empty words are removed.


222174 22-May-2011 jilles

sh: Add test for r222173.


222165 21-May-2011 jilles

sh: Expand aliases after assignments and redirections.


222158 21-May-2011 jilles

sh: Add test for positional parameters with more than one digit.

This also passes on stable/8.


222154 20-May-2011 jilles

sh: Implement the cd -e flag proposed for the next POSIX issue.

This reflects failure to determine the pathname of the new directory in the
exit status (1). Normally, cd returns successfully if it did chdir() and the
call was successful.

In POSIX, -e only has meaning with -P; because our -L is not entirely
compliant and may fall back to -P mode, -e has some effect with -L as well.


222134 20-May-2011 jilles

sh: Allow terminating a heredoc with a terminator at EOF without a newline.

This is sometimes used with eval or old-style command substitution, and most
shells other than ash derivatives allow it.

It can also be used with scripts that violate POSIX's requirement on the
application that they end in a newline (scripts must be text files except
that line length is unlimited).

Example:
v=`cat <<EOF
foo
EOF`
echo $v

This commit does not add support for the similar construct with new-style
command substitution, like
v=$(cat <<EOF
foo
EOF)
This continues to require a newline after the terminator.


221887 14-May-2011 jilles

sh: Add tests for lines that look like heredoc delimiters but are not.


221669 08-May-2011 jilles

sh: Add \u/\U support (in $'...') for UTF-8.

Because we have no iconv in base, support for other charsets is not
possible.

Note that \u/\U are processed using the locale that was active when the
shell started. This is necessary to avoid behaviour that depends on the
parse/execute split (for example when placing braces around an entire
script). Therefore, UTF-8 encoding is implemented manually.


221646 08-May-2011 jilles

sh: Add UTF-8 support to pattern matching.

?, [...] patterns match codepoints instead of bytes. They do not match
invalid sequences. [...] patterns must not contain invalid sequences
otherwise they will not match anything. This is so that ${var#?} removes the
first codepoint, not the first byte, without putting UTF-8 knowledge into
the ${var#pattern} code. However, * continues to match any string and an
invalid sequence matches an identical invalid sequence. (This differs from
fnmatch(3).)


221602 07-May-2011 jilles

sh: Add UTF-8 support to ${#var}.

If the current locale uses UTF-8, ${#var} counts codepoints (more precisely,
bytes b with (b & 0xc0) != 0x80).


221513 05-May-2011 jilles

sh: Add $'quoting' (C-style escape sequences).

A string between $' and ' may contain backslash escape sequences similar to
the ones in a C string constant (except that a single-quote must be escaped
and a double-quote need not be). Details are in the sh(1) man page.

This construct is useful to include unprintable characters, tabs and
newlines in strings; while this can be done with a command substitution
containing a printf command, that needs ugly workarounds if the result is to
end with a newline as command substitution removes all trailing newlines.

The construct may also be useful in future to describe unprintable
characters without needing to write those characters themselves in 'set -x',
'export -p' and the like.

The implementation attempts to comply to the proposal for the next issue of
the POSIX specification. Because this construct is not in POSIX.1-2008,
using it in scripts intended to be portable is unwise.

Matching the minimal locale support in the rest of sh, the \u and \U
sequences are currently not useful.

Exp-run done by: pav (with some other sh(1) changes)


221463 04-May-2011 jilles

sh: Apply set -u to variables in arithmetic.

Note that this only applies to variables that are actually used.
Things like (0 && unsetvar) do not cause an error.

Exp-run done by: pav (with some other sh(1) changes)


221461 04-May-2011 jilles

sh: Detect an error for ${#var<GARBAGE>}.

In particular, this makes things like ${#foo[0]} and ${#foo[@]} errors
rather than silent equivalents of ${#foo}.

PR: bin/151720
Submitted by: Mark Johnston
Exp-run done by: pav (with some other sh(1) changes)


221431 04-May-2011 jonathan

Regression tests for Capsicum capability mode.

Ensure that system calls that access global namespaces, e.g. open(2), are not permitted, and that whitelisted sysctls like kern.osreldate are.

Approved by: rwatson
Sponsored by: Google, Inc.


221027 25-Apr-2011 jilles

sh: Set $? to 0 for background commands.

For backgrounded pipelines and subshells, the previous value of $? was being
preserved, which is incorrect.

For backgrounded simple commands containing a command substitution, the
status of the last command substitution was returned instead of 0.

If fork() fails, this is an error.


220978 23-Apr-2011 jilles

sh: Allow EV_EXIT through function calls, make {...} <redir more consistent.

If EV_EXIT causes an exit, use the exception mechanism to unwind
redirections and local variables. This way, if the final command is a
redirected command, an EXIT trap now executes without the redirections.

Because of these changes, EV_EXIT can now be inherited by the body of a
function, so do so. This means that a function no longer prevents a fork
before an exec being skipped, such as in
f() { head -1 /etc/passwd; }; echo $(f)

Wrapping a single builtin in a function may still cause an otherwise
unnecessary fork with command substitution, however.

An exit command or -e failure still invokes the EXIT trap with the
original redirections and local variables in place.

Note: this depends on SHELLPROC being gone. A SHELLPROC depended on
keeping the redirections and local variables and only cleaning up the
state to restore them.


220927 21-Apr-2011 simon

Expand / correct newsyslog regression tests:
- Test newslog with clasic naming of rotates files to actually test
the correct number of log files as newsyslog now does the correct
thing post r220926.
- Add some more newsyslog tests which tests keeping 0, 1, and 2
logfiles.


220903 20-Apr-2011 jilles

sh: Do not word split "${#parameter}".

This is only a problem if IFS contains digits, which is unusual but valid.

Because of an incorrect fix for PR bin/12137, "${#parameter}" was treated
as ${#parameter}. The underlying problem was that "${#parameter}"
erroneously added CTLESC bytes before determining the length. This
was properly fixed for PR bin/56147 but the incorrect fix was not backed
out.

Reported by: Seeker on forums.freebsd.org
MFC after: 2 weeks


220656 15-Apr-2011 jilles

sh: Add test for bin/12137.


220655 15-Apr-2011 jilles

sh: Add test for obscure and ambiguous ${#?}.


220654 15-Apr-2011 jilles

sh: Add test for bin/56147.


220376 05-Apr-2011 jilles

Allow strerror(0) and strerror_r(0, ...).

Of course, strerror_r() may still fail with ERANGE.

Although the POSIX specification said this could fail with EINVAL and
doing this likely indicates invalid use of errno, most other
implementations permitted it, various POSIX testsuites require it to
work (matching the older sys_errlist array) and apparently some
applications depend on it.

PR: standards/151316
MFC after: 1 week


219877 22-Mar-2011 trasz

Add test for acl_is_trivial_np(3).


219623 13-Mar-2011 jilles

sh: Fix some parameter expansion variants ${#...}.

These already worked: $# ${#} ${##} ${#-} ${#?}
These now work as well: ${#+word} ${#-word} ${##word} ${#%word}

There is an ambiguity in the standard with ${#?}: it could be the length of
$? or it could be $# giving an error in the (impossible) case that it is not
set. We continue to use the former interpretation as it seems more useful.


219621 13-Mar-2011 pjd

POSIX accepts only ELOOP if O_NOFOLLOW is specified and target is a symlink.


219611 13-Mar-2011 jilles

sh: Add some tests for ${#parameter}.


219568 12-Mar-2011 brucec

Fix warnings and style(9) issues.
Set WARNS to 6.


219566 12-Mar-2011 pjd

Add some missing consts.


219464 10-Mar-2011 pjd

Add support for *at syscalls:
- openat(2)
- unlinkat(2)
- mkdirat(2)
- linkat(2)
- symlinkat(2)
- renameat(2)
- mkfifoat(2)
- mknodat(2)
- fchmodat(2)
- fchownat(2)
- fstatat(2)


219463 10-Mar-2011 pjd

Improve test a bit, now that we have fstat(2) support.
The test was support to check if SUID/SGID bits are removed on first
write, but actually we were checking if they were removed after close.
Now we can check if SUID/SGID bits are gone after first write.

While here add checks to see if when both SUID and SGID bits are set they are
both cleared on first write.


219439 09-Mar-2011 pjd

Few initial ftruncate(2) tests. One of them covers stand/154873.

PR: stand/154873


219438 09-Mar-2011 pjd

Pass descriptor number to write(2), now that it is possible.


219437 09-Mar-2011 pjd

Add support for the following syscalls:
- fchmod(2),
- fchown(2),
- fchflags(2),
- fstat(2),
- ftruncate(2),
- fpathconf(2),
- lpathconf(2).
Make write(2) syscall to take descriptor instead of file name.

We implement descriptors by keeping track of open files and allowing to
reference them by the following syscalls. Because pjdfstest already supports
executing multiple syscalls from one command it works pretty well.

For example, the following command:

pjdfstest open foo "O_CREAT,O_RDWR" 0 : open bar "O_CREAT,O_RDONLY" 640 : fchmod 0 0666 : fchown 0 -1 20 : fchmod 1 0444

is equivalent of (error checking omitted):

int fd[2];

fd[0] = open("foo", O_CREAT | O_RDWR, 0);
fd[1] = open("bar", O_CREAT | O_RDONLY, 0640);
fchmod(fd[0], 0666);
fchown(fd[0], -1, 20);
fchmod(fd[1], 0444);


219390 08-Mar-2011 jilles

sh: Test that . /dev/null returns exit status 0 and does not preserve $?.

Preserving $? may cause problems particularly if set -e is in effect.

It may be useful to preserve the old value of $? in the dot script but this
must not be implemented in such a way that it would break this test.


219362 07-Mar-2011 das

Add some tests for cexp() and cexpf(). (I need to clean up all of
these tests some day, but in the mean time, they're a useful sanity
check for future changes.)


219270 04-Mar-2011 trasz

One more fix. Now all ACL tests pass again.


219269 04-Mar-2011 trasz

Adapt tools-crossfs.test to the new semantics.


219267 04-Mar-2011 trasz

Adapt NFSv4 ACL regression test to the fact that the new ZFS uses
new semantics.


219266 04-Mar-2011 trasz

Make ACL tests slightly easier to run.


219084 27-Feb-2011 delphij

Accept == as an alias of = which is a popular GNU extension.

This is intentionally undocumented for now since it's not part
of any standard.

MFC after: 1 month


218938 22-Feb-2011 miwi

- Fix QA issues

PR: misc/146687
Submitted by: Garrett Cooper <gcooper@FreeBSD.org>
Approved by: rwatson (mentor)


218891 20-Feb-2011 jilles

sh: Add some tests for omitting whitespace whereever possible.


218889 20-Feb-2011 jilles

sh: Split off some special behaviour into separate tests.

This allows some other shells to pass the tests for basic behaviour.


218851 19-Feb-2011 jilles

sh: Do not use "local" in the test runner as POSIX and ksh93 do not have it.


218850 19-Feb-2011 jilles

sh: Make execution/fork1.0 work even if the basename of ${SH} is not "sh".


218821 18-Feb-2011 jilles

sh: Test that the read builtin passes through all byte values
except NUL, newline and backslash.

This also passes on stable/8.


218819 18-Feb-2011 jilles

sh: Unset some more locale vars in two tests that may cause them to break.


218626 12-Feb-2011 jilles

sh: Detect dividing the smallest integer by -1.

This overflows and on some architectures such as amd64 it generates SIGFPE.
Generate an error on all architectures.


218469 08-Feb-2011 jilles

sh: Add tests for new features in arithmetic.


218356 05-Feb-2011 jilles

sh: Weaken some tests to allow /rescue/sh to pass everything.

/rescue/sh has a different _PATH_STDPATH which affects command -p.


218325 05-Feb-2011 jilles

sh: Fix two things about {(...)} <redir:

* In {(...) <redir1;} <redir2, do not drop redir1.
* Maintain the difference between (...) <redir and {(...)} <redir:
In (...) <redir, the redirection is performed in the child, while in
{(...)} <redir it should be performed in the parent (like {(...); :;}
<redir)


218323 05-Feb-2011 jilles

sh: Forget all cached command locations on any PATH change.

POSIX requires this and it is simpler than the previous code that remembered
command locations when appending directories to PATH.

In particular,
PATH=$PATH
is no longer a no-op but discards all cached command locations.


218320 05-Feb-2011 jilles

sh: Do not try to execute binary files as scripts.

If execve() returns an [ENOEXEC] error, check if the file is binary before
trying to execute it using sh. A file is considered binary if at least one
of the first 256 bytes is '\0'.

In particular, trying to execute ELF binaries for the wrong architecture now
fails with an "Exec format error" message instead of syntax errors and
potentially strange results.


218205 02-Feb-2011 jilles

sh: Add test for shell script without '#!'.


218105 30-Jan-2011 jilles

sh: Send messages about signals to stderr.

This is required by POSIX and seems to make more sense.

See also r217557.


217996 27-Jan-2011 jilles

sh: Add test for EXIT trap in command substitution.

This is not really realistic but is an opposition to $(trap).


217557 18-Jan-2011 jilles

sh: Fix signal messages being sent to the wrong file sometimes.

When a foreground job exits on a signal, a message is printed to stdout
about this. The buffer was not flushed after this which could result in the
message being written to the wrong file if the next command was a builtin
and had stdout redirected.

Example:
sh -c 'kill -9 $$'; : > foo; echo FOO:; cat foo

Reported by: gcooper
MFC after: 1 week


217472 16-Jan-2011 jilles

sh: If exit is used without args from a trap action, exit on the signal.

This is useful so that it is easier to exit on a signal than to reset the
trap to default and resend the signal. It matches ksh93. POSIX says that
'exit' without args from a trap action uses the exit status from the last
command before the trap, which is different from 'exit $?' and matches this
if the previous command is assumed to have exited on the signal.

If the signal is SIGSTOP, SIGTSTP, SIGTTIN or SIGTTOU, or if the default
action for the signal is to ignore it, a normal _exit(2) is done with exit
status 128+signal_number.


217461 15-Jan-2011 jilles

sh: Fix some things about -- in trap:
* Make 'trap --' do the same as 'trap' instead of nothing.
* Make '--' stop option processing (note that '-' action is not an option).

Side effect: The error message for an unknown option is different.


217208 09-Jan-2011 keramida

regression/date: unset all LC_xxx vars and set LANG/LC_ALL

When running with a custom locale setup, it's easy to confuse the
date regression tests and cause them to fail, e.g. when LANG='C'
but LC_ALL='el_GR.UTF-8'. Set LC_ALL to 'C', which overrides all
other LC_xxx options, to avoid this sort of problem.

Reviewed by: uqs, edwin


217206 09-Jan-2011 jilles

sh: Remove special %builtin PATH entry.
All builtins are now always found before a PATH search.

Most ash derivatives have an undocumented feature where the presence of an
entry "%builtin" in $PATH will cause builtins to be checked at that point of
the PATH search, rather than before looking at any directories as documented
in the man page (very old versions do document this feature).

I am removing this feature from sh, as it complicates the code, may violate
expectations (for example, /usr/bin/alias is very close to a forkbomb with
PATH=/usr/bin:%builtin, only /usr/bin/builtin not being another link saves
it) and appears to be unused (all the %builtin google code search finds is
in some sort of ash source code).

Note that aliases and functions took and take precedence above builtins.
Because aliases work on a lexical level they can only ever be overridden on
a lexical level (quoting or preceding 'builtin' or 'command'). Allowing
override of functions via PATH does not really fit in the model of sh and it
would work differently from %builtin if implemented.

Note: POSIX says special builtins are found before functions. We comply to
this because we do not allow functions with the same name as a special
builtin.

Silence from: freebsd-hackers@ (message sent 20101225)
Discussed with: dougb


217175 08-Jan-2011 jilles

sh: Make exit without parameters from EXIT trap POSIX-compliant.

It should use the original exit status, just like falling off the
end of the trap handler.

Outside an EXIT trap, 'exit' is still equivalent to 'exit $?'.


217172 08-Jan-2011 jilles

sh: Add simple test for 'exit' without parameters.


217134 08-Jan-2011 jilles

sed: Add test for r217133 (-i race).

PR: bin/153261
MFC after: 2 weeks


217064 06-Jan-2011 keramida

tests: sort & fix includes, remove -include from CFLAGS of acct tests

- Sort the includes of pack.c, moving sys/*.h files near the top.
- Add a couple of missing #include lines, and remove the need for
custom -include options in the CFLAGS of the test Makefile.
- Remove the ad-hoc 'all' target, but keep its 'regress' bits for
testing.
- Convert the ad-hoc 'clean' target to proper CLEANFILES stuff,
so that the normal bsd.prog.mk machinery can clean up.
- Use `make -V .OBJDIR' to detect the place where 'pack' lives,
so that regress.t works both with and without 'make obj'.

Reviewed by: uqs
MFC after: 1 week


217035 05-Jan-2011 jilles

sh: Do not call exitshell() from evalcommand() unless evalcommand() forked
itself.

This ensures that certain traps caused by builtins are executed.


216871 01-Jan-2011 jilles

sh: Test that exit $? replaces the original exit status in an EXIT trap.


216870 01-Jan-2011 jilles

sh: Check readonly status for assignments on regular builtins.

An error message is written, the builtin is not executed, nonzero exit
status is returned but the shell does not abort.

This was already checked for special builtins and external commands, with
the same consequences except that the shell aborts for special builtins.

Obtained from: NetBSD


216851 31-Dec-2010 jilles

sh: Check if dup2 for redirection from/to a file succeeds.

A failure (e.g. caused by ulimit -n being set very low) is a redirection
error.

Example:
ulimit -n 9; exec 9<.


216826 30-Dec-2010 jilles

sh: Avoid side effects from builtins in optimized command substitution.

Change the criterion for builtins to be safe to execute in the same process
in optimized command substitution from a blacklist of only cd, . and eval to
a whitelist.

This avoids clobbering the main shell environment such as by $(exit 4) and
$(set -x).

The builtins jobid, jobs, times and trap can still show information not
available in a child process; this is deliberately permitted. (Changing
traps is not.)

For some builtins, whether they are safe depends on the arguments passed to
them. Some of these are always considered unsafe to keep things simple; this
only harms efficiency a little in the rare case they are used alone in a
command substitution.


216819 30-Dec-2010 jilles

sh: Add two tests for special cases in command substitution that already
work in stable/8.


216778 28-Dec-2010 jilles

sh: Don't do optimized command substitution if expansions have side effects.

Before considering to execute a command substitution in the same process,
check if any of the expansions may have a side effect; if so, execute it in
a new process just like happens if it is not a single simple command.

Although the check happens at run time, it is a static check that does not
depend on current state. It is triggered by:
- expanding $! (which may cause the job to be remembered)
- ${var=value} default value assignment
- assignment operators in arithmetic
- parameter substitutions in arithmetic except ${#param}, $$, $# and $?
- command substitutions in arithmetic

This means that $((v+1)) does not prevent optimized command substitution,
whereas $(($v+1)) does, because $v might expand to something containing
assignment operators.

Scripts should not depend on these exact details for correctness. It is also
imaginable to have the shell fork if and when a side effect is encountered
or to create a new temporary namespace for variables.

Due to the $! change, the construct $(jobs $!) no longer works. The value of
$! should be stored in a variable outside command substitution first.


216763 28-Dec-2010 jilles

sh: Add test for optimized command substitution.

This test verifies that certain expansions without side effects do not
cause the command substitution to be executed in a child process.

This is not a correctness requirement, but it involves a nontrivial amount
of code and it would be unfortunate if it stopped working.


216761 28-Dec-2010 jilles

sh: Make expansion errors in optimized command substitution non-fatal.
Command substitutions consisting of a single simple command are executed in
the main shell process but this should be invisible apart from performance
and very few exceptions such as $(trap).


216747 28-Dec-2010 jilles

sh: Add a testcase for cmdsubst errors that already works properly.
If a command substitution consists of one special builtin and there is a
redirection error, this should not abort the outer shell.
It was fixed in r201366 by ignoring special builtin properties for command
substitutions consisting of one builtin.


216738 27-Dec-2010 emaste

Restore two commented-out tests from plus-minus1.0 to a new file.

These two cases pass on -CURRENT but fail on stable/8.

Reviewed by: jilles


216726 26-Dec-2010 emaste

Remove commented-out test that's covered in plus-minus2.0 anyway.

Discussed with: jilles


216606 20-Dec-2010 jilles

sh: Make warnings in the printf builtin non-fatal, like in the program.

The #define for warnx now behaves much like the libc function (except that
it uses sh command name and output).

Also, it now uses C99 __VA_ARGS__ so there is no need for three different
macros for 0, 1 or 2 parameters.


216547 18-Dec-2010 jilles

sh: arith: Disallow decimal constants starting with 0 (containing 8 or 9).

Constants in arithmetic starting with 0 should be octal only.

This avoids the following highly puzzling result:
$ echo $((018-017))
3
by making it an error instead.


216496 16-Dec-2010 jilles

sh: Fix corruption of command substitutions with special chars after newline

The CTLESC byte to protect a special character was output before instead of
after a newline directly preceding the special character.

The special handling of newlines is because command substitutions discard
all trailing newlines.


216414 13-Dec-2010 trasz

Recognize NFSv4 ACL semantics and run proper regression test.


216398 12-Dec-2010 jilles

sh: Fix some tests that used sh instead of ${SH}
so they tested the wrong sh.

This was caused because these tests were committed after the sh -> ${SH}
change but were created before.


216395 12-Dec-2010 jilles

sh: Add a test for r216387 (long arithmetic expression in here document).


216393 12-Dec-2010 trasz

Add regression test for new NFSv4 ACL semantics, verified with ZFSv28.
Note that to run it, you need not only ZFSv28, but also a modified setfacl(1),
which is not in the tree yet.


216379 11-Dec-2010 pjd

Allow to specify path to a file we want to test with sendfile(2).
This allows to specify selected file system and not only /tmp/.


216311 08-Dec-2010 jilles

printf: Test that the "--" option terminator works.


216223 06-Dec-2010 das

Work around gcc constant folding bugs.


216222 06-Dec-2010 das

signbit() returns nonzero for negative arguments, but we shouldn't assume
that it always returns the same nonzero value.


216221 05-Dec-2010 das

Fix some warnings.


216214 05-Dec-2010 das

Add regression tests for logarithmic functions in the math library.


216151 03-Dec-2010 kib

Extend the unix gc regression test to cover the case of r216150.

Requested and reviewed by: rwatson
MFC after: 1 week


216139 03-Dec-2010 das

Add some basic regression tests for nearbyint().


216019 28-Nov-2010 jilles

sh: Make the test for cd/pwd with long pathnames more useful:
* Use $(getconf PATH_MAX /) to make sure we actually exercise the hard part
* Delete our test area even if the test fails


215550 19-Nov-2010 jilles

sh: Add a test that manipulates various long strings.

It is quite effective at detecting mistakes in memalloc.c and code using it.

It is somewhat slow, but some of the patches in my queue improve it.


215547 19-Nov-2010 jilles

sh: Add another simple test for the wait builtin.


215207 12-Nov-2010 gnn

Add a queue to hold packets while we await an ARP reply.

When a fast machine first brings up some non TCP networking program
it is quite possible that we will drop packets due to the fact that
only one packet can be held per ARP entry. This leads to packets
being missed when a program starts or restarts if the ARP data is
not currently in the ARP cache.

This code adds a new sysctl, net.link.ether.inet.maxhold, which defines
a system wide maximum number of packets to be held in each ARP entry.
Up to maxhold packets are queued until an ARP reply is received or
the ARP times out. The default setting is the old value of 1
which has been part of the BSD networking code since time
immemorial.

Expose the time we hold an incomplete ARP entry by adding
the sysctl net.link.ether.inet.wait, which defaults to 20
seconds, the value used when the new ARP code was added..

Reviewed by: bz, rpaulo
MFC after: 3 weeks


215022 08-Nov-2010 jilles

test: Move tests to tools/regression/bin/test.
Convert the tests to the perl prove format.
Remove obsolete TEST.README (results of an old TEST.sh for some old Unices)
and TEST.csh (old tests without correct values, far less complete than
TEST.sh).

MFC after: 1 week


214923 07-Nov-2010 trasz

Remove useless comment.


214853 05-Nov-2010 jilles

sh: Add simple tests for printf.

These are not meant as a replacement for tools/regression/usr.bin/printf/*
but to detect errors specific to making it a shell builtin.


214709 02-Nov-2010 jilles

sh: Fix some issues with aliases and case, by importing dash checkkwd code.

This moves the function of the noaliases variable into the checkkwd
variable. This way it is properly reset on errors and aliases can be used
normally in the commands for each case (the case labels recognize the
keyword esac but no aliases).

The new code is clearer as well.

Obtained from: dash


214531 29-Oct-2010 jilles

sh: Detect various additional errors in the parser.

Apart from detecting breakage earlier or at all, this also fixes a segfault
in the testsuite. The "handling" of the breakage left an invalid internal
representation in some cases.

Examples:
echo a; do echo b
echo `) echo a`
echo `date; do do do`

Exp-run done by: pav (with some other sh(1) changes)


214524 29-Oct-2010 jilles

sh: Fix some issues with CTL* bytes and ${var#pat}.

subevalvar() incorrectly assumed that CTLESC bytes were present iff the
expansion was quoted. However, they are present iff various processing such
as word splitting is to be done later on.

Example:
v=@$e@$e@$e@
y="${v##*"$e"}"
echo "$y"
failed if $e contained the magic CTLESC byte.

Exp-run done by: pav (with some other sh(1) changes)


214512 29-Oct-2010 jilles

sh: Do IFS splitting on word in ${v+word} and ${v-word}.

The code is inspired by NetBSD sh somewhat, but different because we
preserve the old Almquist/Bourne/Korn ability to have an unquoted part in a
quoted ${v+word}. For example, "${v-"*"}" expands to $v as a single field if
v is set, but generates filenames otherwise.

Note that this is the only place where we split text literally from the
script (the similar ${v=word} assigns to v and then expands $v). The parser
must now add additional markers to allow the expansion code to know whether
arbitrary characters in substitutions are quoted.

Example:
for i in ${$+a b c}; do echo $i; done

Exp-run done by: pav (with some other sh(1) changes)


214492 28-Oct-2010 jilles

sh: Only accept a '}' inside ${v+-=?...} if double-quote state matches.
If double-quote state does not match, treat the '}' literally.

This ensures double-quote state remains the same before and after a
${v+-=?...} which helps with expand.c.

It makes things like
${foo+"\${bar}"}
which I have seen in the wild work as expected.

Exp-run done by: pav (with some other sh(1) changes)


214490 28-Oct-2010 jilles

sh: Make double-quotes quote a '}' inside ${v#...} and ${v%...}.

Exp-run done by: pav (with some other sh(1) changes)
PR: bin/57554


214304 24-Oct-2010 jilles

sh: Do not allow overriding a special builtin with a function.
This is a syntax error.

POSIX does not say explicitly whether defining a function with the same name
as a special builtin is allowed, but it does say that it is impossible to
call such a function.

A special builtin can still be overridden with an alias.

This commit is part of a set of changes that will ensure that when
something looks like a special builtin to the parser, it is one. (Not the
other way around, as it remains possible to call a special builtin named
by a variable or other substitution.)

Exp-run done by: pav (with some other sh(1) changes)


214291 24-Oct-2010 jilles

sh: Make sure defined functions can actually be called.

Add some conservative checks on function names:
- Disallow expansions or quoting characters; these can only be called via
strange control characters
- Disallow '/'; these functions cannot be called anyway, as exec.c assumes
they are pathnames
- Make the CTL* bytes work properly in function names.

These are syntax errors.

POSIX does not require us to support more than names (letters, digits and
underscores, not starting with a digit), but I do not want to restrict it
that much at this time.

Exp-run done by: pav (with some other sh(1) changes)


214290 24-Oct-2010 jilles

sh: Check whether dup2 was successful for >&FD and <&FD.

A failure (usually caused by FD not being open) is a redirection error.

Exp-run done by: pav (with some other sh(1) changes)


214289 24-Oct-2010 jilles

sh: Add a test trying to close a descriptor that is not open.

In stable/8 and older, this fails. Some of the redirection changes in head
have fixed it.


214281 24-Oct-2010 jilles

sh: Change ! within a pipeline to start a new pipeline instead.

This is how ksh93 treats ! within a pipeline and makes the ! in
a | ! b | c
negate the exit status of the pipeline, as if it were
a | { ! b | c; }

Side effect: something like
f() ! a
is now a syntax error, because a function definition takes a command,
not a pipeline.

Exp-run done by: pav (with some other sh(1) changes)


214280 24-Oct-2010 jilles

sh: Add some testcases for alias expansion.


213903 15-Oct-2010 jilles

sh: Allow running 'prove' from tools/regression/bin/sh again
without needing to set special environment variables, testing the 'sh' from
PATH.


213883 14-Oct-2010 obrien

Embellish this testcase a little bit to be more clear what the output is
and why. The first case is correct usage which has but one correct output.
The 2nd and 3rd cases are incorrect usage in which the exact output is
not standardized and various shells give various allowable output.


213814 13-Oct-2010 obrien

Do not assume in growstackstr() that a "precious" character will be
immediately written into the stack after the call. Instead let the caller
manage the "space left".

Previously, growstackstr()'s assumption causes problems with STACKSTRNUL()
where we want to be able to turn a stack into a C string, and later
pretend the NUL is not there.

This fixes a bug in STACKSTRNUL() (that grew the stack) where:
1. STADJUST() called after a STACKSTRNUL() results in an improper adjust.
This can be seen in ${var%pattern} and ${var%%pattern} evaluation.
2. Memory leak in STPUTC() called after a STACKSTRNUL().

Reviewed by: jilles


213738 12-Oct-2010 obrien

Allow one to regression test 'sh' changes without having to install
a potentially bad /bin/sh first.


213713 11-Oct-2010 obrien

Correct regression test to not show a false positive when run as root.


213284 29-Sep-2010 jilles

tr: Fix '[=]=]' equivalence class.

A closing bracket immediately after '[=' should not be treated as special.

Different from the submitted patch, a string ending with '[=' does not cause
access beyond the terminating '\0'.

PR: bin/150384
Submitted by: Richard Lowe
MFC after: 2 weeks


213231 27-Sep-2010 pjd

Correct message.

Pointed out by: jhb
MFC after: 2 weeks


213173 25-Sep-2010 pjd

Add some regression tests for newly added -J and -j options.

MFC after: 2 weeks


213171 25-Sep-2010 pjd

Don't hardcode md0 in message, use $md instead.

Reported by: Ronald Klop <ronald-freebsd8@klop.yi.org>


213170 25-Sep-2010 trasz

Don't leave zombies behind.


213169 25-Sep-2010 trasz

Add a shell script to generate a test script for trivial ACLs.


213168 25-Sep-2010 pjd

Update regression tests after AES-XTS addition.

MFC after: 2 weeks


213167 25-Sep-2010 pjd

- Use $md instead of md0, which fixes tests when md(4) device is already
present.
- Correct message - we create GPT, not MBR.

MFC after: 2 weeks


213155 25-Sep-2010 davidxu

Add test cases for stack unwinding.


212934 20-Sep-2010 brian

Add a geli resize subcommand to resize encrypted filesystems prior
to growing the filesystem.

Refuse to attach providers where the metadata provider size is
wrong. This makes post-boot attaches behave consistently with
pre-boot attaches. Also refuse to restore metadata to a provider
of the wrong size without the new -f switch. The new -f switch
forces the metadata restoration despite the provider size, and
updates the provider size in the restored metadata to the correct
value.

Helped by: pjd
Reviewed by: pjd


212839 19-Sep-2010 brian

Revise r197763 which fixes filesystem corruption when extending
into un-zeroed storage.

The original patch was questioned by Kirk as it forces the filesystem
to do excessive work initialising inodes on first use, and was never
MFC'd. This change mimics the newfs(8) approach of zeroing two
blocks of inodes for each new cylinder group.

Reviewed by: mckusick
MFC after: 3 weeks


212475 11-Sep-2010 jilles

sh: Fix exit status if return is used within a loop condition.


212467 11-Sep-2010 jilles

sh: Apply variable assignments left-to-right in bltinlookup().

Example:
HOME=foo HOME=bar cd


212339 08-Sep-2010 jilles

sh: Fix 'read' if all chars before the first IFS char are backslash-escaped.

Backslash-escaped characters did not set the flag for a non-IFS character.

MFC after: 2 weeks


212330 08-Sep-2010 jilles

sh: Add simple tests for backslashes in the read builtin.


212187 03-Sep-2010 jilles

sh: Add a test that 'read' leaves the file pointer at the correct place.

Naive buffering would break the common while read x... construct, which did
not appear to be tested yet.


211973 29-Aug-2010 jilles

sh: Weaken builtins/command4 test to only require a nonzero exit status.

This matches what is in POSIX; various other shells use different exit
statuses.

Note that it is still required that there be no output.


211964 29-Aug-2010 brian

Add a Makefile for tools/regression/bin and support 'all' in
pax/Makefile.

MFC after: 3 weeks


211963 29-Aug-2010 brian

Correct an out-by-one error when earlying out ustar filenames that
are too long. Filenames escaping this test are caught later on,
so the bug doesn't cause any breakage.

Document the correct ustar limitations in pax. As I have no access
to the IEEE 1003.2 spec, I can only assume that the limitations
imposed are in fact correct.

Add regression tests for the filename limitations imposed by pax.

MFC after: 3 weeks


211940 28-Aug-2010 kib

Test the poll(2) return value.

MFC after: 2 weeks


211646 22-Aug-2010 jilles

sh: Remove remnants of '!!' to negate pattern.

This Almquist extension was disabled long ago.

In pathname generation, components starting with '!!' were treated as
containing wildcards, causing unnecessary readdir (which could fail, causing
pathname generation to fail while it should not).


211622 22-Aug-2010 jilles

sh: Test that all bytes from 128 to 255 can be used in IFS.

To avoid multibyte issues, this test forces ISO8859-1 charset.

This also passes on stable/8.


211612 22-Aug-2010 jilles

Fix keyword expansion properties.


211609 22-Aug-2010 jilles

sh: Add a test for breaking from a loop outside the current function.

It is unwise to rely on this but I'd like to know if this would break.


211474 18-Aug-2010 pjd

More tests.


211467 18-Aug-2010 jilles

sh: Add a test for break from a trap action.


211410 17-Aug-2010 pjd

More tests, especially for lchown(2).


211408 16-Aug-2010 jilles

sh: Reduce unnecessary testsuite failures with other shells.


211405 16-Aug-2010 jilles

sh: Split off a more dubious test from parser/heredoc2.0.


211399 16-Aug-2010 jilles

sh: Get rid of unnecessary non-standard empty lists.

POSIX does not allow constructs like:
if cmd; then fi
{ }
Add a colon dummy command, except in a test that verifies that such empty
lists do not cause crashes when used as a function definition.


211354 15-Aug-2010 pjd

Finish renaming fstest to pjdfstest.


211352 15-Aug-2010 pjd

Give fstest a more unique name: pjdfstest.
It is released from time to time and used outside FreeBSD, so it is good to
have a name one can google.


211351 15-Aug-2010 pjd

Update copyright years.


211350 15-Aug-2010 pjd

More tests.


211349 15-Aug-2010 jilles

sh: Fix break/continue/return sometimes not skipping the rest of dot script.

In our implementation and most others, a break or continue in a dot script
can break or continue a loop outside the dot script. This should cause all
further commands in the dot script to be skipped. However, cmdloop() did not
know about this and continued to parse and execute commands from the dot
script.

As described in the man page, a return in a dot script in a function returns
from the function, not only from the dot script. There was a similar issue
as with break and continue. In various other shells, the return appears to
return from the dot script, but POSIX seems not very clear about this.


211341 15-Aug-2010 jilles

sh: Test that all bytes from 1 to 127 can be used in IFS.

This also passes on stable/8.


211336 15-Aug-2010 pjd

More tests (especially for lchmod(2)), less code duplication.


211290 13-Aug-2010 pjd

- Use loops to avoid code duplication.
- More tests.


211242 12-Aug-2010 pjd

More tests.


211235 12-Aug-2010 pjd

Portable Makefile.


211234 12-Aug-2010 pjd

Fix copy&pasted code - we want to create character device here.


211186 11-Aug-2010 pjd

- Use loops where possible to avoid code duplication.
- Don't pass uid and gid to create_file() if not needed.
- More tests.


211185 11-Aug-2010 pjd

Allow to specify uid, gid and mode for create_file().


211180 11-Aug-2010 pjd

More and more tests.


211179 11-Aug-2010 pjd

Move create_file() to misc.sh, as it is going to be used in more places.


211178 11-Aug-2010 pjd

Make use of recently added dirgen_max() and namegen_max() to implement
ENAMETOOLONG checks.


211177 11-Aug-2010 pjd

Instead of hardcoding {NAME_MAX} as 255 and {PATH_MAX} as 1024 obtain those from
pathconf(2) and properly generate too long file names.
This should fix ENAMETOOLONG checks on Linux.


211156 10-Aug-2010 pjd

More tests, mostly related to devices and sockets.


211155 10-Aug-2010 jilles

sh: Fix heap-based buffer overflow in pathname generation.

The buffer for generated pathnames could be too small in some cases. It
happened to be always at least PATH_MAX long, so there was never an overflow
if the resulting pathnames would be usable.

This bug may be abused if a script subjects input from an untrusted source
to pathname generation, which a bad idea anyhow. Most shell scripts do not
work on untrusted data. secteam@ says no advisory is necessary.

PR: bin/148733
Reported by: Changming Sun snnn119 at gmail com
MFC after: 10 days


211116 09-Aug-2010 pjd

Linux has no strlcpy().


211110 09-Aug-2010 pjd

Fix bind(2) and connect(2) support on Solaris.


211109 09-Aug-2010 pjd

Fix file system type detection on Solaris.


211108 09-Aug-2010 pjd

Small tweaks.


211107 09-Aug-2010 pjd

No need to use grep to check if path start with /.

Suggested by: ed


211080 08-Aug-2010 jilles

sh: Add more testcases for ${var:-word}.

Whether POSIX requires these is unclear.

They pass with 8-stable sh as well.


210984 06-Aug-2010 pjd

Various cleanups, mostly to make the test work on FreeBSD/ZFS.


210973 06-Aug-2010 pjd

${GREP} can only be used after loading 'conf'.


210972 06-Aug-2010 pjd

Don't use egrep directly - use ${GREP}.


210971 06-Aug-2010 pjd

Check first todo() argument against operating system name and operating system
name plus file system name.


210970 06-Aug-2010 pjd

For FreeBSD and Linux use awk's toupper() function.

Suggested by: ed


210969 06-Aug-2010 pjd

Convert file system type to upper case.


210967 06-Aug-2010 pjd

Add tests for mknod(2).

Submitted by: Jan Senolt <senoltj@centrum.cz>
Submitted by: Milan Cermak <Milan.Cermak@Sun.COM>
Polished by: pjd


210965 06-Aug-2010 pjd

Add mknod(2) support.

Submitted by: Jan Senolt <senoltj@centrum.cz>
Submitted by: Milan Cermak <Milan.Cermak@Sun.COM>


210964 06-Aug-2010 pjd

Sort includes.


210956 06-Aug-2010 pjd

open(2) returns EOPNOTSUPP when trying to open a socket.


210955 06-Aug-2010 pjd

Test for EACCES also when opening FIFO or directory.


210954 06-Aug-2010 pjd

Test O_RDONLY|O_RDWR flags as potentially invalid.


210953 06-Aug-2010 pjd

Make description readable.


210952 06-Aug-2010 pjd

Add missing -U argument to usage.


210951 06-Aug-2010 pjd

Implement two new syscalls: bind(2) and connect(2) for operating on UNIX
domain sockets.


210829 03-Aug-2010 jilles

sh: Return 0 from eval if no command was given.

This makes a difference if there is a command substitution.

To make this work, evalstring() has been changed to set exitstatus to 0 if
no command was executed (the string contained only whitespace).

Example:
eval $(false); echo $?
should print 0.


210738 01-Aug-2010 jilles

sh: Add a test for a corner case in eval that already works correctly.


210488 25-Jul-2010 jilles

sh: Fix crash due to uninitialized here-document.

If an ; or & token was followed by an EOF token, pending here-documents were
left uninitialized. Execution would crash, either in the main shell process
for literal here-documents or in a child process for expanded
here-documents. In the latter case the problem is hard to detect apart from
the core dumps and log messages.

Side effect: slightly different retries on inputs where EOF is not
persistent.

Note that tools/regression/bin/sh/parser/heredoc6.0 still causes a similar
crash in a child process. The text passed to eval is malformed and should be
rejected.


210374 22-Jul-2010 simon

Hook newsyslog regression tests to the Makefile 'build'.

MFC after: 3 weeks


210373 22-Jul-2010 simon

Add regression tests for newsyslog. These are far from a complete
test of newsyslog, as they were mainly made to test 'newsyslog -t',
but they do test the basic functionality.

The test 'framework' was based on dds@'s code in
src/tools/regression/bin/mv/.

Note that currently these tests are not fully correct for the
non-timestamp based rotation case, as it seems like newsyslog actually
by default keeps a file too much around.

MFC after: 3 weeks


210221 18-Jul-2010 jilles

sh: Allow a background command consisting solely of redirections.

Example:
</dev/null &

MFC after: 2 weeks


209652 02-Jul-2010 jilles

sh: Remove comment that the comma operator is missing in arithmetic
expansion.

The comma operator is not listed in POSIX.1-2008 XCU 1.1.2.1 Arithmetic
Precision and Operations (referenced by XCU 2.6.4 Arithmetic Expansion) and
is therefore not required.


208802 04-Jun-2010 maxim

o The typo was intended as it stated in the comment. Revert last.

Spotted by: dfr


208798 04-Jun-2010 maxim

o Makefile BSDfication.

PR: misc/147461 (with my changes)
Submitted by: Erik Cederstrand


208797 04-Jun-2010 maxim

o Fix typo: .uudef -> .undef.

PR: misc/147462
Submitted by: Erik Cederstrand


208728 02-Jun-2010 brian

Fix stuttering sequences and reverse ranges

PR: 123635
Submitted by: Ulrich Spörlein, uqs at spoerlein dot net


208656 30-May-2010 jilles

sh: Fix a crash if a heredoc was not properly ended and parsing continued.

Example (in interactive mode):
cat <<EOF && )
The next command typed caused sh to segfault, because the state for the here
document was not reset.

Like parser_temp, this uses the fact that the parser is not re-entered.


208655 30-May-2010 jilles

sh: Change interaction of command substitution and here documents.

If a command substitution contains a newline token, this no longer starts
here documents of outer commands. This way, we follow POSIX's idea of the
command substitution being a separate script more closely. It also matches
other shells better and is consistent with newline characters in quotes not
starting here documents.

The extension tested in parser/heredoc3.0 ($(cat <<EOF)\ntext\nEOF\n)
continues to be supported.

In particular, this change allows things like
cat <<EOF && echo `pwd`
(a `` command substitution after a here document)
which formerly silently used an empty file as the here document, because the
EOF of the inner command "pwd" also forced an empty here document.


208630 28-May-2010 jilles

sh: Recognize "--" in . and exec.

Although "--" historically has not been required to be recognized for
certain special builtins that do not take options in POSIX, some other
implementations recognize options for them, requiring scripts to use "--" or
avoid operands starting with "-".

Operands starting with "-" can be avoided with eval by prepending a space,
and cannot occur with break, continue, exit, return and shift as they only
take numbers, nor with times as it does not take operands. With . and exec,
avoiding "-" is not so easy as it may require reimplementing the PATH
search; therefore the current proposal for POSIX is to require recognition
of "--" for them.

We continue to accept other strings starting with "-" as operands to . and
exec, and also "--" if it is alone to . (which would otherwise be invalid
anyway).


208629 28-May-2010 jilles

sh: Add some simple tests for ., exec and return from . script.


208602 27-May-2010 rwatson

Correct several nits/problems in the unix_close_race regression test.

Submitted by: Mikolaj Golub <to.my.trociny at gmail.com>
MFC after: 3 days


208562 26-May-2010 rwatson

Add unix_close_race, a regresion test to catch ENOTCONN being returned
improperly from one of two instances of close(2) being called
simultaneously on both ends of a connected UNIX domain socket. The test
tool is slightly tweaked to improve failure modes, and while often does
trigger the problem, doesn't do so consistently due to the nature of the
race.

PR: kern/144061
Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days


208476 23-May-2010 jilles

sh: Add some simplistic tests for the wait builtin.


207944 11-May-2010 jilles

sh: Fix pathname expansion with quoted slashes like *\/.

These are git commits 36f0fa8fcbc8c7b2b194addd29100fb40e73e4e9 and
d6d06ff5c2ea0fa44becc5ef4340e5f2f15073e4 in dash.

Because this is the first code I'm importing from dash to expand.c, add the
Herbert Xu copyright notice which is in dash's expand.c.

When pathname expanding *\/, the CTLESC representing the quoted state was
erroneously taken as part of the * pathname component. This CTLESC was then
seen by the pattern matching code as escaping the '\0' terminating the
string.

The code is slightly different because dash converts the CTLESC characters
to backslashes and removes all the other CTL* characters to allow
substituting glob(3).

The effect of the bug was also slightly different from dash (where nothing
matched at all). Because a CTLESC can escape a '\0' in some way, whether
files were included despite the bug depended on memory that should not be
read. In particular, on many machines /*\/ expanded to a strict subset of
what /*/ expanded to.

Example:
echo /*"/null"

This should print /dev/null, not /*/null.

PR: bin/146378
Obtained from: dash


207935 11-May-2010 jilles

sh: Add some simple testcases for pathname expansion.


207825 09-May-2010 jilles

Fix error in comment.


207824 09-May-2010 jilles

sh: Add some parser tests.

case1.0 tests POSIX requirements and one more for keywords in case
statements. The others test very special cases of command substitution.

These also work on stable/8.


207821 09-May-2010 jilles

Generate some tests for sh's case command from the fnmatch tests.

I'm committing the generated files because I don't like a build dependency
for the sh(1) tests, and they are small and will not change much.


207820 09-May-2010 jilles

sh: Fix bug in assignment error test.

The test failed if the command returned nonzero exit status, and it really
should return that.


207678 05-May-2010 jilles

sh: Apply locale vars on builtins, recognize LC_MESSAGES as a locale var.

This allows doing things like LC_ALL=C some_builtin to run a builtin under a
different locale, just like is possible with external programs. The
immediate reason is that this allows making printf(1) a builtin without
breaking things like LC_NUMERIC=C printf '%f\n' 1.2

This change also affects special builtins, as even though the assignment is
persistent, the export is only to the builtin (unless the variable was
already exported).

Note: for this to work for builtins that also exist as external programs
such as /bin/test, the setlocale() call must be under #ifndef SHELL. The
shell will do the setlocale() calls which may not agree with the environment
variables.


207135 23-Apr-2010 jkim

Adjust a test case and make it more jump optimization neutral for JIT case.


207127 23-Apr-2010 jilles

sh: Add some more tests for ${v#...} and ${v%...}.

These pass on stable/8 as well.


206817 18-Apr-2010 jilles

sh: Add testcases for double-quotes within quoted ${var+-...} (non-POSIX).

POSIX leaves things like "${var+"word"}" undefined.
We follow traditional ash behaviour here.
Hence, these testcases also work on stable/8.


206759 17-Apr-2010 jilles

sh: On startup of the shell, use PWD from the environment if it is valid.
Unset PWD if it is incorrect and no value for it can be determined.
This preserves the logical current directory across shell invocations.

Example (assuming /home is a symlink):
$ cd
$ pwd
/home/foo
$ sh
$ pwd
/home/foo

Formerly the second pwd would show the physical path (symlinks resolved).


206711 16-Apr-2010 jilles

fnmatch: Fix bad FNM_PERIOD disabling if an asterisk has been seen.

Example: fnmatch("a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD)

PR: 116074
MFC after: 1 week


206710 16-Apr-2010 jilles

Add some tests for fnmatch(3).

MFC after: 1 week


206491 11-Apr-2010 jilles

sh: Test that bogus values of PWD are not imported from the environment.

Current versions pass this test trivially by never importing PWD, but I plan
to change sh to import PWD if it is an absolute pathname for the current
directory, possibly containing symlinks.


206168 04-Apr-2010 jilles

sh: Add test for nested arithmetic substitution.

Pre-r206145 sh changes nested arithmetic substitution to parentheses, which
is not always correct, as exercised by this test.


206167 04-Apr-2010 jilles

sh: Add test for some associativity in arithmetic.


206150 03-Apr-2010 jilles

sh: Do tilde expansion in substitutions.

This applies to word in ${v-word}, ${v+word}, ${v=word}, ${v?word} (which
inherits quoting from the outside) and in ${v%word}, ${v%%word}, ${v#word},
${v##word} (which does not inherit any quoting).

In all cases tilde expansion is only attempted at the start of word, even if
word contains spaces. This agrees with POSIX and other shells.

This is the last part of the patch tested in the exp-run.

Exp-run done by: erwin (with some other sh(1) changes)


206149 03-Apr-2010 jilles

sh: Fix duplicate variable name in test.


206148 03-Apr-2010 jilles

sh: Add some testcases for the working parts of tilde expansion.


206147 03-Apr-2010 jilles

sh: Allow quoting pattern match characters in ${v%pat} and ${v#pat}.

Note that this depends on r206145 for allowing pattern match characters to
have their special meaning inside a double-quoted expansion like "${v%pat}".

PR: bin/117748
Exp-run done by: erwin (with some other sh(1) changes)


206145 03-Apr-2010 jilles

sh: Fix various things about expansions:
* remove the backslash from \} inside double quotes inside +-=?
substitutions, e.g. "${$+\}a}"
* maintain separate double-quote state for ${v#...} and ${v%...};
single and double quotes are special inside, even in a double-quoted
string or here document
* keep track of correct order of substitutions and arithmetic

This is different from dash's approach, which does not track individual
double quotes in the parser, trying to fix this up during expansion.
This treats single quotes inside "${v#...}" incorrectly, however.

This is similar to NetBSD's approach (as submitted in PR bin/57554), but
recognizes the difference between +-=? and #% substitutions hinted at in
POSIX and is more refined for arithmetic expansion and here documents.

PR: bin/57554
Exp-run done by: erwin (with some other sh(1) changes)


206143 03-Apr-2010 jilles

sh: Add some testcases for the working parts of ${v%...} and ${v#...}.


205427 21-Mar-2010 edwin

Replace -b with -C and -B (as proposed by Alexander).
Add -3, -A and -B to the usage.
Update regression test for the new parameters.


205225 16-Mar-2010 kib

Add missing headers. While there, arrange headers alphabetically.

MFC after: 3 days


205224 16-Mar-2010 kib

Add missing headers.

MFC after: 3 days


205154 14-Mar-2010 jilles

sh: Do not abort on a redirection error on a compound command.

Redirection errors on subshells already did not abort the shell because
the redirection is executed in the subshell.

Other shells seem to agree that these redirection errors should not abort
the shell.

Also ensure that the redirections will be cleaned up properly in cases like
command eval '{ shift x; } 2>/dev/null'

Example:
{ echo bad; } </var/empty/x; echo good


205153 14-Mar-2010 jilles

sh: Add test for redirection error on subshell (should not abort).


205151 14-Mar-2010 kib

Remove dot at the end of errx() message.

Noted by: bde
MFC after: 3 days


205149 14-Mar-2010 kib

Adjust style, fix typo, do not print errno because it is meaningless there.
This test fails for now.

MFC after: 3 days


205148 14-Mar-2010 kib

Make it compile on LP64 arches.

MFC after: 3 days


205147 14-Mar-2010 edwin

Create regression tests for ncal:

- A couple of tests to check if the layout of the generated calenders
is correct.

- A couple of tests to see if impossible combinations for -3, -A,
-m, -y etc properly abort.

- A couple of test to confirm that the order of -A, -B, -3 etc give
the right number of months.


205138 13-Mar-2010 jilles

sh: Do not abort on a redirection error if there is no command word.

Although simple commands without a command word (only assignments and/or
redirections) are much like special builtins, POSIX and most shells seem to
agree that redirection errors should not abort the shell in this case. Of
course, the assignments persist and assignment errors are fatal.

To get the old behaviour portably, use the ':' special builtin.
To get the new behaviour portably, given that there are no assignments, use
the 'true' regular builtin.


205136 13-Mar-2010 jilles

sh: Add test for assignment errors (e.g. trying to change a readonly var).
We currently ignore readonly status for assignments before regular builtins
and external programs (these assignments are not persistent anyway), so just
check that the readonly variable really is not changed.
The test depends on the command builtin changes for 'command :'.


205105 12-Mar-2010 jilles

sh: Add tests for " and $ inside `.


204842 07-Mar-2010 jilles

sh: Add some testcases for ${v=w}, ${v-w}, ${v+w}.

These expansions, which were already in the Bourne shell, work correctly for
the most part. The testcases are only about the parts that already work
correctly.


204836 07-Mar-2010 jilles

sh: Add various testcases for here documents.

They are mainly about expansions in here documents but because all the
testcases are in $() command substitution, we also test that $() command
substitution is recursively parsed (or very close to it).


204802 06-Mar-2010 jilles

sh: Make sure to popredir() even if a function caused an error.


204801 06-Mar-2010 jilles

sh: Make sure to popredir() even if a special builtin caused an error.


204800 06-Mar-2010 jilles

sh: Improve the command builtin:
* avoid unnecessary fork
* allow executing builtins via command
* executing a special builtin via command removes its special properties

Obtained from: NetBSD (parts)


204761 05-Mar-2010 jh

- Use errx(3) instead of err(3) when checking if snprintf(3) succeeded.
snprintf(3) doesn't set errno in the tested cases.
- If the same argument reference (for example %1) was specified more than
once, the command didn't necessarily fit to the final command buffer. Fix
this using a dynamic sbuf buffer. Add a few regression tests for the case.

PR: bin/95079
No objections: freebsd-hackers


204627 03-Mar-2010 joel

The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD


204608 02-Mar-2010 joel

The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD


204586 02-Mar-2010 joel

The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD


204585 02-Mar-2010 uqs

Always assign WARNS using ?=

- fix some nearby style bugs
- include Makefile.inc where it makes sense and reduces duplication

Approved by: ed (co-mentor)


204311 25-Feb-2010 ru

Fixed missing or broken library dependencies.


204294 24-Feb-2010 brucec

Update the sendfile regression test so that it outputs results in the
TAP format.
Add a checksum to verify that the data hasn't been corrupted between
being read from disk and being received.

Approved by: rrs (mentor)


204123 20-Feb-2010 attilio

Add a regression test for the kthread(9) interface.

Submitted by: Giovanni Trematerra
<giovanni dot trematerra at gmail dot com>


204017 17-Feb-2010 jilles

sh: arith: Add a test for a bug in the dash arith code,
which I plan to import at some point.
Our current code handles it fine and it should stay that way.


204016 17-Feb-2010 jilles

sh: arith: Test an octal constant as well.


203952 16-Feb-2010 uqs

Add missing newline in last line of file.

Uncovered via: fromcvs vs. svn
Approved by: ed (co-mentor)


203802 12-Feb-2010 pjd

- Implement -q option for pgrep(1).
- Add regression test to test -q option.


203800 12-Feb-2010 ru

Fixed error checking of pthread(3) functions.

PR: 143807
Submitted by: pluknet (partly)


203677 08-Feb-2010 jilles

sh: Make sure the mail2.0 test can actually fail if $MAIL is not touched.


203576 06-Feb-2010 jilles

sh: Do not stat() $MAIL/$MAILPATH in non-interactive shells.

These may be NFS mounted, and we should not touch them unless we are going
to do something useful with the information.


201715 07-Jan-2010 davidxu

Don't forget to use fourth argument if O_CREAT is set in argument oflag.
The fourth specifies initial value for the semaphore.


201575 05-Jan-2010 davidxu

Add test code for POSIX semaphore implementation.


201526 04-Jan-2010 obrien

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)


201491 04-Jan-2010 obrien

Fix formatting.


201490 04-Jan-2010 obrien

There are actually 129 tests here.


201489 04-Jan-2010 obrien

Catch up with UNIX98-style PTY's.


201488 04-Jan-2010 obrien

'prove -r' isn't as smart as grog thought.


201482 04-Jan-2010 obrien

You need to be root to run this test.


201481 04-Jan-2010 obrien

Also cleanup after the test run.


201480 04-Jan-2010 obrien

Don't process 'lastcomm' if "AUTOMATED" is defined.
The tests for it require manual setup.


201479 04-Jan-2010 obrien

It is expected these are chmod +x.


201478 04-Jan-2010 obrien

Regression test for r201456.


201431 03-Jan-2010 jilles

sh: Send the "not found" message for builtin <cmd> to redirected fd 2.


201428 03-Jan-2010 jilles

sh: Add a regression test that tries out all arithmetic ops.

MFC after: 1 week


201427 03-Jan-2010 obrien

Use t1 & t2 as more symbolic than 'a' and 'b' for the two times.


201426 03-Jan-2010 obrien

Provide clean output with 'prove -r'.


201422 03-Jan-2010 obrien

Hide expected error output so the 'prove -r' results are easy to read.


201421 03-Jan-2010 obrien

Allow to be driven by 'prove -r'.


201420 03-Jan-2010 obrien

Make sure 'pack' is usable for 'prove -r'.


201419 03-Jan-2010 obrien

Transform from kernel file to userland source.


201366 01-Jan-2010 jilles

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


201350 31-Dec-2009 brooks

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


201344 31-Dec-2009 jilles

sh: Use PATH= assignment in type.

Example:
PATH=/var/empty; PATH=/bin type ls


201343 31-Dec-2009 jilles

sh: Allow command -pv and command -pV (lookup using _PATH_STDPATH).


201333 31-Dec-2009 obrien

Delete the svn:mime-type property from these text files.


201259 30-Dec-2009 jilles

sh: arith: Return only 0 and 1 from && and ||.

This agrees with C, POSIX and other shells.


201145 28-Dec-2009 antoine

(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


201048 27-Dec-2009 trasz

Make tests for ACL preservation by mv(1) and cp(1) more complete
and easier to follow.


200998 25-Dec-2009 jilles

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 .'.


200811 21-Dec-2009 trasz

Add regression test for NFSv4 ACLs on UFS.


200573 15-Dec-2009 rwatson

Merge libkqueue test suite through r119

Submitted by: Mark Heily <mark@heily.com>


200483 13-Dec-2009 rwatson

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)


200442 12-Dec-2009 jh

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)


200193 06-Dec-2009 jilles

sh: Test ;<newline> as well as ; in the 'for' parser test.


199983 01-Dec-2009 green

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.


199955 29-Nov-2009 jilles

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.


199953 29-Nov-2009 jilles

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.


199722 23-Nov-2009 jkim

Make this test case little bit more interesting.


199647 22-Nov-2009 jilles

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.


199641 21-Nov-2009 jilles

trap: do not consider a bad signal name a fatal error.
POSIX explicitly prescribes this.
Continue processing any other signals and return status 1.


199632 21-Nov-2009 stefanf

Add a test for r199631.


199628 21-Nov-2009 stefanf

Add a few very basic tests for cd -{L,P} and pwd -{L,P}.


199605 20-Nov-2009 jkim

Correct copyright date in the BPF regression test.


199604 20-Nov-2009 jkim

Adjust BPF JIT compiler regression tests to catch up with r199603.


199499 19-Nov-2009 jkim

Add a test case for very long BPF program.


199282 14-Nov-2009 jilles

sh: Allow a newline before "in" in a for command, as required by POSIX.


199214 12-Nov-2009 des

Add test-pidfile.c and increase warning level.


199213 12-Nov-2009 des

Test cases for pidfile(3) - including two designed to catch issues arising
from the incorrect use of fcntl(2) instead of flock(2).


199212 12-Nov-2009 des

Fix warnings and remove one unnecessary use of vfork(). The other could
also be removed with a little more work.


199211 12-Nov-2009 des

Fix warnings


199141 10-Nov-2009 jhb

Purge some useless mergeinfo.


199134 10-Nov-2009 des

Check fork() return value


198454 24-Oct-2009 jilles

sh: Exempt $@ and $* from set -u

This seems more useful and will likely be in the next POSIX standard.

Also document more precisely in the man page what set -u does (note that
$@, $* and $! are the only special parameters that can ever be unset, all
the others are always set, although they may be empty).


198453 24-Oct-2009 jilles

Add some tests for ${var?} and set -u.


198406 23-Oct-2009 jilles

wordexp(3): fix some bugs with signals and long outputs
* retry various system calls on EINTR
* retry the rest after a short read (common if there is more than about 1K
of output)
* block SIGCHLD like system(3) does (note that this does not and cannot
work fully in threaded programs, they will need to be careful with wait
functions)

PR: 90580
MFC after: 1 month


198305 20-Oct-2009 pjd

Fix a case where rename actually succeeds, which is also expected behaviour
according to POSIX. This fixes ZFS on Solaris testing.

Submitted by: Milan Cermak <Milan.Cermak@Sun.COM>


198225 19-Oct-2009 des

Update copyright.


198224 19-Oct-2009 des

Remove redundant $FreeBSD$.


197965 11-Oct-2009 kib

Tweaks for sigqueue tests:
- slightly adjust code for style, sort headers.
- in sigqtest2, print received signals, to make it easy to see why test
failed.
- in sigqtest2, job_control_test(), cover a race by adding sleep after
child stopped itself to allow for SIGCHLD due to stop and exit to not
be coalesced.

MFC after: 2 weeks


197849 07-Oct-2009 delphij

Fix build on amd64.

PR: misc/139409
Submitted by: gk


197820 06-Oct-2009 jilles

sh: Send the "xyz: not found" message to redirected fd 2.
This also fixes that trying to execute a non-regular file with a command
name without '/' returns 127 instead of 126.
The fix is rather simplistic: treat CMDUNKNOWN as if the command were found
as an external program. The resulting fork is a bit wasteful but executing
unknown commands should not be very frequent.

PR: bin/137659


197781 05-Oct-2009 rwatson

A few regression tests for SOCK_SEQPACKET UNIX domain sockets.

Sponsored by: Google


197753 04-Oct-2009 das

Regression tests for r197752 (handling of empty/NULL buffers).


197713 02-Oct-2009 bz

Replace the name of the sysctl to security.bsd.map_at_zero and to be
consistent updated the name of the variable as well, after the change
in r197711.


197691 01-Oct-2009 jilles

sh: Disallow mismatched quotes in backticks (`...`).

Due to the amount of code removed by this, it seems that allowing unmatched
quotes was a deliberate imitation of System V sh and real ksh. Most other
shells do not allow unmatched quotes (e.g. bash, zsh, pdksh, NetBSD /bin/sh,
dash).

PR: bin/137657


197543 27-Sep-2009 bz

Add a simple C program to check mmap calls to various different addresses.
The most important test is the mapping fixed at address 0 depending on the
new sysctl.

Things will be updated and possibly converted to m4/.t style once the
details about the kernel patch will be shaken out.

Submitted by: simon (initial version)


197509 25-Sep-2009 des

Wipe out mergeinfo.


197436 23-Sep-2009 trasz

Add cross-filesystem regression tests for ACLs.


197434 23-Sep-2009 trasz

Add ACL fuzzer. It's not used by the regression tests right now,
but I'd prefert to have it here, so it won't get lost.


197432 23-Sep-2009 jhb

- Remove a bogus test: setsockopt() doesn't return a length, getsockopt()
does.
- Use %z to printf a size_t to fix compile on 64-bit platforms.


197362 20-Sep-2009 dds

IEEE Std 1003.1, 2004 Edition states:

"The escape sequence '\n' shall match a <newline> embedded in
the pattern space."

It is unclear whether this also applies to a \n embedded in a
character class. Disable the existing handling of \n in a character
class following Mac OS X, GNU sed version 4.1.5 with --posix, and
SunOS 5.10 /usr/bin/sed.

Pointed by: Marius Strobl
Obtained from: Mac OS X


197361 20-Sep-2009 dds

Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementation
of the y (translate) command.

"If a backslash character is immediately followed by a backslash
character in string1 or string2, the two backslash characters shall
be counted as a single literal backslash character"

Pointed by: Marius Strobl
Obtained from: Mac OS X


197360 20-Sep-2009 dds

Add correct test results.


197357 20-Sep-2009 dds

Describe how other systems treat this case.


197356 20-Sep-2009 dds

Allow [ to be used as a delimiter.

Pointed by: Marius Strobl
Obtained from: Apple


197352 20-Sep-2009 dds

The transition to Subversion allows us to rename files without
repo-copy hacks.
Remove the test-number prefix from the name of the output files,
so that new test cases can be easily added.


196948 07-Sep-2009 trasz

Add regression tests for NFSv4 ACL granular permission enforcement.


196938 07-Sep-2009 trasz

Add regression tests for NFSv4 ACLs and update POSIX.1e tests to the changed
error messages.


196736 01-Sep-2009 trasz

Adapt to the fact that ls(1) correctly prints '+' for symlinks with ACLs now.


196710 31-Aug-2009 trasz

Add regression test for ACLs on device files - mostly to make
sure we don't crash on attempt to set ACL on them.


196696 31-Aug-2009 jhb

Delete some empty mergeinfo.


196634 28-Aug-2009 jilles

sh: Fix crash with empty functions (f() { }) introduced in r196483

Empty pairs of braces are represented by a NULL node pointer, just like
empty lines at the top level.

Support for empty pairs of braces may be removed later. They make the code
more complex, have inconsistent behaviour (may or may not change $?), are
not specified by POSIX and are not allowed by some other shells like bash,
dash and ksh93.

Reported by: kan


196607 27-Aug-2009 jilles

Add some tests for a fixed bug in an uncommitted patch.
(Trying to get syntax errors for sh -c ':; do' and `:; do`.)


196554 25-Aug-2009 jilles

Add some tests for poll(2)/shutdown(2) interaction.


196483 23-Aug-2009 jilles

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


196172 13-Aug-2009 bz

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)


195878 25-Jul-2009 kib

Fix syntax error, makefile comments start with #.

Submitted by: bde
Approved by: re (kensmith)


195636 12-Jul-2009 kib

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)


195443 08-Jul-2009 brian

Fix some uninitialise variables.

PR: 136383
Submitted by: Ulrich Spoerlein - uqs at spoerlein dot net
Approved by: re (kib)
MFC after: 3 weeks


195296 02-Jul-2009 trasz

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)


194981 25-Jun-2009 jilles

Add some tests for r194975 and r194977.

Approved by: ed (mentor) (implicit)


194922 24-Jun-2009 jilles

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)


194897 24-Jun-2009 jilles

Add test for r190698.

Submitted by: Eygene Ryabinkin
Approved by: ed (mentor) (implicit)


194775 23-Jun-2009 jilles

Add tests for r194774.

Approved by: ed (mentor) (implicit)


194546 20-Jun-2009 rwatson

Up the scale of the SPX loopback check a bit: use much larger data sizes
so that we need to do segmentation.


194517 19-Jun-2009 jilles

Add tests for r194406 and r194516.

Approved by: ed (mentor)


194262 15-Jun-2009 jhb

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


194196 14-Jun-2009 jilles

Add tests for r194127 and r194128.

Approved by: ed (mentor)


193592 06-Jun-2009 des

Check that flopen() can lock against self and that children inherit the lock.


193373 03-Jun-2009 pjd

lchflags(2) takes int, not u_long like chflags(2) and fchflags(2).
Strange, isn't it?

Pointed out by: bde


193178 31-May-2009 stefanf

Add tests for r193169.


192949 28-May-2009 zml

Add a regression test for multiple threads of the same process acquiring the same fcntl lock.

Approved by: dfr (mentor)


192897 27-May-2009 des

Increment the counter outside the subshell.


192891 27-May-2009 edwin

Add the regression test for bin/date.


192849 26-May-2009 des

Add a regression test for kern/21768.

MFC after: 1 week


192733 25-May-2009 brian

Regression test the 'addr1,+N' feature added in r192732


192482 20-May-2009 edwin

Add regression tests for the date(1) + argument for user-defined
format strings.

PR: bin/127514
Submitted by: edwin@
MFC after: 1 week


191010 13-Apr-2009 stefanf

Add a test for r191009.


191000 13-Apr-2009 trasz

Add a few more regression tests for POSIX.1e ACLs.


190773 06-Apr-2009 das

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@


190300 22-Mar-2009 stefanf

Test the r190298 change.


190296 22-Mar-2009 stefanf

Add a few tests for the read built-in.


190285 22-Mar-2009 stefanf

Update test for r190284.


190271 22-Mar-2009 stefanf

Update and extend the tests for alias.


189833 14-Mar-2009 pjd

Oops. Correct comment in the LICENSE file.


189832 14-Mar-2009 pjd

Regression tests for mac_portacl(4).


189801 14-Mar-2009 rdivacky

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)


189613 10-Mar-2009 rwatson

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>


189543 08-Mar-2009 rwatson

In UNIX domain socket GC regression test, after setting a socket
non-blocking, EINPROGRESS is an acceptable result from connect().


189142 28-Feb-2009 das

Tests for getdelim().


189141 28-Feb-2009 das

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.


189140 28-Feb-2009 das

Tests for wcscasecmp(), wcsnlen(), and stpncpy().


189092 26-Feb-2009 ed

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


188934 23-Feb-2009 pjd

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>


188483 11-Feb-2009 rwatson

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


187963 31-Jan-2009 das

Test wprintf() in addition to printf().


187962 31-Jan-2009 das

Add tests for conj{,f,l}() that I wrote some time ago. These test the
versions in libm, not the gcc builtins.


187334 16-Jan-2009 pjd

Be more Solaris-friendly.

Submitted by: Milan Cermak <Milan.Cermak@Sun.COM>


187332 16-Jan-2009 ed

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


186082 14-Dec-2008 ume

Bootstrapping merge history for resolver.


185402 28-Nov-2008 stefanf

Update for 185401, errors now go to stderr.


185304 25-Nov-2008 trasz

Add tools-level test for POSIX.1e functionality.

Approved by: rwatson (mentor)


185252 24-Nov-2008 pjd

This actually works on Linux, I just had wrong directory permission.

Found by: trasz


185251 24-Nov-2008 pjd

Include TODO messages even if tests succeeds, so we can detect when something
suddenly started to work.


185232 23-Nov-2008 stefanf

Add a test for r185231.


185229 23-Nov-2008 pjd

Mark all the places where Linux is not POSIX-compilant. Tested on ext3.


185227 23-Nov-2008 pjd

fstest for Linux:
- Use -- when needed so Linux getopt(3) won't get confused.
- Follow POSIX more closely.

Submitted by: Szabolcs Szakacsits <szaka@ntfs-3g.org>


185223 23-Nov-2008 pjd

fstest for Linux:
Automatically detect file system type.


185221 23-Nov-2008 pjd

FreeBSD's way of handling rmdir("..") is not POSIX-compilant.


185220 23-Nov-2008 pjd

Shorter version.


185219 23-Nov-2008 pjd

Add support for pathconf(2).


185218 23-Nov-2008 pjd

Detect operating system automatically.


185216 23-Nov-2008 pjd

fstest for Linux:
- Use /dev/urandom, it is more portable.
- Implement todo() function which allows to mark known failures.


185173 22-Nov-2008 pjd

IFp4: Regression tests for FreeBSD/ZFS chflags(2)/lchflags(2).


185029 17-Nov-2008 pjd

Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.

This bring huge amount of changes, I'll enumerate only user-visible changes:

- Delegated Administration

Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.

- L2ARC

Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.

- slog

Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).

- vfs.zfs.super_owner

Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.

- chflags(2)

Not all the flags are supported. This still needs work.

- ZFSBoot

Support to boot off of ZFS pool. Not finished, AFAIK.

Submitted by: dfr

- Snapshot properties

- New failure modes

Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests

- Refquota, refreservation properties

Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.

- Sparse volumes

ZVOLs that don't reserve space in the pool.

- External attributes

Compatible with extattr(2).

- NFSv4-ACLs

Not sure about the status, might not be complete yet.

Submitted by: trasz

- Creation-time properties

- Regression tests for zpool(8) command.

Obtained from: OpenSolaris


184852 11-Nov-2008 dds

Add a test for the "or more" part of the following POSIX specification.

"A function can be preceded by one or more '!' characters, in which
case the function shall be applied if the addresses do not select
the pattern space."


184749 07-Nov-2008 trasz

Make test for write access to the directory being moved a little more
specific.

Approved by: rwatson (mentor)


184748 07-Nov-2008 trasz

Improve output when a test fails.

Approved by: rwatson (mentor)


184737 06-Nov-2008 trasz

Change ZFS behaviour to match UFS: when moving (rename(2)) a subdirectory
from one parent directory to another, in addition to the usual access checks
one also needs write access to the subdirectory being moved.

Approved by: rwatson (mentor), pjd


184588 03-Nov-2008 dfr

Implement support for RPCSEC_GSS authentication to both the NFS client
and server. This replaces the RPC implementation of the NFS client and
server with the newer RPC implementation originally developed
(actually ported from the userland sunrpc code) to support the NFS
Lock Manager. I have tested this code extensively and I believe it is
stable and that performance is at least equal to the legacy RPC
implementation.

The NFS code currently contains support for both the new RPC
implementation and the older legacy implementation inherited from the
original NFS codebase. The default is to use the new implementation -
add the NFS_LEGACYRPC option to fall back to the old code. When I
merge this support back to RELENG_7, I will probably change this so
that users have to 'opt in' to get the new code.

To use RPCSEC_GSS on either client or server, you must build a kernel
which includes the KGSSAPI option and the crypto device. On the
userland side, you must build at least a new libc, mountd, mount_nfs
and gssd. You must install new versions of /etc/rc.d/gssd and
/etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf.

As long as gssd is running, you should be able to mount an NFS
filesystem from a server that requires RPCSEC_GSS authentication. The
mount itself can happen without any kerberos credentials but all
access to the filesystem will be denied unless the accessing user has
a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There
is currently no support for situations where the ticket file is in a
different place, such as when the user logged in via SSH and has
delegated credentials from that login. This restriction is also
present in Solaris and Linux. In theory, we could improve this in
future, possibly using Brooks Davis' implementation of variant
symlinks.

Supporting RPCSEC_GSS on a server is nearly as simple. You must create
service creds for the server in the form 'nfs/<fqdn>@<REALM>' and
install them in /etc/krb5.keytab. The standard heimdal utility ktutil
makes this fairly easy. After the service creds have been created, you
can add a '-sec=krb5' option to /etc/exports and restart both mountd
and nfsd.

The only other difference an administrator should notice is that nfsd
doesn't fork to create service threads any more. In normal operation,
there will be two nfsd processes, one in userland waiting for TCP
connections and one in the kernel handling requests. The latter
process will create as many kthreads as required - these should be
visible via 'top -H'. The code has some support for varying the number
of service threads according to load but initially at least, nfsd uses
a fixed number of threads according to the value supplied to its '-n'
option.

Sponsored by: Isilon Systems
MFC after: 1 month


184090 20-Oct-2008 des

#ifdef out the lock-against-self test. I'm not sure it makes sense, and
it relies on non-portable flock(2) semantics. Not only is flock(2) not
portable, but on some OSes that do have it, it is implemented in terms
of fcntl(2) locks, which are per-process rather than per-descriptor.


183676 07-Oct-2008 rwatson

Update udpzerobyte to understand that passing 0 as a length to recv(2)
will cause it to return 0, not EAGAIN.

Add UNIX domain socket support to udpzerobyte, which suggests this
regression test should be moved to the general sockets test area rather
than netinet.


183668 07-Oct-2008 rwatson

Add IPv6 support to zero-size UDP transmit/receive test.


183666 07-Oct-2008 rwatson

Regression test for the loopback handling of zero-length UDP packets, which
should be delivered but without payload.


183652 06-Oct-2008 rwatson

Add very simple regression test for fstat(2) on sockets: make sure it
returns success for various socket types. It's easy to imagine this
being enhanced to validate the returned data, but...


182903 10-Sep-2008 maxim

o Correct a comment: a test file size is a four pages not three.


182711 03-Sep-2008 das

Regression tests for bugs in gdtoa.


182531 31-Aug-2008 rwatson

Update README to reflect removal of netatm/harp test parts some time ago.

MFC after: 3 days


182464 29-Aug-2008 jkim

Connect a forgotten test case to Makefile.


182459 29-Aug-2008 jkim

Do not pass validatation level since all issues are fixed now.


182457 29-Aug-2008 jkim

Merge local copy of bpf_validate() with bpf_filter.c.


182452 29-Aug-2008 pjd

By default backup geli metadata to a file. It is quite critical 512 bytes,
once it is lost, all data is gone.

Option '-B none' can by used to prevent backup. Option '-B path' can be
used to backup metadata to a different file than the default, which is
/var/backups/<prov>.eli.

The 'geli init' command also prints backup file location and gives short
procedure how to restore metadata.

The 'geli setkey' command now warns that even after passphrase change or keys
update there could be version of the master key encrypted with old
keys/passphrase in the backup file.

Add regression tests to verify that new functionality works as expected.

Update other regression tests so they don't create backup files.

Reviewed by: keramida, rink
Dedicated to: a friend who lost 400GB of his live by accidentally overwritting geli metadata
MFC after: 2 weeks


182428 29-Aug-2008 jkim

Merge bpf_filter.c r182425 and add test cases for jump range checks.

While I am here, fix stupid typos in test0080.h and make it JIT compiler only.


182417 28-Aug-2008 jkim

Move comments to the right places.


182415 28-Aug-2008 jkim

Merge bpf_filter.c r182412 and remove additional local checks.

While I am here, use more realistic value for illegal code test case.


182393 28-Aug-2008 jkim

Fix style consistencies and a comment.


182382 28-Aug-2008 jkim

Merge bpf_filter.c r182380 and remove additional local checks
for BPF_STX and BPF_LDX|BPF_MEM instructions.


182377 28-Aug-2008 jkim

Add a test case for uninitialized scratch memory (for JIT compiler).


182301 27-Aug-2008 stefanf

Add a test for r182300.


182221 26-Aug-2008 jkim

Add a test case for null filter.


182219 26-Aug-2008 jkim

Add more test cases for invalid instructions and add comments
about bpf_validate(9) issues.


182185 26-Aug-2008 jkim

Remove some hacks from regression test since bpf_filter.c builds fine now.


182183 25-Aug-2008 jkim

Add a trivial bpf filter benchmark.


182182 25-Aug-2008 jkim

Use sys/net/bpf_jitter.c instead of rolling our own version
since it is compilable on user land now.


182175 25-Aug-2008 jkim

Reflect sys/net/bpf_jitter.h changes to regression test.


181857 18-Aug-2008 jkim

Add test case for 'divide by 0' with BPF_ALU|BPF_DIV|BPF_X instruction.


181855 18-Aug-2008 jkim

Fix two test cases on 32-bit architectures.


181847 18-Aug-2008 jkim

Add simple bpf(9) regression tests and test cases.


181463 09-Aug-2008 des

Add sbuf_new_auto as a shortcut for the very common case of creating a
completely dynamic sbuf.

Obtained from: Varnish
MFC after: 2 weeks


181206 02-Aug-2008 das

Test that the result is correctly rounded when |y/x| is huge.


181155 02-Aug-2008 das

Regression tests for fmtcheck(3).

Obtained from: NetBSD


181150 02-Aug-2008 scf

Detect if the application has cleared the environ variable by setting
the first value (environ[0]) to NULL. This is in addition to the
current detection of environ being replaced, which includes being set to
NULL. Without this fix, the environment is not truly wiped, but appears
to be by getenv() until an *env() call is made to alter the enviroment.

This change is necessary to support those applications that use this
method for clearing environ such as Dovecot and Postfix. Applications
such as Sendmail and the base system's env replace environ (already
detected). While neither of these methods are defined by SUSv3, it is
best to support them due to historic reasons and in lieu of a clean,
defined method.

Add extra units tests for clearing environ using four different methods:
1. Set environ to NULL pointer.
2. Set environ[0] to NULL pointer.
3. Set environ to calloc()'d NULL-terminated array.
4. Set environ to static NULL-terminated array.

Noticed by: Timo Sirainen

MFC after: 3 days


181149 02-Aug-2008 scf

Fix whitespace.


181076 31-Jul-2008 das

Add some tests for acos*(), asin*(), atan*(), and atan2*().


181022 30-Jul-2008 stefanf

Add a regression test for r181017.

Submitted by: simon


180967 29-Jul-2008 rwatson

Remove extra comment that snuck in in last commit.


180966 29-Jul-2008 rwatson

Add a simple ICMPv6 filter test for IPv6 raw sockets: determine that
the default ICMPv6 filter is pass all, test that we can set it to block
all and restore to pass all. No attempt is made to test that the
filtering works, just that we can get and set it.


180237 03-Jul-2008 das

Add regression tests for fmin{,f,l} and fmax{,f,l}.
I wrote these to test amd64 asm functions that used
maxss, maxsd, minss, and minsd, but it turns out that
those instructions don't handle NaNs and signed zero
in the same way as fmin() and fmax() are required to,
so we're stuck with the C versions for now.


180209 03-Jul-2008 peter

Exclude .cvsignore files from $FreeBSD$ checking


180208 03-Jul-2008 peter

Set magic fbsd:nokeywords property that allows files to bypass
keyword expansion. (file-specific replacement for CVSROOT/exclude)


180103 29-Jun-2008 das

Add some regression tests for printf() with positional arguments.
The first test comes from OpenBSD, and the others are additions or
adaptations.

This is based on OpenBSD's
src/regress/lib/libc/sprintf/sprintf_test.c, v1.3.
I deliberately did not use v1.4 because it's bogus.


180059 27-Jun-2008 jhb

Rework the lifetime management of the kernel implementation of POSIX
semaphores. Specifically, semaphores are now represented as new file
descriptor type that is set to close on exec. This removes the need for
all of the manual process reference counting (and fork, exec, and exit
event handlers) as the normal file descriptor operations handle all of
that for us nicely. It is also suggested as one possible implementation
in the spec and at least one other OS (OS X) uses this approach.

Some bugs that were fixed as a result include:
- References to a named semaphore whose name is removed still work after
the sem_unlink() operation. Prior to this patch, if a semaphore's name
was removed, valid handles from sem_open() would get EINVAL errors from
sem_getvalue(), sem_post(), etc. This fixes that.
- Unnamed semaphores created with sem_init() were not cleaned up when a
process exited or exec'd. They were only cleaned up if the process
did an explicit sem_destroy(). This could result in a leak of semaphore
objects that could never be cleaned up.
- On the other hand, if another process guessed the id (kernel pointer to
'struct ksem' of an unnamed semaphore (created via sem_init)) and had
write access to the semaphore based on UID/GID checks, then that other
process could manipulate the semaphore via sem_destroy(), sem_post(),
sem_wait(), etc.
- As part of the permission check (UID/GID), the umask of the proces
creating the semaphore was not honored. Thus if your umask denied group
read/write access but the explicit mode in the sem_init() call allowed
it, the semaphore would be readable/writable by other users in the
same group, for example. This includes access via the previous bug.
- If the module refused to unload because there were active semaphores,
then it might have deregistered one or more of the semaphore system
calls before it noticed that there was a problem. I'm not sure if
this actually happened as the order that modules are discovered by the
kernel linker depends on how the actual .ko file is linked. One can
make the order deterministic by using a single module with a mod_event
handler that explicitly registers syscalls (and deregisters during
unload after any checks). This also fixes a race where even if the
sem_module unloaded first it would have destroyed locks that the
syscalls might be trying to access if they are still executing when
they are unloaded.

XXX: By the way, deregistering system calls doesn't do any blocking
to drain any threads from the calls.
- Some minor fixes to errno values on error. For example, sem_init()
isn't documented to return ENFILE or EMFILE if we run out of semaphores
the way that sem_open() can. Instead, it should return ENOSPC in that
case.

Other changes:
- Kernel semaphores now use a hash table to manage the namespace of
named semaphores nearly in a similar fashion to the POSIX shared memory
object file descriptors. Kernel semaphores can now also have names
longer than 14 chars (up to MAXPATHLEN) and can include subdirectories
in their pathname.
- The UID/GID permission checks for access to a named semaphore are now
done via vaccess() rather than a home-rolled set of checks.
- Now that kernel semaphores have an associated file object, the various
MAC checks for POSIX semaphores accept both a file credential and an
active credential. There is also a new posixsem_check_stat() since it
is possible to fstat() a semaphore file descriptor.
- A small set of regression tests (using the ksem API directly) is present
in src/tools/regression/posixsem.

Reported by: kris (1)
Tested by: kris
Reviewed by: rwatson (lightly)
MFC after: 1 month


180036 26-Jun-2008 jhb

Fix compile on 64-bit platforms.


180025 26-Jun-2008 dfr

Re-implement the client side of rpc.lockd in the kernel. This implementation
provides the correct semantics for flock(2) style locks which are used by the
lockf(1) command line tool and the pidfile(3) library. It also implements
recovery from server restarts and ensures that dirty cache blocks are written
to the server before obtaining locks (allowing multiple clients to use file
locking to safely share data).

Sponsored by: Isilon Systems
PR: 94256
MFC after: 2 weeks


179934 22-Jun-2008 rwatson

Teach fifo_create regression test to also try to use mknod(2) to create
fifos, as this is required by the Single UNIX Specification, although
not currently implemented on FreeBSD.

While here, fix a bug in the directory timestamp checking test by
sleeping after querying the starting timestamp, rather than before.


179919 21-Jun-2008 das

Regression test for a recently fixed strtod bug.


179331 26-May-2008 rwatson

Remove two netatm-specific test parts.

MFC after: 3 weeks
Spotted by: bz


179084 18-May-2008 rdivacky

Simple testing program for *at family of syscalls.

Approved by: kib (mentor)


179023 15-May-2008 stefanf

Test the expansion of $LINENO.


179017 15-May-2008 adrian

Add the ability to do all read, all write, or random read/write.


178823 07-May-2008 adrian

Include a very basic (and beta) tool for stressing disks using the POSIX
AIO calls.

This small program queues up a controllable number of concurrent AIO
read operations w/ controllable io size against a disk or regular file.
There are a few other things to add (notably optional write support!)
but it works well enough at the present time to stress the AIO code out
relatively harshly in the disk IO case.


178431 23-Apr-2008 scf

Add four utility functions related to struct grp processing modeled in-part
after similar calls related to struct pwd in libutil/pw_util.c:
- gr_equal()
Perform a deep comparison of two struct grp's. It does a thorough, yet
unoptimized comparison of all the members regardless of order.

- gr_make()
Create a string (see group(5)) from a struct grp.

- gr_dup()
Duplicate a struct grp. Returns a value that is a single contiguous
block of memory.

- gr_scan()
Create a struct grp from a string (as produced by gr_make()).

MFC after: 3 weeks


178430 23-Apr-2008 scf

Differentiate in the tests against getenv() between an empty string and a
NULL by having the test program return *NULL* for NULL's (no existing
variable) instead of an empty string (variable with empty value).


178141 12-Apr-2008 das

Updates for changes in the way printf() handles hex floating point
numbers.


177876 03-Apr-2008 das

Add some tests for fma(), fmaf(), and fmal().


177767 30-Mar-2008 das

Test remainderl() and remquol() as well.


177763 30-Mar-2008 das

Add some minimal tests for csqrtl().


177638 26-Mar-2008 dfr

Fix the __FreeBSD_version check.


177636 26-Mar-2008 dfr

Add some regression tests for posix record locks.


177498 22-Mar-2008 stefanf

Add a test case for options.c revision 1.26.


176957 08-Mar-2008 antoine

Introduce a new F_DUP2FD command to fcntl(2), for compatibility with
Solaris and AIX.
fcntl(fd, F_DUP2FD, arg) and dup2(fd, arg) are functionnaly equivalent.
Document it.
Add some regression tests (identical to the dup2(2) regression tests).

PR: 120233
Submitted by: Jukka Ukkonen
Approved by: rwaston (mentor)
MFC after: 1 month


176748 02-Mar-2008 das

Don't run tests that assume <= 64-bit precision on machines with quad
precision.


176676 01-Mar-2008 scf

Remove a dereference. It was unintended and a no-op.

Use the correct value of errno. Although the errno value passed into
printf() follows the *env() call, it is not guaranteed to be the errno
from that call. When I wrote the regression tester, the environment I
used did pass the errno from the call. Consolidate the print for the
return code and errno into a function in the process of fixing this.

Approved by: wes (mentor)


176522 24-Feb-2008 stefanf

Add a regression test for cd.c's revision 1.35.


176407 19-Feb-2008 ru

getopt(3) returns -1, not EOF.


176379 18-Feb-2008 das

Some basic regression tests for {sin,cos,tan}{,f,l}().


176375 17-Feb-2008 das

There are 3 tests here, not 2.


176294 14-Feb-2008 rwatson

Add open_to_operation, a security regression test that opens files with
various open flags and then tests various operations to make sure that
they are properly constrained by open flags. Various I/O mechansms
are tried, including aio if compiled into the kernel or loaded as a
module. There's more to be done here but it's a useful start, running
about 220 individual tests.

This is in support of FreeBSD-SA-08:03.sendfile.


176050 06-Feb-2008 des

mutex_islocked_np -> mutex_isowned_np


176043 06-Feb-2008 silby

This is a regression test to verify the proper behavior of IP ID generation
code. It will push 200000 packets, then report back what the min and max
periods it saw for different IDs were.


175969 04-Feb-2008 des

After careful consideration (and a brief discussion with attilio@), change
the semantics of pthread_mutex_islocked_np() to return true if and only if
the mutex is held by the current thread.

Obviously, change the regression test to match.

MFC after: 2 weeks


175957 03-Feb-2008 des

Add a regression test for pthread_mutex_islocked_np().

MFC after: 2 weeks


175821 30-Jan-2008 rwatson

Add unix_sorflush, a regression test for the following scenario:

- Process (a) is blocked in read on a socket waiting on data.
- Process (b) is blocked in shutdown() on a socket waiting on (a).
- Process (c) delivers a signal to (b) interrupting its wait.

When the signal is delivered, the kernel panics as sblock() fails in
sorflush(). Even if it didn't panic, shutdown() would block potentially
indefinitely waiting for recv() to succeeded. Fixes to follow.

Reported by: Jos Backus <jos at catnook dot com>


175467 18-Jan-2008 das

expm1(-big) generates an inexact exception but not underflow.


175463 18-Jan-2008 das

Add some regression tests for libm's exponential functions. These
mostly just test corner cases rather than accuracy. Some of the
tests don't pass right now if you compile libm at -O2 due to gcc
constant-folding some things that it shouldn't. I'll fix that
shortly.


175383 16-Jan-2008 jhb

Add a set of regression tests for the POSIX shm API (shm_open(2) and
shm_unlink(2)).


175310 14-Jan-2008 das

Tests for lrintl() and llrintl(). I didn't add anything specially
tailored for the long double format; instead, I just modified the existing
tests to test lrintl() and llrintl() as well.


175289 13-Jan-2008 keramida

Attach the tr(1) regression tests to the build.

Approved by: das, dds


175288 13-Jan-2008 keramida

Add a new set of regression tests, for the tr(1) utility.

Approved by: das, dds


175015 31-Dec-2007 rwatson

Add regression tests for UNIX domain socket garbage collection. Should be
run from single-user mode, as they look at global open file and inflight
descriptor counts to check for leaks.


174773 19-Dec-2007 dds

Update the number of reported tests to keep prove(1) happy.


174772 19-Dec-2007 dds

Correct the "move file from directory to existing directory" test for
cross-device moves.


174748 18-Dec-2007 dds

Portability improvements to investigate behavior of other OSs.
Now works under Solaris and Linux.


174747 18-Dec-2007 dds

Add more tests. All rename(2)-based tests now succeed.
The performance of the cross-device equivalents is under investigation.


174692 16-Dec-2007 das

Fix an amusing typo that has prevented this from compiling since 2004.


174691 16-Dec-2007 das

Don't try the long double tests on i386. Our reduced precision
can cause them to fail.


174688 16-Dec-2007 das

Remove another Alpha remnant.


174685 16-Dec-2007 das

Regression tests for nan{,f,l}().


174658 16-Dec-2007 dds

Verify that the moved source is no longer there.


174657 16-Dec-2007 dds

Regression tests for upcoming makeup of mv.
Case 20 corresponds to PR bin/118367.


174656 16-Dec-2007 dds

Make the reported number of tests match their actual number.
This fixes the reporting under prove(1)


174655 16-Dec-2007 dds

cd to the correct directory so that the tests can be run from prove(1)


174619 15-Dec-2007 das

Regression tests for csqrt(3).


174495 09-Dec-2007 das

Remove some test instrumentation. (The Symbol.map changes broke it anyway.)


174494 09-Dec-2007 das

Fixes to avoid overzealous constant folding.


174491 09-Dec-2007 das

gcc 4 does some overzealous constant folding, and since it doesn't
support FENV_ACCESS, that was causing this test to fail. Use a volatile
to avoid the constant folding.


174228 03-Dec-2007 das

Make sure we set the locale to "C" when testing thousands' separator
support, rather than just "", which refers to the system default based
on the environment.


174205 03-Dec-2007 das

Tests for rounding, and for the leading 0's bug.


174033 28-Nov-2007 bz

Convert errx(-1, ..., strerror(errno)) to err(-1, ...).

Discussed with: rwatson


174032 28-Nov-2007 bz

Add support for tcpmd5 tests.
Add README.tcpmd5 to describe how to build a simple test setup
and run tests.

Convert compile time options to run time options [1].

Discussed with: rwatson
Suggested by: rwatson [1]


173679 16-Nov-2007 bz

Remove empty setup and cleanup functions for the pfkey test.

Add regression tests for privileged and supposedly unprivileged
IP_IPSEC_POLICY,IPV6_IPSEC_POLICY setsockopt cases.

We may need to review the current 'good' results to make
sure they reflect what we really want.

Discussed with: rwatson
Reviewed by: rwatson


173578 13-Nov-2007 bz

In sys/netipsec/keysock.c rev. 1.19 a missing priv check was added.
Before that non-su users were able to open pfkey sockets as well.

Add a regression test so we can detect such problems in an automated way
in the future.


173009 26-Oct-2007 pjd

Hide geli warnings about sector size beeing bigger than the page size when
doing regression testing.


172440 04-Oct-2007 stefanf

The exit status of a case statement where none of the patterns is matched
is supposed to be 0, not the status of the previous command.

Reported by: Eygene Ryabinkin
PR: 116559
Approved by: re (gnn)


172106 09-Sep-2007 rwatson

Enhance and expand kernel privilege regression tests in support of
work present in FreeBSD 7.0 to refine the kernel privilege model:

- Introduce support for jail as a testing variable, in order to
confirm that privileges are properly restricted in the jail
environment.

- Restructure overall testing approach so that privilege and jail
conditions are set in the testing infrastructure before tests
are invoked, and done so in a custom-created process to isolate
the impact of tests from each other in a more consistent way.

- Tests now provide setup and cleanup hooks that occur before and
after the test runs.

- New privilege tests are now present for several audit
privileges, several credential management privileges, dmesg
buffer reading privilege, and netinet raw socket creation.

- Other existing tests are restructured and generally improved as
a result of better framework structure and jail as a variable.
For exampe, we now test that certain sysctls are writable only
outside jail, while others are writable within jail. On a
similar note, privileges relating to setting UFS file flags are
now better exercised, as with the right to chmod and utimes
files.

Approved by: re (bmah)
Obtained from: TrustedBSD Project


172031 01-Sep-2007 pjd

Add support for Camellia encryption algorithm.

PR: kern/113790
Submitted by: Yoshisato YANAGISAWA <yanagisawa@csg.is.titech.ac.jp>
Approved by: re (bmah)


171801 10-Aug-2007 delphij

New regression test updates for rename, etc.

Obtained from: NetBSD
Approved by: re (tmpfs blanket)


171707 03-Aug-2007 des

Add regression tests for flopen(3).

Approved by: re (blanket)


171525 20-Jul-2007 scf

Added environ-replacement detection. For programs that "clean" (i.e., su)
or replace (i.e., zdump) the environment after a call to setenv(), putenv()
or unsetenv() has been made, a few changes were made.
- getenv() will return the value from the new environ array.
- setenv() was split into two functions: __setenv() which is most of the
previous setenv() without checks on the name and setenv() which
contains the checks before calling __setenv().
- setenv(), putenv() and unsetenv() will unset all previous values and
call __setenv() on all entries in the new environ array which in turn
adds them to the end of the envVars array. Calling __setenv() instead
of setenv() is done to avoid the temporary replacement of the '=' in a
string with a NUL byte. Some strings may be read-only data.

Added more regression checks for clearing the environment array.

Replaced gettimeofday() with getrusage() in timing regression check for
better accuracy.

Fixed an off-by-one bug in __remove_putenv() in the use of memmove(). This
went unnoticed due to the allocation of double the number of environ
entries when building envVars.

Fixed a few spelling mistakes in the comments.

Reviewed by: ache
Approved by: wes
Approved by: re (kensmith)


171486 18-Jul-2007 pjd

Make fstest work out-of-the-box on Solaris:
- Solaris' setgroups(2) doesn't change process' effective gid, so set it
explicitly.
- POSIX doesn't define O_NOFOLLOW. FreeBSD returns EMLINK when target is
a symbolic link, but Solaris returns ELOOP then.
- Solaris doesn't define O_SHLOCK and O_EXLOCK flags.

Approved by: re (rwatson)


171285 06-Jul-2007 delphij

Add a test case for sed(1) regression - we should not ignore case
when not being asked to do so.

Approved by: re (hrs)


171206 04-Jul-2007 ssouhlal

Add case-insensitive matching to sed, using the 'I' flag, similarly to GNU sed.
For example,
sed /foo/Id
sed s/foo/bar/Ig

Reviewed by: dds
Approved by: re (hrs)


171195 04-Jul-2007 scf

Significantly reduce the memory leak as noted in BUGS section for
setenv(3) by tracking the size of the memory allocated instead of using
strlen() on the current value.

Convert all calls to POSIX from historic BSD API:
- unsetenv returns an int.
- putenv takes a char * instead of const char *.
- putenv no longer makes a copy of the input string.
- errno is set appropriately for POSIX. Exceptions involve bad environ
variable and internal initialization code. These both set errno to
EFAULT.

Several patches to base utilities to handle the POSIX changes from
Andrey Chernov's previous commit. A few I re-wrote to use setenv()
instead of putenv().

New regression module for tools/regression/environ to test these
functions. It also can be used to test the performance.

Bump __FreeBSD_version to 700050 due to API change.

PR: kern/99826
Approved by: wes
Approved by: re (kensmith)


171046 26-Jun-2007 delphij

Fix a obsecure coredump while testing with tmpfs on amd64.

Approved by: re (kensmith)


171030 25-Jun-2007 delphij

id generation is now handled by uma(9) subsystem,
so remove the (now) irrevelent test case.

Requested by: Howard Su
Approved by: re (tmpfs blanket)


171016 24-Jun-2007 bushman

- Bugs in gethostbyXXX/getipnodebyXXX regression tests fixed.
Tests for getipnodebyXXX functions now cover most number of flags
combinations.

Approved by: re (kensmith), brooks (mentor)


170809 16-Jun-2007 delphij

MFp4: Add regression tests for tmpfs.

Obtained from: NetBSD via p4
Submitted by: Howard Su


170737 14-Jun-2007 harti

Make the order of tests the same for user and kernel. Use the natural
layer order from bottom to top.


170614 12-Jun-2007 bms

Add regression test for SSM code.


170613 12-Jun-2007 bms

Import rewrite of IPv4 socket multicast layer to support source-specific
and protocol-independent host mode multicast. The code is written to
accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work.

This change only pertains to FreeBSD's use as a multicast end-station and
does not concern multicast routing; for an IGMPv3/MLDv2 router
implementation, consider the XORP project.

The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6,
which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html

Summary
* IPv4 multicast socket processing is now moved out of ip_output.c
into a new module, in_mcast.c.
* The in_mcast.c module implements the IPv4 legacy any-source API in
terms of the protocol-independent source-specific API.
* Source filters are lazy allocated as the common case does not use them.
They are part of per inpcb state and are covered by the inpcb lock.
* struct ip_mreqn is now supported to allow applications to specify
multicast joins by interface index in the legacy IPv4 any-source API.
* In UDP, an incoming multicast datagram only requires that the source
port matches the 4-tuple if the socket was already bound by source port.
An unbound socket SHOULD be able to receive multicasts sent from an
ephemeral source port.
* The UDP socket multicast filter mode defaults to exclusive, that is,
sources present in the per-socket list will be blocked from delivery.
* The RFC 3678 userland functions have been added to libc: setsourcefilter,
getsourcefilter, setipv4sourcefilter, getipv4sourcefilter.
* Definitions for IGMPv3 are merged but not yet used.
* struct sockaddr_storage is now referenced from <netinet/in.h>. It
is therefore defined there if not already declared in the same way
as for the C99 types.
* The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF
which are then interpreted as interface indexes) is now deprecated.
* A patch for the Rhyolite.com routed in the FreeBSD base system
is available in the -net archives. This only affects individuals
running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces.
* Make IPv6 detach path similar to IPv4's in code flow; functionally same.
* Bump __FreeBSD_version to 700048; see UPDATING.

This work was financially supported by another FreeBSD committer.

Obtained from: p4://bms_netdev
Submitted by: Wilbert de Graaf (original work)
Reviewed by: rwatson (locking), silence from fenner,
net@ (but with encouragement)


170608 12-Jun-2007 yar

Don't forget to clear out the hold space for each subsequent file
when in -i mode so that each file gets a clean context of its own.

Add a regression test for the bug.

Tested with: regression tests


170448 09-Jun-2007 grog

Updated tests for changed features.

Submitted by: edwin@


170261 04-Jun-2007 grog

Use correct comment syntax for $FreeBSD$. This file gets put through
cpp, not a shell script.

Pointy hat to: grog


170231 03-Jun-2007 grog

Add regression tests for calendar.

Submitted by: edwin@
PR: bin/113275
MFC after: 2 weeks


169928 24-May-2007 dds

Add sparc64 regression test files.

Submitted by: Carl Johan Gustavsson


169927 24-May-2007 dds

Modify file generation instructions to remove the tty field:
the mapping from number to name differs between systems,
and will cause tests to fail.


169921 23-May-2007 dds

Fix the procedure for generating the test summary files.
Document the procedure for obtaining an appropriately old version of sa.


169856 22-May-2007 dds

Regression tests for sparc64 record formats.

Submitted by: Carl Johan Gustavsson


169855 22-May-2007 dds

Regression tests for amd64 file and record formats.

Submitted by: Larry Rosenman (who also provided access to a testing host)


169854 22-May-2007 dds

Regression tests for the new and legacy process accounting formats.


169852 22-May-2007 dds

Document the .in .out file naming conventions adopted in commit_prep.pl's
exclusions list for header checking.


169851 22-May-2007 dds

Test the integer-arithmetic float conversions encode_timeval and encode_long
in kern_acct.c.


169523 13-May-2007 rwatson

Add regression tests for ethers(3) functions, including new _r variants.
Four tests currently fail:

test_ether_line_bad_1() and test_ether_line_bad_2() due to bugs in
ether_line(3).

test_ether_ntohost() and test_ether_hostton() due to not being fully
implemented tests.


169311 06-May-2007 rwatson

Add a regression test to detect if waiting on the I/O serialization lock
on socket buffers is interruptible or not, which detacts the regression I
introduced recently in 7-CURRENT (spotted by alfred). This test passes
in older -CURRENT, and with the as-yet uncommitted sx_xlock_sig and
sblock fix patches.


168925 21-Apr-2007 mtm

Regression tests for recent changes to inet6_rth_* family of functions
regarding RFC3542 compliance.


168921 21-Apr-2007 yar

Change the semantics of -i (in-place editing) so that it treats
each file independently from other files. The new semantics are
desired in the most of practical cases, e.g.: delete lines 5-9
from each file.

Keep the previous semantics of -i under a new option, -I, which
uses a single continuous address space covering all files to edit
in-place -- they are too cool to just drop them.

Add regression tests for -i and -I.

Approved by: dds
Compared with: GNU sed
Discussed on: -hackers
MFC after: 2 weeks


168912 20-Apr-2007 pjd

Test sending 0 bytes.


168911 20-Apr-2007 pjd

Fix length calculation.


168855 19-Apr-2007 des

Valid error codes for err() and errx() are 1..255.
The correct format specifier for ssize_t is %zd.


168854 19-Apr-2007 pjd

Add more tests to verify last sendfile(2) breakage: test sending more
than a page size and nbytes=0.


168754 15-Apr-2007 bushman

Committing regression tests for all implemented nsswitch databases.
Detailed description and instructions are in the README file.
This work had been basically done during GSoC 2006.

Approved by: brooks (mentor)


168662 12-Apr-2007 bms

Nuke ipblock. A more complete multicast regression test suite is on the way.


168548 09-Apr-2007 bms

Fix a bug whereby group addresses were incorrectly computed in the test.

[Since the change to strict refcounting for in_multi objects, this test
began to fail; formerly the refcount was a count of the number of requests
for a given address, NOT a count of pointers to the object.]


168444 06-Apr-2007 bms

Add a small test program for the additional socket options which
RFC 3678 (Source-specific Multicast API) brings to FreeBSD.


168278 02-Apr-2007 jhb

Fix a fd leak in socketpair():
- Close the new file objects created during socketpair() if the copyout of
the new file descriptors fails.
- Add a test to the socketpair regression test for this edge case.


168273 02-Apr-2007 jhb

Add another fd leak test for accept() I used to test the fix in 1.234 of
sys/kern/uipc_syscall.c.


168259 02-Apr-2007 yar

Logically separate the complex `hanoi' and `math' tests from basic tests.


168258 02-Apr-2007 yar

Don't forget to close the range if we branched over its end
and had no chance to match it by the 2nd address precisely.
Otherwise the unclosed range would bogusly extend to the end
of stream.

Add a basic regression test for the bug fixed. (This change
also fixes the more complex case 5.3 from `multitest.t'.)

Compared with: SUN and GNU seds
Tested by: regression tests
MFC after: 1 week


168257 02-Apr-2007 yar

Today SUN and GNU seds fully agree on test 5.3 and behave
in a more reasonable way than BSD sed does: they properly
close the range even if we branched over its end. No doubt,
the range `1,5' should not match lines from 9 through 14.


168211 01-Apr-2007 yar

This trivial change should fix at least 3 similar bugs. All of
them are related to the `c' function's need to know if we are at
the actual end of the address range. (It must print the text not
earlier than the whole pattern space was deleted.) It appears the
only sed function with this requirement.

There is `lastaddr' set by applies(), which is to notify the `c'
function, but it can't always help because it's false when we are
hitting the end of file early. There is also a bug in applies()
due to which `lastaddr' isn't set to true on degenerate ranges such
as `$,$' or `N,$' if N appears the last line number.

Handling early EOF condition in applies() could look more logical,
but it would effectively revert sed to the unreasonable behaviour
rev. 1.26 of main.c fought against, as it would require lastline()
be called for each line within each address range. So it's better
to call lastline() only if needed by the `c' function.

Together with this change to sed go regression tests for the bugs
fixed (c1-c3). A basic test of `c' (c0) is also added as it helped
me to spot my own error.

Discussed with: dds
Tested by: the regression tests
MFC after: 1 week


167893 26-Mar-2007 gnn

Adding tests for Camellia which will be added to the tree soon.
Added tests for aes-ctr which were not present before.


167866 24-Mar-2007 gnn

Update the regression test so that there are actually two independent
networks involved, as opposed to two hosts on one network.

MFC after: 1 week


167763 21-Mar-2007 gnn

Add a test for IPv6 and IPsec which is similar to the one for IPv4.
Add comments to the test for IPv4 with IPsec.
MFC after: 1 week


167569 14-Mar-2007 dds

Rename sed.test to multitest.t to comply with the naming scheme of
the regression suite.


167555 14-Mar-2007 dds

Reinstate error-testing regression tests.


167552 14-Mar-2007 dds

Integrate the tests I wrote in 1992 with our current regression
testing framework and protocol.


167550 14-Mar-2007 dds

Reference results for sed.test (to be renamed into multitest.t).
I have verified these with GNU sed 4.1.5 (and in some cases with Solaris
sed) and they are identical, with the following exceptions:
5.3: The result is unspecified and BSD sed behaves differently.
6.3: GNU sed gets it wrong
7.1: GNU sed gets it wrong
7.8: BSD sed gets it wrong


167549 14-Mar-2007 dds

- Uncomment tests that were commented out
- Update platform-conditional tests to reflect current reality
- Fix conditional for test 7.8: it is the fault of BSD sed


167547 14-Mar-2007 dds

- It looks like BSD and GNU sed can nowadays pass two more tests.
- Test 7.8 fails for GNU sed not BSD.


167546 14-Mar-2007 dds

Use another non-printing test; address 0 now has a special meaning in GNU sed.


167545 14-Mar-2007 dds

Document a procedure for testing individual binaries under development.


167544 14-Mar-2007 dds

Update tests to reflect the state of the art of sed in HEAD and
GNU sed 4.1.5.
Almost all of the tests that were skipped for BSD or GNU sed
now appear to work.


167537 14-Mar-2007 dds

Add sed math regression test.


167536 14-Mar-2007 dds

Add Towers of Hanoi regression test.


167531 14-Mar-2007 dds

Add missing newline to correct failure of the regression test.
According to IEEE Std 1003.1, 2004 "Whenever the pattern space is
written to standard output or a named file, sed shall immediately
follow it with a <newline>."

An attempt at the same correction might have been made with r1.3,
which is however identical with r1.2.


167512 13-Mar-2007 bms

Add raw IP support (protocol 114) to ipbroadcast regression test.


167341 08-Mar-2007 bms

Add -A to specify local address for bind().


167340 08-Mar-2007 bms

Support IP_SENDIF in -CURRENT.


167149 01-Mar-2007 bms

Add -t to set IP TTL.


167140 01-Mar-2007 bms

Introduce a test program for IPv4 broadcast datagram send.


166961 25-Feb-2007 bms

Add a regression test for ethernet link-layer multicast memberships.


166437 02-Feb-2007 bms

For the IPv4 multicast membership socket regression test:
Add command line flags to increase the number of test iterations.
Be deterministic by default, for automated operation.
Better document assumptions.


166289 28-Jan-2007 pjd

Simple README file which shows how to use fstest.


166232 25-Jan-2007 pjd

MFp4: - When new object is created, it's group ID can be set to process'
effective group ID or to group ID of its parent directory.
- Add some comments from POSIX.
- Verify that after successful O_TRUNC open, size is equal to 0.


166231 25-Jan-2007 pjd

MFp4: When user is not a member of the group which owns a file, even if
he is the file's owner, he can't set set-gid bit.
POSIX requires to return 0 and clear the bit, but FreeBSD returns
EPERM for UFS in such case. For now do the same in ZFS.


166065 17-Jan-2007 pjd

Add 3436 file system regression tests in 184 files.
Almost all regression tests are based on very flexible fstest tool.
They verify correctness (POSIX conformance) of almost all file
system-related system calls.

The motivation behind this work is my ZFS port and POSIX, who doesn't
provide free test suites.

Runs on: FreeBSD/UFS, FreeBSD/ZFS, Solaris/UFS, Solaris/ZFS

To try it out:

# cd fstest
# make
# find tests/* -type d | xargs prove


165984 12-Jan-2007 rwatson

Ignore EINPROGRESS error on TCP connect(), and pick up the result of the
non-blocking connect later using select(). This case didn't trigger on
my UP test box, but did on Peter's SMP test box.

Spotted by: peter


165982 12-Jan-2007 rwatson

Add a regression test for sending and writing zero bytes to sockets of
various types, as well as pipes and fifos for good measure. RELENG_6
currently passes all of these tests, but 7-CURRENT fails 0-byte writes
and sends on all stream socket types (and fifos, as they are based on
stream sockets).

Bumped into by: peter
Diagnosed by: jhb
Problem of: andre


165931 11-Jan-2007 stefanf

Add regression tests for exec.c rev 1.30.


165856 07-Jan-2007 das

Fix a few of the tests so that correct implementations actually pass them.


165829 06-Jan-2007 davidxu

Fix compiling.


165754 03-Jan-2007 das

Remove the test that ensures that when the string "nan(...)" is converted
to floating-point, the result is a quiet NaN. The current implementation
may return a signaling NaN, and the vendor has no plans for changing this,
for reasons explained in the comment I added.


165748 03-Jan-2007 das

Fix cut-and-paste bugs in the regression tests.


165503 23-Dec-2006 bms

Drop all received data mbufs from a socket's queue if the MT_SONAME
mbuf is dropped, to preserve the invariant in the PR_ADDR case.

Add a regression test to detect this condition, but do not hook it
up to the build for now.

PR: kern/38495
Submitted by: James Juran
Reviewed by: sam, rwatson
Obtained from: NetBSD
MFC after: 2 weeks


164928 06-Dec-2006 davidxu

initialize mutex and cv.


164899 05-Dec-2006 davidxu

Fix spelling.


164898 05-Dec-2006 davidxu

Add a test for pthread's cv and cancellation.


164856 03-Dec-2006 dds

New test cases demonstrating fixed bugs, and the reason why
fmtcheck can't be used.


164558 23-Nov-2006 yar

Fix and extend the -j option to pkill/pgrep WRT the jail
wildcard specifications. Earlier the only wildcard syntax
was "-j 0" for "any jail". There were at least
two shortcomings in it: First, jail ID 0 was abused; it
meant "no jail" in other utils, e.g., ps(1). Second, it
was impossible to match processed not in jail, which could
be useful to rc.d developers. Therefore a new syntax is
introduced: "-j any" means any jail while "-j none" means
out of jail. The old syntax is preserved for compatibility,
but now it's deprecated because it's limited and confusing.

Update the respective regression tests. While I'm here,
make the tests more complex but sensitive: Start several
processes, some in jail and some out of jail, so we can
detect that only the right processes are killed by pkill
or matched by pgrep.

Reviewed by: gad, pjd
MFC after: 1 week


164342 16-Nov-2006 jkim

Fix message size tests for msgsnd(3) and msgrcv(3). msgsz is the length of
actual message and it should not include size of message type.


164298 15-Nov-2006 rwatson

Add a short regression test to try to exercise races in the non-atomic
nature of implied connect via sendto(). Oddly, uipc_usrreq.c implements
this for stream sockets, but doesn't set the flag in its protocol
definition so that it can actually be used. As such, the stream test is
implemented but doesn't run for now.


164192 11-Nov-2006 maxim

o Indent by tab.


164191 11-Nov-2006 maxim

o Add several regression tests for dup(2), dup2(2) and fcntl(F_DUPFD).

Obtained from: OpenBSD


164083 07-Nov-2006 jkim

Use z modifier for size_t and ssize_t.


164041 06-Nov-2006 dds

Add the examples from the manual page.


164040 06-Nov-2006 dds

Updated results for bin/68981

PR: bin/68981


164024 06-Nov-2006 dds

Regress.out is now regress.x.out.


164022 06-Nov-2006 dds

Test the handling of supplied and default parameters.


164004 05-Nov-2006 stefanf

Add regression tests for PR 105078.


163153 09-Oct-2006 maxim

o Grammar.

Submitted by: kris


163150 09-Oct-2006 maxim

o Enable test-sparceaout test since alc@ has fixed the panic in rev. 1.229
sys/vm/vnode_pager.c.
cVS: ----------------------------------------------------------------------


162432 19-Sep-2006 pjd

Move readonly.t regression tests file to where it belongs.
I accidentally added it to a wrong directory.


162354 16-Sep-2006 pjd

Add regression tests for 'geli configure' subcommand.

MFC after: 1 week


162349 16-Sep-2006 pjd

Regression tests for read-only option (attach -r).

MFC after: 1 week


162271 13-Sep-2006 rwatson

dd a series of regression tests to validate that privilege requirements are
implemented properly for a number of kernel subsystems. In general, they
try to exercise the privilege first as the root user, then as a test user,
in order to determine when privilege is being checked.

Currently, these tests do not compare inside/outside jail, and probably
should be enhanced to do that.

Sponsored by: nCircle Network Security, Inc.
Obtained from: TrustedBSD Project


161526 22-Aug-2006 ru

Remove alpha left-overs.


160985 04-Aug-2006 jb

Fix for architectures where sizeof(void *) > sizeof(int).


160786 28-Jul-2006 simon

Add a test program which performs some very basic tests of libmp(3).
It is by no means expected to perform a complete test of the library
for correctness, but is meant to test the API to make sure libmp (or
libcrypto) updates don't totally break the library.


160500 19-Jul-2006 rwatson

Add a test case for closing a UDPv6 socket that has been connected to
the IPv6 loopback address.

Warns ?= 2.


160499 19-Jul-2006 rwatson

Add very basic regression test for netinet6: create and close raw,
UDP, and TCP IPv6 sockets.


160416 17-Jul-2006 marcel

Add regression tests of the emulation of the long branch conditional form.
These tests can obviously only be run on Merced processors, as they don't
implement the long branch.


160202 09-Jul-2006 maxim

o style.Makefile(5): WARNS= -> WARNS?=.


160201 09-Jul-2006 rwatson

When extending a file with truncate, check that newly added bytes have
a value of 0 in the extended region.

Make sure that we get EINVAL back if we try to truncate a read-only
file descriptor.


160200 09-Jul-2006 rwatson

Add regression tests to make sure that attempting to call ftruncate() on
various non-file objects fails.


160199 09-Jul-2006 rwatson

Add very basic ftruncate() regression test, with a comment rather more
thorough than the tests regarding what should be tested.


159328 06-Jun-2006 pjd

Add regression tests for geli(8) authentication feature.

Supported by: Wheel Sp. z o.o. (http://www.wheel.pl)


159327 06-Jun-2006 pjd

- Update regression tests after recent changes.
- Verify various sector sizes.


159239 04-Jun-2006 pjd

Add regression tests for IPsec.


159099 31-May-2006 maxim

Output directory has gone, remove it from Makefile.


159098 31-May-2006 maxim

Fix test for empty interpreter.


159097 31-May-2006 maxim

o Add various regression tests for execve(2) syscall.

Obtained from: NetBSD


159095 31-May-2006 maxim

o Let getopt(3) report errors in command line arguments.
o If something is wrong with options, then output short usage help message.
o Output errstr returned from strtonum(3).

PR: bin/98141
Submitted by: Andrey Simonenko


159045 29-May-2006 maxim

o Add a collection of regression tests for ancillary (control)
data passing for unix domain sockets, stream and datagram.

There are 15 tests:

Test/Type of socket STREAM DGRAM
----------------------------------------------------------------------
Sending, receiving cmsgcred 1 6
Receiving sockcred (listening socket has LOCAL_CREDS) 2 n/a
Receiving sockcred (accepted socket has LOCAL_CREDS) 3 n/a
Receiving sockcred n/a 7
Sending cmsgcred, receiving sockcred 4 8
Sending, receiving timestamp 5 9
Sending, receiving cmsgcred (no control data) 10 13
Sending cmsgcred, receiving sockcred (no control data) 11 14
Sending, receiving timestamp (no control data) 12 15

Currently we pass 8 tests. All the rest marked as TODO.

PR: kern/90800
Submitted by: Andrey Simonenko


159032 29-May-2006 maxim

o Test truncate(2) on fifo: it should ignore the request and
return success.

PR: kern/98064
Submitted by: Kirk Russell


158911 25-May-2006 rwatson

Use WARNS and rely on rules rather than an explicit target for the
test binary.

Reported by: maxim


158910 25-May-2006 rwatson

Add a basic regression test for sendfile() over TCP, which sends varying
lengths of headers and data and makes sure it receives about the right
number of bytes.


158772 20-May-2006 maxim

o Convert to Test::Harness testing infratructure.


158577 14-May-2006 maxim

o A tiny regression test exposes bug in rip_disconnect().


158561 14-May-2006 bms

Add multicast group join/leave functionality to IPv4 regression
test suite.


158209 01-May-2006 pjd

For some time now, -i and -P options are mutually exclusive, there's even
a regression test init-i-P.t which asserts this, but it looks I forgot to
update nokey.t regression test.

MFC after: 1 day


157986 23-Apr-2006 dwmalone

Add some new options to mac_bsdestended. We can now match on:

subject: ranges of uid, ranges of gid, jail id
objects: ranges of uid, ranges of gid, filesystem,
object is suid, object is sgid, object matches subject uid/gid
object type

We can also negate individual conditions. The ruleset language is
a superset of the previous language, so old rules should continue
to work.

These changes require a change to the API between libugidfw and the
mac_bsdextended module. Add a version number, so we can tell if
we're running mismatched versions.

Update man pages to reflect changes, add extra test cases to
test_ugidfw.c and add a shell script that checks that the the
module seems to do what we expect.

Suggestions from: rwatson, trhodes
Reviewed by: trhodes
MFC after: 2 months


157622 10-Apr-2006 marcel

MFp4:
o Add mount and umount actions so that partitions can be in use.
o Extend the testing of the add verb to include overlapping
partitions.
o Add tests for the remove verb. this includes tests to remove
a partition when in use (i.e. is mounted).
o Add a MD5 checksum to the output of the conf action so that
it can be tested. Make sure the MD5 doesn't vary based on
certain dynamic behaviour that is irrelevant to the output.
o Add MD5 checksums to the expected result of conf actions.


157621 10-Apr-2006 marcel

MFp4:
Add support for read-write parameters. Allow an optional initializer
for read-write parameters. Print the value of those parameters on
success following the PASS.


157603 09-Apr-2006 rwatson

Add a simple regression test that creates and tears down route sockets,
and confirms that only SOCK_RAW works with socket(), and nothing works
with socketpair().


157602 09-Apr-2006 rwatson

Add simple regression tests that creates UNIX domain sockets using
socket() and socketpair() of SOCK_STREAM and SOCK_DGRAM types. It
also confirms that SOCK_RAW fails.


157600 09-Apr-2006 stefanf

Test that variable assignments preceding special built-ins affect the current
shell environment, eg after "VAR=val eval" VAR remains set. Currently fails
but will be implemented soon.


157428 03-Apr-2006 rwatson

Add a second pass to the close-before-accept test using a call to the
tcp drop sysctl. This should exercise the ECONNABORTED accept case.


157426 03-Apr-2006 rwatson

Add regression test for tcpdrop sysctl.


157425 03-Apr-2006 rwatson

Add a regression test to exercise the case where accept() is called and
the next waiting socket has had a close on the remote endpoint already.


157415 02-Apr-2006 stefanf

Add test cases that check utility syntax errors and redirection errors. For
special built-in utilities they must terminate the shell, for other
utilities only a error message shall be written. We currently fail both
tests.


157402 02-Apr-2006 rwatson

When running the second part of the test, kill off the server process from
the first part before starting, or the TCP port we want to bind may be in
use still. Sleep for a short period between tests.

Use SIGTERM instead of SIGKILL.


157401 02-Apr-2006 rwatson

Pass the right pid into the parent and child tasks so that when a test
fails, we kill the right partner process.


157400 02-Apr-2006 rwatson

Add makefile for tcpsocktimewait missed in previous commit.


157387 02-Apr-2006 rwatson

Add a short regression test that triggers a TCP socket to enter time wait
while the socket is still open; one variant closes the socket while in
time wait, and a second lets time wait expire while the socket is open.


157163 27-Mar-2006 rwatson

Add spxabort, a simple netipx/spx regression test that triggers
pru_abort() by closing a listen socket while completed connections are
presenting in its listen queue. Unfortunately, it's difficult to
trigger the other two pru_abort() cases using user APIs, so they are
not covered by this test.


157152 26-Mar-2006 rwatson

Add simple regression test to ping pong a data packet over SPX in stream
mode. Support both connection via connect() and sendto(), but don't
compile in sendto() for now, since netipx doesn't appear to actually
implement that (doh).


157151 26-Mar-2006 rwatson

Add a simple IPX datagram regression test, which opens two IPX datagram
sockets, binds a local port, sends a datagram, and confirms that it is
received.


157150 26-Mar-2006 rwatson

Add a short README with configuration hints to get the netipx regression
tests up and running. This is likely a message to myself in six months
when I've completely forgotten how.


157146 26-Mar-2006 rwatson

Modify ipxsocket regression test to create and close sockets several
times, with variable length sleeps between socket() and close(). This
will help to ensure that IPX/SPX timers fire while the sockets are
open, and hence have PCB's on the IPX pcb list, so that if timers are
going to stumble over PCB types they don't expect, it will happen as
part of this test.


157139 26-Mar-2006 rwatson

Add simple ipxsocket regression test: open, and close, various IPX socket
types supported by the FreeBSD netipx implementation.


156886 19-Mar-2006 rwatson

Merge Perforce change 93572 from TrustedBSD audit3 branch:

Simple audit pipe ioctl regression test.

Obtained from: TrustedBSD Project


156815 17-Mar-2006 rwatson

Change s_net to s_node when printing the destination address.


156775 16-Mar-2006 ru

NO_MAN is not needed here.


156735 15-Mar-2006 ru

Style: NO_MAN doesn't need any value.


156391 07-Mar-2006 ume

NOMAN --> NO_MAN


155561 12-Feb-2006 pjd

Add regression test which verifies that options -P and -i cannot be used
together.

MFC after: 3 days


155185 01-Feb-2006 pjd

Add regression tests which will verify that giving no key components for
init/attach/setkey subcommands is really impossible.

MFC after: 3 days


155087 31-Jan-2006 pjd

Add simple tests which verify that redzone(9) works properly.


154668 22-Jan-2006 davidxu

s/sigval/sival/g


153946 01-Jan-2006 avatar

Adding another multi-byte characters related regression test for recent
nmount(2) adoption.


153189 07-Dec-2005 pjd

Convert gstripe(8) regression tests to the new framework.


153188 07-Dec-2005 pjd

Convert gshsec(8) regression tests to the new framework.


153187 07-Dec-2005 pjd

Convert graid3(8) regression tests to the new framework.


153186 07-Dec-2005 pjd

- Make use of geom_subr.sh to improve regression tests.
- Keep class-specific data in conf.sh file.


153185 07-Dec-2005 pjd

Finish conversion of gconcat(8) regression tests to the new framework.


153184 07-Dec-2005 pjd

Add file with helper functions for geom tools regression tests.


153183 07-Dec-2005 pjd

Convert gnop(8) regression tests to the new framework.


153182 07-Dec-2005 pjd

Convert gmirror(8) regression tests to the new framework.


152832 26-Nov-2005 davidxu

Add code to test POSIX message queue.


152402 13-Nov-2005 marcel

Update to match geom_gpt:1.35

o Change the result of gctl(001) now that a bogus verb still requires
a valid geom,
o Insert gctl(024) to test for an appropriate error when a bogus verb
is given that does have a proper geom parameter.


152345 12-Nov-2005 marcel

Instead of saving the unit number of the md(4) device name, save the
whole name. This does not unnecessarily close the door that in some
future we want to test on something other than md(4) devices.

Also add a "conf" action so that we can check whether a gctl actually
did the right thing or not. It's one thing to check that the result
strings are as expected, but it doesn't tell us if the end result is
correct. This needs a bit more fleshing out, but for now a visual
(i.e. manual) check suffices.


152251 09-Nov-2005 rwatson

Add unix_passfd, a simple set of regression tests for UNIX domain socket
file descriptor passing. These tests are not all currently passed.


152186 08-Nov-2005 davidxu

Add code to test queued SIGCHLD.


152158 07-Nov-2005 pjd

Add tests for -t option with short tty name - pkill(1) should accept both
(eg. "ttyv0" and "v0").


152155 07-Nov-2005 davidxu

Add sigqueue test code.


151797 28-Oct-2005 stefanf

Add test cases for the command built-in, including its -v and -V options which
I'll commit real soon.

Count the number of found test cases instead of hard-coding them. Allow an
arbitrary exit status.


151443 18-Oct-2005 harti

Add first tests for semicolon handling. The first test fails. This is
probably a bug in the parser.


151442 18-Oct-2005 harti

Add more tests for escaped newline handling and fix a test that currently
should fail because of a bug in the parser (test 2).


151261 12-Oct-2005 ambrisko

This test can run now.


151172 09-Oct-2005 marcel

Rough implementation of the create and add verbs. The verbs cause
in-memory changes only and as such are only useful for prototyping
and regression testing purposes.


150956 05-Oct-2005 brooks

Add regression tests for trimdomain(3).


150734 29-Sep-2005 fjoe

Use mkuzip(8) instead of create_compressed_fs.


150332 19-Sep-2005 rwatson

Small regression test tool to generate two forms of ENOSPC on a file
system: out of blocks, and out of inodes. Useful for exercising the
uprintf(9) calls in UFS/ext2fs in order to detect races.


150308 19-Sep-2005 marcel

o Extend the suite to run more than just the driver. We need to run
mdconfig(8), because we need a disk to work on.
o Extend the number of tests now that we have a disk.
o Simplify the driver. All parameters are ASCII strings now.


150305 19-Sep-2005 marcel

Add the beginnings of a testsuite for testing GPT control requests.
The testsuite is based on a simple driver program that builds a
request from the arguments passed to it and issues the request to
Geom. The driver emits FAIL with the error string or PASS depending
on whether the request completed with an error or not. A -v option
has been added to the driver and causes the request to be dumped.
The -v option to prove(1) controls the -v option to the driver.

The testsuite itself contains a hash of which the key constitutes
the arguments and the value is the expected result.


150286 18-Sep-2005 rwatson

Add a regression test for listen()'s backlog argument, both at time of
creation and at time of update using an additional call to listen().
This test also exercises SO_LISTENQLIMIT, a forthcoming socket option
that allows the retrieval (but not setting) of the queue limit.

Discussed with: andre


150156 15-Sep-2005 maxim

Remove checks for shutdown(2) on non-connected socket.


150094 13-Sep-2005 rwatson

Add two small tests to set and clear two file I/O flags using ioctl on
a fifo: FIONBIO, FIOASYNC.


150093 13-Sep-2005 rwatson

Restructure fifo_io event-related tests in order to support test cases
relating to O_RDWR file descriptors, which while not defined in POSIX,
are in fact used:

(1) Revise assumption that we have two file descriptors when testing I/O
operations on a fifo. Provide cleanup routines that handle either
two or three file descriptors (including a kqueue descriptor).

(2) Add an openfifo_rw() routine to supplement openfifo().

(3) kqueue_setup() now configures an existing kqueue to monitor a new
file descriptor, rather than allocating a new kqueue to monitor two
existing file descriptors.

(4) Wrap all direct poll/select/kqueue/FIONREAD interactions in a single
function, assert_status(), which takes a file descriptor, kqueue
descriptor, assertion of read/writable/exception states, and
test description, then tests the assertion. This reduces the bulk
of calls in many of the tests, making them shorter, more readable,
and easier to determine correct.

(5) Add a new test_events_rdwr() function, which performs a basic create/
write/read event test on a O_RDWR fifo file descriptor. This is
currently failed by our fifo code in HEAD due to a bug in FIONREAD
handling. Fix to be merged shortly.


150091 13-Sep-2005 rwatson

Teach fifo_io how to use ioctl(FIONREAD) to determine if a fifo is
readable, and use that in addition to poll+select+kqueue to verify
appropriate readability.


150076 13-Sep-2005 rwatson

Remove a debugging printf.


150064 12-Sep-2005 rwatson

Comment test_lseek().

Add test_kqueue(), which registers and unregisters various kqueue filter
types on a fifo in order to make sure that EVFILT_READ, EVFILT_WRITE can
be registered, and that EVFILT_NETDEV can't be registered. For now, we
don't test that EVFILT_VNODE can be registered on fifos, as that has been
broken at some point.


150059 12-Sep-2005 rwatson

Further updates to fifo_io regression test:

- Teach fifo_io about kqueue monitoring of fifo file descriptor status,
and add test cases for kqueue to match existing case for poll and
select. Add a new cleanup routine, cleanfifokq(), for use in tests that
use kqueues. kqueue_setup() sets up kqueue sessions, and kqueue_status()
returns file descriptor status.

- Correct a bug in select handling relating to the nfds argument, which
was incorrect so resulted in select occuring on the wrong file descriptor,
and possible false positive/negative results.

- Clarify error reporting in one byte write+read tests to distinguish
errors in the after case from the before case.


150043 12-Sep-2005 maxim

o Add shutdown(2) regression tests. At the moment we cannot pass
shutdown-on-non connected socket test, kern/84761.


150032 12-Sep-2005 rwatson

Add fifo_misc, a regression test to hold misc. functional tests for fifos
that don't obviously fit into create, open, and io. For now, add only a
regression test to make sure that lseek() fails with ESPIPE (which it
doesn't).


150031 12-Sep-2005 rwatson

Use different temporary directory templates for fifo_io and fifo_open so
that if the tests fail to GC their working spaces, it's clear which it is.


150022 12-Sep-2005 rwatson

Add fifo_io, a regression test for I/O operations on POSIX fifos. We
currently can't pass this regression test due to broken poll() and
select() support for fifos, but past the basic I/O operation tests.


149998 11-Sep-2005 rwatson

After going to some trouble to create a temporary directory in which to run
fifo tests, chdir to it.


149985 11-Sep-2005 rwatson

Add fifo_open, a basic regression test for opening fifos, which tests
the blocking and non-blocking forms of open based on the POSIX spec for
now O_NONBLOCK should be handled.


149959 10-Sep-2005 rwatson

Add fifo_create, a simple regression test for mkfifo(2).


149796 05-Sep-2005 rwatson

Add a regression test to test two variations on the same bug: joining a
multicast group using a raw socket, then removing the interface on which
the group is found, and joining a multicast group using a udp socket,
then removing the interface on which the group is found. An if_disc
interface is used as the interface on which to attach.

NB: A panic currently results from running this regression test, so do
so with caution.

PR: 77665
Reported by: Gavin Atkinson <gavin dot atkinson at ury dot york dot ac dot uk>
Reported by: Brooks Davis <brooks at FreeBSD dot org>


149791 05-Sep-2005 stefanf

- Add tests for hash and return and more tests for set -e.
- Simplify regress.sh, sort tests.


149788 04-Sep-2005 stefanf

Simplify and add PR 77067 which addresses the same bug.


149785 04-Sep-2005 stefanf

Fix syntax error that crept in somehow.


149781 04-Sep-2005 stefanf

Add a couple of regression tests for /bin/sh.


149474 25-Aug-2005 pjd

Add regression tests for '-L' option.


149472 25-Aug-2005 pjd

'-F' option behaviour was reverted, so revert previous commit.


149436 24-Aug-2005 pjd

'-F' option now needs locked pidfile. Modify regression tests respectively.


148459 27-Jul-2005 pjd

Add regression tests (121 in total) for GEOM_ELI class.
To use them, run:

# prove /usr/src/tools/regression/geom_eli

Sponsored by: Wheel Sp. z o.o.
http://www.wheel.pl
MFC after: 1 week


148327 23-Jul-2005 pjd

Change jail IP from 1.0.0.127 to 127.0.0.1, which shows, that this test
doesn't examine the real issue as it pass without problems.


148311 22-Jul-2005 rwatson

Add a simple multicast socket regression test set:

- Test that the basic socket options have the right defaults, that we can
change them, read them back, etc.

- Add and remove some multicast addresses.

- Send a loopback multicast address and make sure it arrives intact.

There's more that could be done here, but it's a start.

MFC after: 3 days


148117 18-Jul-2005 imura

Add another regression tests for msdosfs which covers msdosfs_conv.c rev 1.45.

Requested by: silby


148024 15-Jul-2005 gad

Correct one regression test (which was expected an incorrect answer), and
add a few more tests. This matches bug fixes recently committed to 'env'.


147522 21-Jun-2005 gad

Upgrade these regression tests to track recent changes to `env'.

Approved by: re (blanket `env')


147495 20-Jun-2005 gad

Add a suite of regression tests for all the recent changes to `env',
using my own script to handle it. I wrote my own partially because
of all the quoting-issues involved with testing what I wanted to test,
and partially because this lets me commit one script and one data file,
instead of one-file-per-regression-test.

This suite was good enough for my initial testing (and it did help me
find a few bugs that would have otherwise been missed). I'm not sure
how well it will work in general use, but I figured I might as well
commit it. It won't *hurt* to have it available. At the worst, people
can just ignore it.

Approved by: re (blanket `env')


147300 11-Jun-2005 maxim

o setsockopt(2) cannot remove accept filter. [1]
o getsockopt(SO_ACCEPTFILTER) always returns success on listen socket
even we didn't install accept filter on the socket.
o Fix these bugs and add regression tests for them.

Submitted by: Igor Sysoev [1]
Reviewed by: alfred
MFC after: 2 weeks


146856 01-Jun-2005 harti

Add a test for escaped newline handling.


146855 01-Jun-2005 harti

Add support for TODO tests. These are tests that are supposed to fail,
because of a make bug that should be fixed.


146822 31-May-2005 harti

Change the test infrastructure so that tests are easier to maintain and
so that make(1) will run in an almost clean environment and enhance the
description of the test infrastructure.

Add the ability to have multiple tests carried out per test script.

Give some tests more meaningful names.

Fix the usage message from the test scripts.

Make it possible to pass several commands to the test scripts like:
'sh test.t setup run compare clean'.


146454 20-May-2005 harti

Add a test to check whether in compat mode make detectes builtins
on the command line and really executes the shell instead of directly
executing the command.


146452 20-May-2005 harti

Add a test to ensure that in compat mode when a line contains no
shell meta characters it is not passed to the shell, but the command
is executed directly (given that the line is not a shell builtin) and
that the line with a meta character is passed to the shell.


146449 20-May-2005 harti

Add a test that test whether we can replace the shell to use by
make with another shell and set all its parameters (meta and builtins
not tested here).


146381 19-May-2005 harti

Some test cases for .SHELL target: builtin shell selection and
changing the path of a builtin shell.


146251 16-May-2005 rwatson

Add an #ifdef'd non-blocking version of the test.

Update copyright.


146250 16-May-2005 rwatson

Close the connect socket as well as the listen socket on completion.

Update copyright.


146234 15-May-2005 marcel

o -n option added.
o -x option added.


145904 05-May-2005 avatar

Catching up with the latest crypto API changes in net80211.

Reviewed by: sam


145901 05-May-2005 ume

add simple test script.


145885 04-May-2005 ume

- add $FreeBSD$.
- enable -r option for regress target.


145860 04-May-2005 ume

- add $FreeBSD$.
- do service lookup.
- add options to use gethostbyname(3) or getipnodebyname(3) instead
of getaddrinfo(3).
- add option to do reverse lookup.


145858 04-May-2005 ume

This commit was generated by cvs2svn to compensate for changes in r145857,
which included commits to RCS files with non-trunk default branches.


145620 28-Apr-2005 harti

Add an initial regression test suite for make(1).

Submitted by: Max Okumoto <okumotu@ucsd.edu> (partly, initial version)


145468 24-Apr-2005 davidxu

Adjust code to be more reliable.


145467 23-Apr-2005 davidxu

Add a program to test if tls data is clean.


145233 18-Apr-2005 avatar

Adding another multi-byte characters related regression test for msdosfs.

Tested by: njl
Reviewed by: silby, bde, sam (mentor)


145176 17-Apr-2005 silby

Add another regression test - one we don't pass right now.


145175 17-Apr-2005 silby

Have the regression test use a path in /tmp for a mount point
instead of a directory that only exists on my machine.


145165 16-Apr-2005 trhodes

Those who are ungodlike should be returned an error.


145141 16-Apr-2005 rwatson

Starting point for a regression test for mac_bsdextended(4)/libugidfw(3).
Currently only performs basic tests against the library string routines,
and queries less important kernel state.

Obtained from: TrustedBSD Project
Sponsored by: SPAWAR, SPARTA
MFC after: 3 days


145086 14-Apr-2005 stefanf

Also test \0 in the format string.


145028 13-Apr-2005 stefanf

Add a few regression tests for printf(1).


144784 08-Apr-2005 silby

A simple regression test for msdosfs. Not the best, but it would have caught
the recent trouble msdosfs had.


144533 02-Apr-2005 das

Add missing test-rem.t.


144094 25-Mar-2005 das

A few simple regression tests for remainder(), remainderf(),
remquo(), and remquof().


143880 20-Mar-2005 pjd

Add regression tests for pkill/pgrep.

MFC after: 3 days


143710 16-Mar-2005 das

- Replace fe[gs]etmask() with feenableexcept(), fedisableexcept(), and
fegetexcept().
- Add additional tests for the above.
- Output a separate success message for each of the 8 components of
this set of tests.


143413 11-Mar-2005 rwatson

Check the return value of shutdown().


143409 11-Mar-2005 rwatson

Add sigpipe, a simple UNIX domain socket and TCP regression test that is
intended to verify that SIGPIPE is delivered to a process writing or
sending on a socket that has been shut down for write. If available,
SO_NOSIGPIPE is also tested.

This regression test is currently passed by RELENG_4, but not by HEAD or
RELENG_5, due to a bug in the write() code for sockets. SO_NOSIGPIPE is not
present in RELENG_4, however, so is not tested there.

Reported by: Mikko Tyolajarvi <mbsd at pacbell dot net>
PR: 78478


143231 07-Mar-2005 das

Test cases for nextafter{,f,l} and nexttoward{,f,l}.


143032 02-Mar-2005 harti

Repo-copy tools/regression/usr.bin/make to tools/build/make_check
and adjust the path in the Makefile for the upgrade_checks target.
These checks are really feature upgrade checks that should be fast
and just find out whether we need to build a new make before
proceeding with other targets like buildworld. This makes the
place free for a real regression test suite in the old place.


142976 02-Mar-2005 ambrisko

This will not compile without:
http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch

Note: it is a good idea to run this against a physical drive to
exercise the physio fast path (ie. lio_kqueue /dev/<something safe>)
This will ensure op's counting per LIO request is correct. It is
currently broken the above patch fixes it.

Sponsored by: IronPort


142971 02-Mar-2005 ambrisko

Add an AIO & kqueue regression test. It is a good idea to run this
against a disk as the argument. If you don't it will use a temp file.
The raw disk will use the kernel physio fast path method until the
max number of pending op's is reached then it will queue them. File
system op's are always queued. This is more important with LIO since
operation can get split across and accounting of op's is broken with LIO.

Note that this was broken when locking was added to kqueue (ie. 5.3)
My fix needs to be better integrated with FreeBSD.

Next is an LIO test and implementation.

Sponsored by: IronPort


142843 01-Mar-2005 das

- Split tests into three rough categories.
- Use fesetround() instead of fpsetround(), and add tests for
various rounding modes.
- Test that all NaNs generated are quiet.

Some of these tests won't pass until problems in vendor sources
(gdtoa and gcc) are fixed and new versions imported, but I
want to get these changes into the tree before I accidentally
blow them away again. :-(


142842 01-Mar-2005 das

- Split the printfloat test into 11 individually wrapped and packaged
tests. (Buy 10, get one free!) The separate categories were
already there; they just weren't labeled.
- Use fesetround() instead of fpsetround(), since the former is
standard and implemented on all supported architectures. Add
tests for each rounding mode.
- Add additional tests for subnormals.

Some of these tests won't pass until problems in vendor sources
(gdtoa and gcc) are fixed and new versions imported, but I
want to get these changes into the tree before I accidentally
blow them away.


142146 20-Feb-2005 rwatson

Add a simple regression test for stream UNIX domain sockets and the
bind()/connect() system calls, which is intended to confirm that the
right successes and errors occur when rendezvousing via the file system
name space.


141750 12-Feb-2005 ru

Add to CFLAGS.


141097 01-Feb-2005 nik

Add to CFLAGS, rather than overriding it. Use LDFLAGS for the -L option,
and LDLIBS to specify -ltap.

Submitted by: ru


141092 01-Feb-2005 nik

Link against libtap (ports/devel/libtap). Replace the calls to assert()
with calls to libtap::ok1(), and make sure the correct number of tests is
planned for, and that the exit code is correct.


140922 28-Jan-2005 marcel

Wrap calls to memcpy(3) in a function called block_copy(). This way,
and as long as we're not compiling with IPA, gcc(1) won't optimize
the call away. The whole purpose of using memcpy(3) is to avoid
misaligned loads and stores when we need to read or write the value
in the unaligned memory location. But if gcc(1) optimizes the call
to memcpy(3) away, it will typically introduce misaligned loads and
stores. In this context that's not a good idea.


140920 27-Jan-2005 marcel

Skip the register based postinc stores here and don't count them
in the number of tests. This way we avoid skipped tests for non-
existent memory access combinations. The number of tests dropped
from 60 to 48.


140919 27-Jan-2005 marcel

Make the local variables global so that the compiler cannot assume
too much about them. This prevents certain peephole optimizations
at -O that invalidate the tests.


140918 27-Jan-2005 marcel

Fix the unaligned store with post increment test: The misaligned pointer
stopped pointing to the value the moment we wrote it due to the post
increment. So, grab the value for comparison out of the data structure
directly.


140893 27-Jan-2005 marcel

The unit test for unaligned loads/stores can be found under ../ia64.


140892 27-Jan-2005 marcel

Add tests for post increment. This bumps the number of tests up to
60. The postinc store tests currently fail (value mismatch). Hence
the score as of this commit is 48 out of 60. Either the kernel or
the tests need to be fixed.


140643 22-Jan-2005 rwatson

Use WARNS?= instead of WARNS= in Makefiles so that global warning
settings can override local ones.

Pointed out by: ru


140558 21-Jan-2005 silby

Add two more pipe regression tests. Not yet hooked into the test framework.


140352 16-Jan-2005 rwatson

In refactoring the test before committing, a pointer was passed instead
of a structure for the sockaddr_in. Pass the pointer to connect()
instead of the pointer to the pointer.

Specify a port number to connect to.


140348 16-Jan-2005 rwatson

Add udpconnectjail, a simple regression test to exercise an (as yet)
unfixed bug in the jail() implementation relating to using the connect()
system call on UDP sockets.

PR: 26506


140109 12-Jan-2005 sobomax

Add test which excersises problem with unability to change association of
already associated datagram unix domain socket by issuing connect() system
call.


140089 11-Jan-2005 das

Regression tests for [l]lrint[f]() and [l]lround[f]().


140074 11-Jan-2005 pjd

Introduce a new GEOM class - SHSEC. It provides sharing secret between
the given providers. Without even one of the configured components there
should be no way to get the secret.

Supported by: WHEEL Sp. z o.o.
http://www.wheel.pl


140069 11-Jan-2005 pjd

Fix incorrect comment.

MFC after: 3 days


139651 03-Jan-2005 rwatson

Add a simple regression test for mlock()/munlock() to make sure they
work on a single page as root, and fails on a single page as nobody.
Intended to help diagnose reports regarding insecure memory use with
gnupg.


139596 02-Jan-2005 marcel

Replace a mention of the ia64_unaligned directory with one of the
ia64 subdirectory. All ia64 specific regression tests live under
the ia64 directory.


139595 02-Jan-2005 marcel

Regression test for unaligned loads and stores for short, int, long,
float, double and long double types. No post-increment tests yet.
All tests are skipped if the debug.unaligned_test sysctl variable
cannot be set to 1.


139142 21-Dec-2004 pjd

Wait a bit after creating device.


139141 21-Dec-2004 pjd

When RAID3 device is configured in "verify" mode, synchronization of the
parity component is now force on creation.
Change regression test which check "verify" mode to work properly after
this change.


139103 21-Dec-2004 ru

Start the dreaded NOFOO -> NO_FOO conversion.

OK'ed by: core


138578 08-Dec-2004 sam

Loadable modules that run test vectors for net80211 crypto plugins.


138515 07-Dec-2004 harti

Fix builds with a read-only directory and a make upgrade. This is done
by forcing the creation of an object directory for the make regression
tests. Let make handle the tracking of the dependency and installation
of test_shell script.

Submitted by: ru


138449 06-Dec-2004 rwatson

Print a warning if running as !root for aio_md_test rather than failing
the test. Privilege is required in order to allocate an md device.


138447 06-Dec-2004 rwatson

Add a basic aio functionality regression test, which simply writes and
then reads from a fairly broad range of object types: regular file,
fifo, UNIX socketpair, pty, UNIX pipe, and an md device. Not a deep
test of functionality, just a basic test that aio_write followed by
aio_read returns the correct data in a relatively timely manner.

Requested by: phk


138432 06-Dec-2004 ru

Make this work under debugging, e.g., "make -dl".


138317 02-Dec-2004 harti

Make the tests runnable on a read-only src. To do this you must make sure
that you create one of the object directories make knows (see make(1)).
This uses the -C flag, so add a test that checks that make actually accepts
-C. Also fix the test that selects csh via the .SHELL target to work for
tcsh users too.

This commit renames shell_test to shell_test.sh. There is no history
to preserve so go without a repo-copy.

Reviewed by: ru


138269 01-Dec-2004 nik

The following code sets up two connected TCP sockets that send data to each
other until the window is closed. Then one of the sockets is closed, which
will generate a RST once the TCP at the other socket does a window probe.

All versions of FreeBSD prior to 11/26/2004 will ignore this RST into a 0
window, causing the connection (and application) to hang indefinitely.
On patched versions of FreeBSD (and other operating systems), the RST
will be accepted and the program will exit in a few seconds.

Submitted by: Michiel Boland
Reviewed by: silby


138227 30-Nov-2004 harti

Chmod the shell testscript to be executable if it isn't already. According
to the CVS-Meisters x-mode just happens to work, but is not guaranteed to
do so. Try to be on the safe side.


138080 25-Nov-2004 harti

Add some regression tests for the .SHELL target. I'm not sure that the
output of shell_2j is actually correct - it just tests what make currently
does. Make should switch on echoing for the second line, shouldn't it?


137960 21-Nov-2004 tjr

Remove regression tests for the obsolete rune interface.


137587 11-Nov-2004 nik

Switch over to a different, more flexible test output protocol that's
understood by Perl's Test::Harness module and prove(1) commands.

Update README to describe the new protocol. The work's broken down into
two main sets of changes.

First, update the existing test programs (shell scripts and C programs)
to produce output in the ok/not ok format, and to, where possible, also
produce a header describing the number of tests that are expected to be
run.

Second, provide the .t files that actually run the tests. In some cases
these are copies of, or very similar too, scripts that already existed.
I've kept the old scripts around so that it's possible to verify that
behaviour under this new system (in terms of whether or not a test fails)
is identical to the behaviour under the old system.

Add a TODO file.


137130 02-Nov-2004 rwatson

Add a small regression test that opens a TCP socket, listens on it,
performs a non-blocking connect from another socket, and then closes
the listen socket rather than accepting. This is intended to
exercise the close path in which connections are aborted due to a
close on the listen socket while the connection is in the listen
queue.


136910 24-Oct-2004 ru

For variables that are only checked with defined(), don't provide
any fake value.


136844 23-Oct-2004 rwatson

Use errx() instead of fprintf()/exit() for conciseness.

Suggested by: ru (some time ago)


136843 23-Oct-2004 rwatson

Use errx() instead of perror()/exit() for conciseness.

Suggested by: ru (some time ago)


136842 23-Oct-2004 ru

Add a regression test for the alternate shell specification.


136613 17-Oct-2004 ru

Fixed a typo.

Submitted by: Pawel Worach


136497 13-Oct-2004 keramida

Add a regression test for floating-point output in the Greek locale.
See revision 1.3 of src/share/numericdef/el_GR.ISO8859-7.src

Reviewed by: das (a while ago)


136391 11-Oct-2004 rwatson

Resort unprivileged uid with privileged socket after unprivileged uid
with privileged socket in test runs.

If running unprivileged and instructed to use unprivileged sockets,
don't try and use raw sockets.


136390 11-Oct-2004 rwatson

A number of improvements to the IP socket option API regression test:

- Consistently use err/errx/warnx throughout, rather than using perror()
and exit().

- Teach the tests how to better manage (and therefore test) privilege:
in particular, how to create sockes with root credentials but exercise
the privileges with non-root credentials, etc.

- Teach the test suite to apply each of the non-IP_HDRINCL options across
each of SOCK_DGRAM, SOCK_STREAM, and SOCK_RAW.


136387 11-Oct-2004 stefanf

Add regression tests for ilogb{,f,l}().


136384 11-Oct-2004 rwatson

Add a simple exercise suite for IP-level socket options. The suite
atempts to read and write various IP-level socket options as root and
nobody, making sure the initial values are as expected, that they can
be changed to valid values and take effect, etc. No attempt is made
to check for the correct implementation of side effects (such as
changes in packet headers) as yet.

The IP options section is currently broken but will be fixed shortly.

Not all multicast options are currently tested.


136337 09-Oct-2004 rwatson

Add a simple C-based TCP connection generator, which generates and
closes the specified number of TCP connections sequentially and
synchronously. Useful for trying to trigger races in the accept
code.


135425 18-Sep-2004 rwatson

Modify accept_fd_leak regression test to generate "PASS" output, not
just "FAIL" output, in order to make it consistent with other tests in
the regression test tree.


135157 13-Sep-2004 rwatson

Add a very basic README for tcpstream.


135132 13-Sep-2004 rwatson

Add tcpstream, a simple TCP stream generator that uses a pseudo-random
sequence to detect data corruption visible to an application.


134758 04-Sep-2004 stefanf

Add a regression test for <tgmath.h>.


134681 03-Sep-2004 ru

Join the effort in simplifying this makefile. ;)


134662 02-Sep-2004 rwatson

Pass O_NONBLOCK directly to fcntl() rather than the pointer to an int
holding the value O_NONBLOCK. This worked previously because I was
lucky.


134661 02-Sep-2004 rwatson

Don't override the rule used to build a binary by providing our own
compiler line.


134238 24-Aug-2004 rwatson

Make sure to properly initialize 'size' to sizeof(sin) before passing
it into accept(). Depending on the initial value in memory, it is
otherwise possible to get EINVAL.


134236 24-Aug-2004 rwatson

Add a basic kqueue + UNIX domain socket pair regression test to do some
elementary exercising of kqueues on datagram and stream sockets. Note
that the datagram write kqueue case is left untested due to potentially
confusing behavior for the developer (me) that might require attention.


134170 22-Aug-2004 pjd

Regression tests for 'verify reading' algorithm.


134125 21-Aug-2004 pjd

Add regression test for the new "round-robin reading" feature.


133835 16-Aug-2004 dfr

Remove some debug cruft from the Makefiles and make them ${.OBJDIR}
friendly.


133831 16-Aug-2004 pjd

Add regression tests for GEOM_RAID3.


133652 13-Aug-2004 ru

Replaced COPTS by equivalent CFLAGS.


133643 13-Aug-2004 fjoe

Regen.


133641 13-Aug-2004 fjoe

Regression test for geom_uzip.


133639 13-Aug-2004 harti

Add a regression test for the ATM call control stuff.


133593 12-Aug-2004 harti

Now that make more correctly handles variable assignments
in .MAKEFLAGS targets enable the regression test for this.


133385 09-Aug-2004 dds

Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived
software (original contributor).

Reviewed by: imp


133165 05-Aug-2004 harti

Back out something I'm working on that crept in with the last commit.

Spotted by: ru


133164 05-Aug-2004 harti

Remove extra spaces. Remove double quotes around error messages -
they are not needed and will actually be printed.

Submitted by: ru


133162 05-Aug-2004 dfr

This file is not suppose be be all one big comment :-(

Pointed out by: ssouhlal


133161 05-Aug-2004 harti

Add another test that checks for a working '+' command flag.


133117 04-Aug-2004 pjd

Add regression test for "prefer" balance algorithm in MIRROR class.


133109 04-Aug-2004 harti

Add a regression test for the passing of command line
variable assignments via the MAKEFLAGS environment variable.


133105 04-Aug-2004 rwatson

Add minimal socketpair() regression test to confirm that we can create
(and close) PF_UNIX socket pairs, and that we can't create PF_INET
socket pairs. More tests to follow.


133066 03-Aug-2004 dfr

Add regression tests for TLS.


132904 30-Jul-2004 pjd

Add GEOM_MIRROR class which provide RAID1 functionality and has many useful
features. The gmirror(8) utility should be used for control of this class.
There is no manual page yet, but I'm working on it with keramida@.

Many useful tests provided by: simon (thank you!)
Some ideas from: scottl, simon, phk


132704 27-Jul-2004 jkh

After conferring with Apple legal, update the license of this to APSL 2.0
and change the URL link to point to the appropriate license text.


132664 26-Jul-2004 pjd

Change naming scheme from /dev/<name>.stripe to /dev/stripe/<name>.


132663 26-Jul-2004 pjd

Change naming scheme from /dev/<name>.concat to /dev/concat/<name>.


132649 26-Jul-2004 rwatson

Simple attachment regression test to attach the "accf_data" accept
filter to an inet socket and check at various points during the socket
life cycle that the filter can or cannot be attached, and that once
attached that the right one is attached and that it can be queried.


132524 22-Jul-2004 silby

Add two more programs useful for testing the correctness of pipes.


132499 21-Jul-2004 tjr

Add test programs for mbsnrtowcs() and wcsnrtombs().


132479 21-Jul-2004 silby

Make this test compile again and remove its dependency on sys/pipe.h.


132438 20-Jul-2004 silby

Add a simple regression test for the stat st_size bug just fixed in
sys_pipe.c


132392 19-Jul-2004 tjr

Add a skeleton makefile that runs the tests out of libc/regex/grot.


132391 19-Jul-2004 tjr

Oops, test error behaviour of wctrans(), not wctype().


132384 19-Jul-2004 das

While testing fe[gs]etround(), make sure FLT_ROUNDS reflects the
proper rounding mode as well.


132304 17-Jul-2004 rwatson

Explicitly specify ATPROTO_DDP constant rather than '0' when binding
a netatalk socket. No functional change.


132302 17-Jul-2004 rwatson

Add a simple tool to bind netatalk sockets and perform send operations.
This isn't a classic regression test in that it doesn't have a notion of
pass fail, it's more of an exercise tool. It attempts to exercise
unbound, bound, unconnected, and connected variations on SOCK_DGRAM
sockets.


132296 17-Jul-2004 rwatson

gcc now objects to a default label without any contents. Because I want
to have a comment present in the default case, add a 'break' to each
default case that previously had no actual statements.


132295 17-Jul-2004 rwatson

Add simple regression test to detect leakage of file descriptors when
accept() returns EAGAIN on a non-blocking listen socket. This is the
tool I used to check that such a bug was resolved when merging accept()
locking.


131863 09-Jul-2004 harti

Use and explicite 'sh' to run the scripts, because they may be checked
out non-executable.


131099 25-Jun-2004 sobomax

Add qsort, mergesort and heapsort regression tests.


130330 11-Jun-2004 das

Add some fenv.h regression tests.


129782 27-May-2004 brooks

Fix stupid patch(1) tricks. Apparently patch thinks all files match the
empty file so if you accidently apply a patch created with diff -N
twice, you get files with duplicate contents.

Reported by: Antoine Brodin <antoine.brodin at laposte.net>


129759 26-May-2004 brooks

Add support for an /etc/eui64 file modeled on /etc/ethers. The API is
modeled on ethers(3) except that all functions are thread-safe.

Reviewed by: simokawa


129578 22-May-2004 pjd

Add regression tests for geom_stripe and geom_nop.

Supported by: Wheel - Open Technologies - http://www.wheel.pl


129115 11-May-2004 tjr

Test accumulation of partial multibyte characters in conversion
state objects.


128883 03-May-2004 pjd

Add regression tests for GEOM Gate:
- test-1.sh - Tests ggatec(8) and ggated(8) on lo0.
- test-2.sh - Tests ggatel(8) on a regular file.
- test-3.sh - Tests ggatel(8) on a md(4) device.


128785 01-May-2004 smkelly

A new version that does exponents and lots of other neat things. Update
from the original author of math.sed.

Submitted by: K S Braunsdorf <sed@ksb.npcguild.org>


128005 07-Apr-2004 tjr

Reset internal conversion state after triggering conversion errors;
the state is undefined according to the standards, and our undefined
behaviour has changed.


126564 03-Mar-2004 pjd

Add regression tests for geom_concat class.


126200 24-Feb-2004 johan

style.Makefile(5):
Use WARNS?= instead of WARNS=.


126085 21-Feb-2004 green

Add some more comments and a -4 argument to restrict searches to only
A (not default A and AAAA) records. Now the longest time that a -4
thread might hang trying to resolve is only 2:30 instead of 5:00 ;)


126058 21-Feb-2004 green

Print the maximum resolution time encountered by each thread. Did you
know that the resolver might keep trying on a getaddrinfo() for up to
FIVE MINUTES?


126049 20-Feb-2004 green

Add my getaddrinfo(3) stress-tester as gaithrstress. The most obvious
regressions would be to see the program or your kernel crashing.

If you want to give it something to really test out, try a much more
reentrant version of the resolver.
<URL:http://green.homeunix.org/~green/reentrant_resolver.patch>
Any Mozilla-based browser would show you a clear difference.


125500 05-Feb-2004 ru

Added missing DPADD.


125227 30-Jan-2004 ru

Add a test for what was broken in rev. 1.28 and fixed in rev. 1.29
of make/str.c.


125219 29-Jan-2004 ru

Add a test for what was fixed in revs. 1.28 and 1.29 of make/str.c.


125204 29-Jan-2004 harti

These scripts run the protocol test suites for the SSCOP, SSCF-UNI and
UNI protocols. The actual test suites are not in these directories because
of their size. One needs to install the atmsupport port (the script
will remind you, if it cannot find the port).

The SSCOP test suite includes booth the ETSI and the ITU-T test suite,
the SSCF-UNI test suite is home grown and the UNI test suite is the
P2MP ETSI test suite. Others may follow.


125203 29-Jan-2004 harti

Add a simple test script for the ng_atmpif node.

Submitted by: Vincent Jardin <vjardin@free.fr>


124708 19-Jan-2004 das

Add regression tests for printf's %a/%A formats.

While here, disable some of the long double tests on i386, since
FreeBSD/i386 is the only port that doesn't evaluate long doubles in
their full precision (due to constant folding bugs in gcc).


124707 19-Jan-2004 das

Add regression tests for some of the bugs recently discovered in the
vendor's strtod() implementation.

While here, disable some of the long double tests on i386, since
FreeBSD/i386 is the only port that doesn't evaluate long doubles in
their full precision (due to constant folding bugs in gcc).


124650 18-Jan-2004 das

Work around a recently-introduced gcc bug. The compiler no longer
accepts certain floating point constant representations that are
legal in C99.


121732 30-Oct-2003 tjr

Add regression tests for sgetrune() and sputrune().


120676 02-Oct-2003 ru

Fix a bug that prevented exists() from finding "foo/", "foo/."
and "foo/.." when ".PATH: foo" was also given.

PR: bin/34062


118262 31-Jul-2003 pb

Add a regression test for the big pipe bug.

Suggested by: silby


117900 22-Jul-2003 dds

Test 8.16 in sed.test tests the ability of a sed to handle an empty
regular expression as the first argument to a substitute command. If
used to test a sed which (erroneously) evaluates this at translation
time rather than at execution time, the bugged sed is put into an
infinite loop. This mode of failure seems excessive. Such a failing
sed is the Free Software Foundation's sed 3.02.

The specific test was also not being executed for the BSD sed.

Both problems are now fixed.

PR: misc/25585
Submitted by: Walter Briscoe <w.briscoe@ponl.com>
Approved by: schweikh (mentor)
MFC after: 2 weeks


117226 04-Jul-2003 ru

Fixed broken arithmetic expression parser.

Reminded by: bde
In memory of: alane


116969 28-Jun-2003 das

Add regression tests for floating point parsing in scanf(3).


115894 06-Jun-2003 tjr

Regression tests for wctype(), iswctype(), wctrans(), towctrans().


115829 04-Jun-2003 fanf

Add tests for the behaviour of substitution when the regex can match
a zero-length string. This shows bugs in the s///g and s///2+ cases.


115721 02-Jun-2003 phk

write pattern to /dev/ccd3 not /dev/ccd3c


113949 23-Apr-2003 jkh

Sync with latest and greatest Apple sources (which, among other things, fix
the style flag).

Submitted by: Conrad Minshall <conrad@apple.com>
Reviewed by: jkh
Obtained from: Apple Computer, Inc.


113724 19-Apr-2003 das

Add a dozen new tests with the general theme of getting trailing
zeroes right.


113469 14-Apr-2003 das

Add a test case for printf("%5.0f", 0.001).


113434 13-Apr-2003 phk

Remove the "run GEOM in userland harness" test stuff, it's been OBE.


113433 13-Apr-2003 phk

Give mdconfig a couple of seconds to deconfigure in case debugging is being
printed to a serial console.

Reverse the order of args to diff to make it more logical.


113293 09-Apr-2003 phk

Update these two reference vectors.


113291 09-Apr-2003 phk

Add script to run kernel based regression test and the reference vectors
for the current XML images.


113290 09-Apr-2003 phk

Utility to load one of our XML images into a MD(4) device.


113192 07-Apr-2003 das

Additional regression tests for grouping, parsing of '.*', and printing
of %f formats where the number of significant digits is < expt.


113162 06-Apr-2003 tjr

Test for bug in revision 1.54 of vfprintf.c.


113147 05-Apr-2003 das

Regression tests for printf()'s floating point formats.
Tests for correct printing of subnormals are lacking.


112698 27-Mar-2003 das

Write negative zero as '-0.0'. Otherwise, it is parsed as an integer
before being cast to a floating point type, and the sign is lost.


111876 04-Mar-2003 phk

Fix a bug in the white-space remover.


110654 10-Feb-2003 gad

The regression-tests for 'make' *expect* to trigger make's warning:
warning: duplicate script for target "double" ignored
The regression-tests do try to hide that message, but the message does
still appear when using -j (eg: 'make -j5 buildworld'). This changes the
regression-test so the expected warning message will not be seen even
when -j is specified.

Reviewed by: jmallett ru


110569 08-Feb-2003 mike

Add more tests. Specifically, infinity cast from other types should
always be classified as infinity.


110405 05-Feb-2003 mike

Add regression test for soon-to-be-committed fpclassify().


110153 31-Jan-2003 phk

Update reference vectors to include BSD's <type> output.


110151 31-Jan-2003 phk

Add Apple partitioning test case.

Use correct name for image data file


109974 28-Jan-2003 phk

Add more scaffolding to make this compile kernel code.


109416 17-Jan-2003 phk

Add a regression test for ccds layout policy.


108820 06-Jan-2003 phk

geom_bsd need -lmd to link now.


108639 04-Jan-2003 tjr

Add a regression test for wordexp() and wordfree().


108088 19-Dec-2002 tjr

Add a test program for perror() that demonstrates two bugs in the
current implementation.


108069 19-Dec-2002 tjr

Test that if the buffer argument (`s') to wcrtomb() is NULL then
the value of the supplied wide character is ignored and L'\0' is used
instead. Remove incorrect comments about "internal buffer" since wcrtomb()
does not have one (wctomb() does).


108045 18-Dec-2002 mike

Add regression test for strerror()/strerror_r().

Based on: src/lib/libc/string/strerror.c (rev 1.8)


107954 16-Dec-2002 phk

Goto WARNS 5 with assorted changes.


107951 16-Dec-2002 phk

Update this one too.


107950 16-Dec-2002 phk

Get the test-suite into sync with the kernel again.


107375 28-Nov-2002 ru

Add a test for what was fixed in revisions 1.39 and 1.50 of
make/parse.c (allow embedded `:' and `!' in target names).

Approved by: re


107374 28-Nov-2002 ru

Moved make(1) regression tests from src/Makefile to where they
belong (src/tools/regression/usr.bin/make), and use the latter
to test if make(1) is adequate for building the world.

Approved by: re


106727 10-Nov-2002 tjr

Add test cases for btowc() and wctob() in multibyte locales.


106726 10-Nov-2002 tjr

Test for the zero-length buffer bug corrected in mbrtowc.c revision 1.3.


106686 09-Nov-2002 tjr

Add regression tests for mblen(), mbtowc(), wctomb(), mbstowcs() and
wcstombs(). These tests have already found two libc bugs.


106495 06-Nov-2002 tjr

Add missing #includes of <stdio.h>. Correct a few typos in comments.


106080 28-Oct-2002 tjr

Simplify by using inference rules properly.


105980 26-Oct-2002 tjr

Add tests for btowc(), mbrlen(), mbsrtowcs() and wcsrtombs().


105973 26-Oct-2002 tjr

Add regression tests for mbrtowc(3) and wcrtomb(3).


105907 25-Oct-2002 jmallett

Hide the test in <target> under '.if make(<target>)' so as to not get any
errors/warnings related to crud in said test block.


105898 24-Oct-2002 phk

Redo reference vectors to include the mediasize and sectorsize.


105896 24-Oct-2002 phk

Resync with kernel.


104512 05-Oct-2002 phk

Use in-tree libbsdxml instead of ports based libexpat.

Sponsored by: DARPA & NAI Labs.


104511 05-Oct-2002 phk

Match the new g_io_deliver() API in the kernel.

Sponsored by: DARPA & NAI Labs.


104510 05-Oct-2002 phk

Pass sbuf to the kernel routines to match new kernel code.

Sponsored by: DARPA & NAI Labs


104070 27-Sep-2002 phk

Update to match current kernel code.

Fix a couple of reference data which were found to be in error.

Sponsored by: DARPA & NAI Labs.


103343 15-Sep-2002 phk

Some change in src/share/mk seems to have made it possible to remove
50% of the active ingredients in these Makefiles.


103288 13-Sep-2002 phk

Overhaul the kernel-simulation bits here to use pthreads instead.

If somebody wanted to, this could for the beginning of a "libkernel"
which could be used to run kernel code in userland.

Sponsored by: DARPA & NAI Labs.


103010 06-Sep-2002 phk

Remove magicspace from reference data.

Sponsored by: DARPA & NAI Labs.


103008 06-Sep-2002 phk

expat2 changed the name of their include file to expat.h

Sponsored by: DARPA & NAI Labs.


103007 06-Sep-2002 phk

Fix an indentation typo.

Sponsored by: DARPA & NAI Labs.


103006 06-Sep-2002 phk

Add a zeroed out sector one for the GPT hack and test T003.

Sponsored by: DARPA & NAI Labs.


101902 15-Aug-2002 alfred

Add regression tests for sysvipc.

Submitted by: Hiten Pandya <hiten@uk.FreeBSD.org>
Obtained from: NetBSD


100794 28-Jul-2002 jmallett

As of revision 1.38 of make/parse.c, our make(1) will warn too. Note that
this isn't just for the sake of testing behaviour, and that things really
do break if this regression occurs.


99400 04-Jul-2002 tjr

Update another mention of <CR><CR> I missed the first time around (rev 1.2)


99355 03-Jul-2002 tjr

Note that two carriage returns aren't required after entering the
initial setup anymore (since process.c rev. 1.25). Add $FreeBSD$.

MFC after: 2 weeks


98913 27-Jun-2002 jmallett

The wrong y/// output got spammed into this file; from green@ indirectly.


98912 27-Jun-2002 green

Correct the psl regression test for sed(1)'s now-fixed newline
behavior. Add the bcb regression test which checks for failures due
to a backslash ('\') coinciding with the very last character of the
command buffer. The regression test is cf. this PR (which I did not
know about) and has a different fix for the bug.

PR: bin/22351
Submitted by: Stefan Duerholt <stefan.duerholt@t-online.de>


98881 26-Jun-2002 jmallett

Erk, I forgot that regress.in has an ending newline, so change the test for
transliterate to use echo -n to supress newline and a simple string.


98812 25-Jun-2002 jmallett

Reduce internal code duplication, add REGRESSION_PASSFAIL([testname]) to
handle printing of the PASS/FAIL messages. Suffix PASS/FAIL/FATAL with the
string (in $directory) where $directory is ${.CURDIR} from make(1), to
make it easier to use grep(1) and a bit of sed/awk to do statistics of
failure for some utilities over time, etc.


98811 25-Jun-2002 jmallett

Add a regression test for transliterate which happens to match characters
at an EOL/EOF, and therefore should catch the broken behaviour fixed by
Tim J. Robbins in sed(1) recently.

Suggested by: obrien


98760 24-Jun-2002 jmallett

I explicitly meant to not move any of this over to the new m4(1) framework,
even slightly. Grrr CVS.


98759 24-Jun-2002 jmallett

Move all remaining tests except for:
make(1): Does not work like the other tests. Its Makefile is
self-testing.
m4(1): It uses complex voodo to test GNU m4(1) features.

To the new framework. I had worried about passing the binary data that
uudecode(1)'s test passes to diff(1) might give a user something nasty,
but this is unlikely to happen as even with an unmodified old nasty
diff(1) which doesn't recognise many binary files, these binary files
are recognised. Using $DIFF instead of `diff' in the library and making
it possible to override this with `cmp -s' might be nice some day, but
as of this second, there's no immediate need.


98758 24-Jun-2002 jmallett

Add two new mostly freeform types of regression tests, and a macro for dying
ungracefully.


98755 24-Jun-2002 jmallett

Comments to describe what these macros do, so that someone other than me
might be able to figure out how to write some of these tests (hint hint).


98754 24-Jun-2002 jmallett

Convert straightforward regression tests to use regress.m4.

Goodbye, duplicated code, you will certainly not be missed.


98752 24-Jun-2002 jmallett

Add a simple (to be expanded) library of functions for the regression tests,
to handle the ones which output to stdout and have output in regress.$test.out,
etc. More freeform macros should and will be written, but these are the most
prominent and most straightforward sort of tests we have around, so it makes
sense to try to accomodate them.


98461 20-Jun-2002 jmallett

Grrr, make the test for embedded variables in the left-hand-side actually do
the right thing in every case. Yuck.


98442 19-Jun-2002 jmallett

Add a test for what was fixed in revision 1.27 and 1.28 of make(1)'s var.c,
expansion of embedded variables in the left-hand-side of an assignment
expression, using the simplest case - hiding recursion using nil-expanded
variables.


98067 09-Jun-2002 phk

Catch up with kernel.


97996 07-Jun-2002 jmallett

Describe ia64_unaligned and geom directories. I hope I got these right.


97992 07-Jun-2002 jmallett

Add the m4(1) regression test.


97991 07-Jun-2002 jmallett

Add a regression test for m4(1).

This checks the behaviour of changecom() in both GNU and BSD modes of our m4.


97080 21-May-2002 phk

Update to match kernel side.

Sponsored by: DARPA & NAI Labs.


96951 19-May-2002 phk

Catch up with recent events.

Sponsored by: DARPA & NAI Labs.


96811 17-May-2002 jmallett

Regenerate with new output grouping in uuencode -m.


96709 16-May-2002 trhodes

file system > filesystem


96070 05-May-2002 jmallett

Add a regression test for bin/5297, regarding sysv substitution with a nil
left-hand-side.


95995 03-May-2002 jmallett

Add a test for the -R option.


95981 03-May-2002 jmallett

Regenerate -I output since an argument bogon in the -I code was fixed, among
other things.


95542 27-Apr-2002 jmallett

Redirect stdin from the input file, rather than passing the input file to
uuencode(1), and set a umask, so that the mode in the header is predictable.

If it varies, then the test is right to fail.

Remove the note about this test falsely failing, with that in mind.


95538 27-Apr-2002 jmallett

Prefix tests with PASS and FAIL, to make grepping easier, and note this in
the README.

This affects only the base-system regression tests, of course.


95406 24-Apr-2002 phk

Update the test-case reference vectors to match the new XML format.

Sponsored by: DARPA & NAI Labs.


95404 24-Apr-2002 phk

Add -DKERNELSIM so the test cases compile with the kernel simulation.

Sponsored by: DARPA & NAI Labs.


95403 24-Apr-2002 phk

Improve the output in case of inserts or deleted.

Sponsored by: DARPA & NAI Labs.


95397 24-Apr-2002 phk

Prepare the .conf XML comparator for a more kosher XML format.

Sponsored by: DARPA & NAI Labs.


95258 22-Apr-2002 des

Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.


95169 21-Apr-2002 jmallett

For the P function, the newline must be considered a part of the pattern
space, so when printing it, don't let the pattern space and the output run
into eachother by omitting the \n when printing.


95168 21-Apr-2002 jmallett

Add sed(1) tests for proper behaviour of the G option as fixed in PR 26152,
and for proper behaviour of some sed functions given a nil pattern space,
as fixed in PR 34813.

The test for G was based on the test in the PR. The nil pattern space test
is slightly different as we need to get *some* output, as the core dump will
also produce no output (old behaviour) and turn up falsely that the utility
is working fine.


95167 21-Apr-2002 jmallett

Check to see if make(1)'s handling of doubly-defined targets is busted or
not. A lot relies on this.


95166 21-Apr-2002 jmallett

Only exit at the end of a test, exit with the last value of $? that was not 0.

This way the entire regression test is looked at as a pass/fail, not just one
sub-test.


95158 20-Apr-2002 jmallett

Add a test of variable evaluation and substitution for make(1), as a start
of tests for it.


95150 20-Apr-2002 jmallett

Add a test for jot(1).


95148 20-Apr-2002 jmallett

A simple test for join(1) based on tjr's test case for -o 0.

Partially based on: PR standards/36072


95145 20-Apr-2002 jmallett

Add an exceedingly simple regression test for the file2c program. One would
hope that it would never regress, but this is a straightforward test, so add
it.


95142 20-Apr-2002 jmallett

Add regression tests for parts of xargs(1).


95141 20-Apr-2002 jmallett

Add a comment regarding the file header, and the mode that the file is created
with.

This should be fixed shortly by adding the (desirable) option to set the file
creation mode on the command line.


95140 20-Apr-2002 jmallett

Add uuencode(1) and uudecode(1) regression test input and output.


95138 20-Apr-2002 jmallett

Start adding framework for userland regression tests, and tests for
uuencode and uudecode.


94856 16-Apr-2002 phk

update the reference vector.


94832 16-Apr-2002 phk

Forgot to commit the updates to the regression test suite.

Sponsored by: DARPA & NAI labs.


93792 04-Apr-2002 phk

Play catch up with the kernel.

Sponsored by: DARPA & NAI Labs


93357 28-Mar-2002 phk

Add testcase #14: PC98 label.


93356 28-Mar-2002 phk

Record the physical geometry in this disk-image, PC98 needs it.


93355 28-Mar-2002 phk

Ignore the <FreeBSD> element in XML files.


93353 28-Mar-2002 phk

Add the relevants sectors from a PC98 disk to our beastiarium.

Submitted by: imp


93294 27-Mar-2002 phk

Add another two alpha disks to this testcase.


93293 27-Mar-2002 phk

Add another couple of alpha disklabels.


93251 26-Mar-2002 phk

Track changes in sys/geom


93249 26-Mar-2002 phk

Another bow for tradition s/method/class/g


93100 24-Mar-2002 phk

Link testcase 13 in.


93098 24-Mar-2002 phk

Add a testcase for the alpha BSD label from beast.


93096 24-Mar-2002 phk

Add a copy of the bsd-label from beast.freebsd.org


93091 24-Mar-2002 phk

Update to reflect new contents of sys/geom


92515 17-Mar-2002 phk

Some necesary fixups to cope with new location and FreeBSD CVS keyword.


92512 17-Mar-2002 phk

Add the GEOM regression test framework.

This is a set of userland shims in which GEOM can be run through simple
tests.

The simulation of kernel synchronization primitives is very primitive
and consequently some times tests will fail because of races.

Data/ contains a number of files in XML format which describe the
key sectors for a number of disk images

This is a very handy tool for people developing GEOM methods. The
"simdisk" method can be told to read from a "real disk" and afterwards
dump the accessed sectors in XML format for further use.

I hope future method writes will see the benefit of this test
collection and add to it when they write methods for GEOM.

You will need ports/textproc/expat for the XML parser.

Sponsored by: DARPA, NAI Labs.


92288 14-Mar-2002 rwatson

NAI DBA update.


88242 20-Dec-2001 jkh

Add Apple's filesystem exercising tool.

Submitted by: Conrad Minshall <conrad@apple.com>
Obtained from: Apple Computer


85197 19-Oct-2001 dfr

Make a start at a regression test for the unaligned trap handler.


83794 21-Sep-2001 rwatson

o Fix two eaccess() checks -- in one case, the wrong test file
was used, resulting in a regression failure, and in the other,
the test on an error return was inverted.

Obtained from: TrustedBSD Project


83736 20-Sep-2001 rwatson

o Regression test to check that appropriate parts of the process
credential are used in the access() and new eaccess() system calls.

Obtained from: TrustedBSD Project


75486 13-Apr-2001 rwatson

o Add a comment identifying the "privileged on privileged" scenario.

Obtained from: TrustedBSD Project


75485 13-Apr-2001 rwatson

o Add inter-process authorization uid regression testing for ktrace().

Obtained from: TrustedBSD Project


75482 13-Apr-2001 rwatson

o s/debug/ptrace/ since shortly there will be tests involving other
forms of debugging.

Obtained from: TrustedBSD Project


75447 12-Apr-2001 rwatson

o Expand inter-process authorization regression test to include
signalling with sigsegv as one of the tests.
o Teach errno_to_string() about ENOTSUPP.

Obtained from: TrustedBSD Project


75429 11-Apr-2001 rwatson

o Enable -DSETSUGID_SUPPORTED in inter-process authorization regression
test by default, as setugid() is now part of the base kernel (assuming
(options REGRESSION) has been enabled for the running kernel).

Obtained from: TrustedBSD Project


75422 11-Apr-2001 rwatson

o First pass at an inter-process authorization regression testing suite.
This test utility attempts to evaluate the current kernel policy
for authorization inter-process activities, currently ptrace(),
kill(, SIGHUP), getpriority(), and setpriority(). The utility creates
pairs of processes, initializes their credential sets to useful
cases, and reports on whether the results are in keeping with hard-coded
safety expectations.

o Currently, this utility relies on the availability of __setugid(),
an uncomitted system call used for managing the P_SUGID bit. Due to
continuing discussion of optional regression testing kernel components
("options REGRESSION") I'll hold off on committing that until the
discussion has reached its natural termination.

o A number of additional testing factors should be taken into account
in the testing, including tests for different classes of signals,
interactions with process session characteristics, I/O signalling,
broadcast activities such as broadcast signalling, mass priority
setting, and to take into group-related aspects of credentials.
Additional operations should also be taken into account, such as ktrace,
debugging attach using procfs, and so on.

o This testing suite is intended to prevent the introduction of bugs
in the upcoming sets of authorization changes associated with the
introduction of process capabilities and mandatory access control.

Obtained from: TrustedBSD Project


57257 16-Feb-2000 dufault

These are regression tests for the P1003.1B scheduler.

Approved by: jkh


25889 18-May-1997 dfr

Add a couple of test cases for mmap over NFS.


23458 07-Mar-1997 mpp

Fix a couple of typos.


17523 11-Aug-1996 ache

Make it at least semi-worked


11494 15-Oct-1995 phk

README reads:
This directory is for regression test programs.

A regression test program is one that will excercise a particular bit of the
system to check that we have not reintroduced an old bug.

Please make a subdir per program, and add a brief description to this file.


1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources