CVS commit: src/tests/bin/sh
"Robert Elz" <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module Name: src Committed By: kre Date: Fri Mar 27 09:39:39 UTC 2026 Modified Files: src/tests/bin/sh: t_expand.sh Log Message: Add some tests for an ancient NetBSD sh bug This adds 78 sub-tests to the t_expand:alternative test-case. In old NetBSD shells - which means anything from May 1994 (when CSRG BSD 4.4 lite was merged into NetBSD) until (early hours UTC) 26 Mar 2026, 12 of these new 78 sub-tests would fail. The issue being tested here was fixed about 32 hours ago, along with the completely unrelated fix for the recently introduced land mine off by one bug. All these new sub-tests will pass in a /bin/sh from HEAD now. No other shell I have to test (except bosh) fails any of these added 78 sub-tests (and bosh, which also fails plenty of the existing ones, fails less of the new ones than the NetBSD sh did - and different sub-tests). Of course, since I am adding tests to deliberately provoke what I already knew from reading the source would fail in our shell, that is perhaps an unfair comparison. Even our hopelessly broken in so many ways /bin/ksh didn't fail any of these added sub-tests (or for that matter, anything else in the t_expand:alternative test-case which is really a test of very basic functionality). The FreeBSD shell, which would have started from the same place as ours, had this fixed at least 10 years ago (probably many more) - I have copies of their sh sources from that vintage, and can see it was fixed then; dash is also OK. Since no-one has cared about the bug in the past (almost) 32 years (and given its nature, I am not surprised about that), I am not planning pullups of the fix to anything. It will be fixed (in a release version) in NetBSD 12. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/tests/bin/sh/t_expand.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.