History log of /freebsd-head/bin/sh/tests/parser/Makefile
Revision Date Author Comments
a47ba490d65b30fb2839fa9cb8ce862074c1ca8c 12-May-2020 jilles <jilles@FreeBSD.org> sh/tests: Test some obscure cases with aliasing keywords
9a92c3b5eb57d8cf95e2cd160b3c416a71b6c09a 11-May-2018 jilles <jilles@FreeBSD.org> sh: Test that backslash-newline within single-quotes is not special

This works correctly, but the test may be helpful when modifying the parser.
21aa21c870c5f9b326c02784ef5512bf79c1b026 16-Apr-2017 jilles <jilles@FreeBSD.org> sh: Fix use after free when resetting an in-use alias.

The special case of modifying an existing alias does not work correctly if
the alias is currently in use. Instead, handle this case by unaliasing the
old alias (if any) and then creating a new alias.
715acb0045f47f556122ae5000422c09a980ed16 16-Apr-2017 jilles <jilles@FreeBSD.org> sh: Link the new test to the build.
ac0377de0b11a1a632ae0f95e29be0cf2ee776fa 08-Apr-2017 jilles <jilles@FreeBSD.org> sh: Add test for unaliasing an alias that is currently in use.

This already works correctly.
00d578928eca75be320b36d37543a7e2a4f9fbdb 27-May-2016 grehan <grehan@FreeBSD.org> Create branch for bhyve graphics import.
92100036c841e961994633b0de4fdbc3c8217fb7 04-May-2016 ngie <ngie@FreeBSD.org> 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
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
- 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
c7d6350d16b34cf063d0cf657e4b6ca004f0a32b 23-Feb-2016 jilles <jilles@FreeBSD.org> sh: Fix set -v and multiline history after r295825.

r295825 erroneously dropped the newline from the input data for 'set -v'
output and multiline history.

Reported by: vangyzen
5e2165399aecc8f21bb606161c2ce029768989e1 19-Feb-2016 jilles <jilles@FreeBSD.org> sh: Rework code to remove '\0' from shell input.

This fixes bugs where '\0' was not removed correctly and speeds up the
f4563d34505e86a964ca266dc23dad8f024c0273 19-Feb-2016 jilles <jilles@FreeBSD.org> sh: Add tests for comments in sh -c.
1bdf892d492fd6b19da90cc960ca556a47963e5d 03-Feb-2016 gjb <gjb@FreeBSD.org> Fix build.

Sponsored by: The FreeBSD Foundation
a6998ad84f9722c560a80302a74fa495e818a153 02-Feb-2016 gjb <gjb@FreeBSD.org> First pass to fix the 'tests' packages.

Sponsored by: The FreeBSD Foundation
90fda359a485dc948c06d33f261406352083d898 01-Dec-2015 ngie <ngie@FreeBSD.org> MFC r269902,r270101:


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)

r270101 (by jilles):

sh: Don't hardcode relative paths in the tests stderr files.

These paths have had to be adjusted to changes in the testsuite runner
several times, so modify the tests to remove the need for such adjustment.

A cp in functional_test.sh is now unneeded, but this matters little in
bc3c6d9c811a33f3915a77326c82c00f9909f43e 13-Sep-2015 jilles <jilles@FreeBSD.org> MFC r268436,273243,278806,280920,286971: sh: Add various tests.

These new tests from head pass with unmodified stable/10 sh.
6633d3a788ab02ce8b43726487d2705bbad3ea29 02-Sep-2015 jilles <jilles@FreeBSD.org> sh: Allow empty << EOF markers.
5e4f40c860b60f76a46b999cdc2606ac287a975c 20-Aug-2015 jilles <jilles@FreeBSD.org> sh: Avoid negative character values from $'\Uffffffff' etc.

The negative value was not expected and generated the low 8 bits as a byte,
which may be an invalid character encoding.

The final shift in creating the negative value was undefined as well.

Make the temporary variable unsigned to fix this.
5d7936e9513610780b41d2d2524f2c33afed6359 20-Aug-2015 jilles <jilles@FreeBSD.org> sh: Add test for $'\u' without any digits.

It is likely that $'\uXXXX' and $'\UXXXXXXXX' will allow fewer digits in
future. However, no digits at all should still be disallowed.
4eb9d5ad9feda4e7548b017f80c8d769f155992a 19-Oct-2014 jilles <jilles@FreeBSD.org> sh: Allow backslash-newline continuation in more places:

* directly after a $
* directly after ${
* between the characters of a multi-character operator token
* within a parameter name
a6283e56879f2b58cde7c5684cf1e1741e10f224 17-Oct-2014 jilles <jilles@FreeBSD.org> sh: Add some tests for backslash-newline continuation.
b9a6c69366eef91243d00249b3150fa796518385 14-Sep-2014 jilles <jilles@FreeBSD.org> sh: Remove arbitrary length limit on << EOF markers.

This also simplifies the code.
45e6755fc1be9301069f1ec49907dde6c4c3a20f 13-Aug-2014 ngie <ngie@FreeBSD.org> 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)
80efbcbbcda6a5c59a21cb9628b2fd0573697dfe 09-Mar-2014 jmmv <jmmv@FreeBSD.org> 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
eb1a5f8de9f7ea602c373a710f531abbf81141c4 21-Feb-2014 gjb <gjb@FreeBSD.org> Move ^/user/gjb/hacking/release-embedded up one directory, and remove
^/user/gjb/hacking since this is likely to be merged to head/ soon.

Sponsored by: The FreeBSD Foundation
9b565c0250634c44a36639e518e7ca3ba7a88ebd 26-Jan-2014 jilles <jilles@FreeBSD.org> sh: Allow aliases to force alias substitution on the following word.

If an alias's value ends with a space or tab, the next word is also
checked for aliases.

This is a POSIX feature. It is useful with utilities like command and
nohup (alias them to themselves followed by a space).
f16aa3a7ff1ca0414aea2598f6b875568f9c70f3 25-Jan-2014 jilles <jilles@FreeBSD.org> sh: Add tests for alias names after another alias.

Since the first alias's value does not end with a blank, the next word
should not be checked for aliases.
d93326e5784a5f392b6e278a538e0e0014d72037 24-Jan-2014 jilles <jilles@FreeBSD.org> sh: Add test for nested alias.
6b01bbf146ab195243a8e7d43bb11f8835c76af8 27-Dec-2013 gjb <gjb@FreeBSD.org> Copy head@r259933 -> user/gjb/hacking/release-embedded for initial
inclusion of (at least) arm builds with the release.

Sponsored by: The FreeBSD Foundation
cfc6ad9bc622f4196577ecf38575ca78dfe5c005 11-Dec-2013 jmmv <jmmv@FreeBSD.org> 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)