MFC r344502: sh: Add set -o pipefailThe pipefail option allows checking the exit status of all commands in apipeline more easily, at a limited cost of complexity in sh itself. It workssimilarly t
MFC r344502: sh: Add set -o pipefailThe pipefail option allows checking the exit status of all commands in apipeline more easily, at a limited cost of complexity in sh itself. It workssimilarly to the option in bash, ksh93 and mksh.Like ksh93 and unlike bash and mksh, the state of the option is saved when apipeline 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 requiredfor a proper exit status for pipelines containing commands such as head thatmay terminate successfully without reading all input. This can be somethinglike( cmd1 r=$? if [ "$r" -gt 128 ] && [ "$(kill -l "$r")" = PIPE ]; then exit 0 else exit "$r" fi) | headPR: 244270Relnotes: yes
show more ...
sh: Add simple test for 'set -C' (noclobber).To ensure fast test runs, race conditions are not tested.
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedafter r298107Summary 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 installedafter r298107Summary 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 examplesso it's clear that ${PACKAGES}FILES is the suggested way forward in terms ofreplacing FILES. share/mk/bsd.README didn't seem like the appropriate methodof communicating that info.MFC after: never probablyX-MFC with: r298107PR: 209114Relnotes: yesTested with: buildworld, installworld, checkworld; buildworld, packageworldSponsored by: EMC / Isilon Storage Division
DIRDEPS_BUILD: Connect MK_TESTS.Sponsored by: EMC / Isilon Storage Division
Avoid adding the '-release' suffix to non-debug kernel packages.Sponsored by: The FreeBSD Foundation
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-8sequences, use $'...' and \OOO to display them safely.The resulting output is not parsable by a strict POSIX.1-2008 shell but shfrom FreeBSD 9.0 and newer and many other shells can parse it.
Convert bin/sh/tests to ATFThe new code uses a "test discovery mechanism" to determinewhat tests are available for executionThe test shell can be specified via: kyua test -v test_suites.FreeB
Convert bin/sh/tests to ATFThe new code uses a "test discovery mechanism" to determinewhat tests are available for executionThe test shell can be specified via: kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/shSponsored by: EMC / Isilon Storage DivisionApproved by: jmmv (mentor)Reviewed by: jilles (maintainer)
Migrate tools/regression/bin/ tests to the new layout.This change is a proof of concept on how to easily integrate existingtests from the tools/regression/ hierarchy into the /usr/tests/ testsuit
Migrate tools/regression/bin/ tests to the new layout.This change is a proof of concept on how to easily integrate existingtests from the tools/regression/ hierarchy into the /usr/tests/ testsuite 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-testingApproved by: rpaulo (mentor)