|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0 |
|
| #
3abaec56 |
| 24-Mar-2019 |
Jilles Tjoelker <[email protected]> |
MFC r344502: sh: Add set -o pipefail
The pipefail option allows checking the exit status of all commands in a pipeline more easily, at a limited cost of complexity in sh itself. It works similarly t
MFC r344502: sh: Add set -o pipefail
The pipefail option allows checking the exit status of all commands in a pipeline more easily, at a limited cost of complexity in sh itself. It works similarly to the option in bash, ksh93 and mksh.
Like ksh93 and unlike bash and mksh, the state of the option is saved when a pipeline is started. Therefore, even in the case of commands like A | B & a later change of the option does not affect the exit status, the same way (A | B) & works.
Since SIGPIPE is not handled specially, more work in the script is required for a proper exit status for pipelines containing commands such as head that may terminate successfully without reading all input. This can be something like
( cmd1 r=$? if [ "$r" -gt 128 ] && [ "$(kill -l "$r")" = PIPE ]; then exit 0 else exit "$r" fi ) | head
PR: 244270 Relnotes: yes
show more ...
|
|
Revision tags: release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0 |
|
| #
3c47cee5 |
| 02-Nov-2016 |
Jilles Tjoelker <[email protected]> |
sh: Add simple test for 'set -C' (noclobber).
To ensure fast test runs, race conditions are not tested.
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
430f7286 |
| 04-May-2016 |
Enji Cooper <[email protected]> |
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed after r298107
Summary of changes:
- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that na
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed after r298107
Summary of changes:
- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)
Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info.
MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division
show more ...
|
|
Revision tags: release/10.3.0 |
|
| #
c4429c7e |
| 03-Feb-2016 |
Glen Barber <[email protected]> |
Fix build.
Sponsored by: The FreeBSD Foundation
|
| #
43faedc1 |
| 02-Feb-2016 |
Glen Barber <[email protected]> |
First pass to fix the 'tests' packages.
Sponsored by: The FreeBSD Foundation
|
|
Revision tags: release/10.2.0 |
|
| #
88ef06f3 |
| 14-Dec-2014 |
Jilles Tjoelker <[email protected]> |
sh: Make sure output suitable as shell input is also printable.
Commands like 'export -p', 'set' and 'trap', and tracing enabled via 'set -x' generate output suitable as shell input by adding quotes
sh: Make sure output suitable as shell input is also printable.
Commands like 'export -p', 'set' and 'trap', and tracing enabled via 'set -x' generate output suitable as shell input by adding quotes as necessary.
If there are control characters other than newline or invalid UTF-8 sequences, use $'...' and \OOO to display them safely.
The resulting output is not parsable by a strict POSIX.1-2008 shell but sh from FreeBSD 9.0 and newer and many other shells can parse it.
show more ...
|
|
Revision tags: release/10.1.0 |
|
| #
12e2df3c |
| 13-Aug-2014 |
Enji Cooper <[email protected]> |
Convert bin/sh/tests to ATF
The new code uses a "test discovery mechanism" to determine what tests are available for execution
The test shell can be specified via:
kyua test -v test_suites.FreeB
Convert bin/sh/tests to ATF
The new code uses a "test discovery mechanism" to determine what tests are available for execution
The test shell can be specified via:
kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh
Sponsored by: EMC / Isilon Storage Division Approved by: jmmv (mentor) Reviewed by: jilles (maintainer)
show more ...
|
|
Revision tags: release/9.3.0, release/10.0.0 |
|
| #
13de33a5 |
| 11-Dec-2013 |
Julio Merino <[email protected]> |
Migrate tools/regression/bin/ tests to the new layout.
This change is a proof of concept on how to easily integrate existing tests from the tools/regression/ hierarchy into the /usr/tests/ test suit
Migrate tools/regression/bin/ tests to the new layout.
This change is a proof of concept on how to easily integrate existing tests from the tools/regression/ hierarchy into the /usr/tests/ test suite and on how to adapt them to the new layout for src.
To achieve these goals, this change:
- Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/. - Renames the previous regress.sh files to legacy_test.sh. - Adds Makefiles to build and install the tests and all their supporting data files into /usr/tests/bin/. - Plugs the legacy_test test programs into the test suite using the new TAP backend for Kyua (appearing in 0.8) so that the code of the test programs does not have to change. - Registers the new directories in the BSD.test.dist mtree file.
Reviewed by: freebsd-testing Approved by: rpaulo (mentor)
show more ...
|