Page MenuHomeFreeBSD

netbsd-tests: Update a test case to chase grep symlink handling changes
ClosedPublic

Authored by markj on Sep 5 2024, 1:51 PM.
Tags
None
Referenced Files
F135100687: D46544.diff
Thu, Nov 6, 12:13 PM
Unknown Object (File)
Mon, Nov 3, 12:03 AM
Unknown Object (File)
Fri, Oct 31, 2:51 PM
Unknown Object (File)
Wed, Oct 29, 5:02 PM
Unknown Object (File)
Wed, Oct 29, 5:02 PM
Unknown Object (File)
Wed, Oct 29, 5:02 PM
Unknown Object (File)
Wed, Oct 29, 11:14 AM
Unknown Object (File)
Wed, Oct 29, 4:55 AM
Subscribers

Diff Detail

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

Event Timeline

markj requested review of this revision.Sep 5 2024, 1:51 PM

Would it make sense to create another testcase specific for -S vs non--S?
Not a huge deal.. just thinking ahead (and yes, I need to rebase netbsd-tests sometime soon...).

This revision is now accepted and ready to land.Sep 6 2024, 5:25 PM
jhb added inline comments.
contrib/netbsd-tests/usr.bin/grep/t_grep.sh
75

Note that the old test wouldn't have passed with most other grep's either FWIW including BSD grep on macOS.

I actually had created a directory tree with various helps and symlinks (including broken symlinks) for my own local testing. I then tested all of -p, -S, and -O against the tree. I documented much of this in the PR and in the review. Should maybe add those tests, but they aren't NetBSD tests at that point. I guess they could go in a grep/tests/ directory in the tree?

contrib/netbsd-tests/usr.bin/grep/t_grep.sh
75

Indeed, I think I can remove this FreeBSD block.

There is already a usr.bin/grep/tests/grep_freebsd_test.sh, which seems like a good place for your tests to live.