Page MenuHomeFreeBSD

awk: Move to using two sets of tests
ClosedPublic

Authored by imp on Aug 1 2021, 11:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 9:34 PM
Unknown Object (File)
Sat, Nov 16, 8:41 AM
Unknown Object (File)
Fri, Nov 1, 3:30 PM
Unknown Object (File)
Oct 14 2024, 9:45 AM
Unknown Object (File)
Oct 5 2024, 3:23 AM
Unknown Object (File)
Oct 5 2024, 1:01 AM
Unknown Object (File)
Oct 4 2024, 10:04 PM
Unknown Object (File)
Oct 4 2024, 4:08 PM
Subscribers
None

Details

Summary

Upstream one-true-awk has two sets of tests. These are in addition to
NetBSD's tests we're using. The 'bugs-fixed' tests from upstream are
ready to use as-is (more or less). However, the 'tests' from upstream
are not, so for now we'll just use the netbsd and bugs-fixed tests.
They provide an OK workout and are better than nothing, though the tests
themselves are for specific esoteric things.

The upstream bugs-fixed tests are *ALMOST* a drop in. However, 3 test
for errors and the upstream test jig mashes stdout and stderr together,
which atf doesn't do, so make a tiny tweak to the upstream tests that I
hope to upstream. Plus upstream has ../a.out: instead of awk: in the
output. Not sure how to deal with this yet, so I've not proposed
anything upstream.

This required moving the netbsd tests to a new direcotry, so update
mtree files as well. The change is useless for 'make check' without it.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Aug 1 2021, 11:54 PM
imp created this revision.
This revision was not accepted when it landed; it landed in state Needs Review.Nov 5 2021, 2:55 PM
This revision was automatically updated to reflect the committed changes.

I'm sorry for not responding sooner.. just one comment (otherwise, it looks great!).

usr.bin/awk/tests/bugs-fixed/Makefile
12

I thought the general idea was to stay away from idioms like this because FreeBSD (as a project) prefers explicit instead of implicit, and implicit (autogenerated lists) could point to issues where someone didn't check in tests, for instance.

Plus upstream has ../a.out: instead of awk: in the
output. Not sure how to deal with this yet, so I've not proposed
anything upstream.

If a.out is in the output, *_PLAIN_TESTS_SH_SED_ could be used to change the files on the fly ;).

I could see the benefits of using a.out instead of a hardcoded awk binary, but I understand the minor pain.

In D31376#742662, @ngie wrote:

Plus upstream has ../a.out: instead of awk: in the
output. Not sure how to deal with this yet, so I've not proposed
anything upstream.

If a.out is in the output, *_PLAIN_TESTS_SH_SED_ could be used to change the files on the fly ;).

I could see the benefits of using a.out instead of a hardcoded awk binary, but I understand the minor pain.

It's easier to fix this beforehand. And I'd rather wait until I can work out what upstream is doing first.

usr.bin/awk/tests/bugs-fixed/Makefile
12

I think this is a good idea...