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
Unknown Object (File)
Mon, Oct 6, 12:09 PM
Unknown Object (File)
Sun, Sep 28, 3:46 AM
Unknown Object (File)
Sep 5 2025, 6:24 PM
Unknown Object (File)
Sep 5 2025, 2:43 PM
Unknown Object (File)
Sep 3 2025, 3:51 PM
Unknown Object (File)
Aug 9 2025, 3:38 AM
Unknown Object (File)
Aug 8 2025, 10:59 AM
Unknown Object (File)
Jul 29 2025, 9:10 PM
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.