Page MenuHomeFreeBSD

Fix grep_test:recurse with ZFS and TMPFS tmpdirs
ClosedPublic

Authored by asomers on Jan 13 2016, 4:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 3, 9:10 PM
Unknown Object (File)
May 14 2024, 12:18 PM
Unknown Object (File)
May 14 2024, 9:14 AM
Unknown Object (File)
Feb 21 2024, 10:32 AM
Unknown Object (File)
Feb 9 2024, 4:02 PM
Unknown Object (File)
Dec 22 2023, 9:25 PM
Unknown Object (File)
Nov 27 2023, 11:00 AM
Unknown Object (File)
Nov 23 2023, 3:19 AM
Subscribers

Details

Summary

contrib/netbsd-tests/usr.bin/grep/t_grep.sh
Fix grep_test:recurse when /tmp is either zfs or tmpfs. The test
was relying on an implicit ordering of directory recursion which
happens to be true when using UFS. grep's specification requires no
such ordering. The solution is to ignore the order of grep's
results.

Test Plan

mount -t tmpfs tmpfs /mnt
TMPDIR=/mnt kyua test grep_test:recurse

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

asomers retitled this revision from to Fix grep_test:recurse with ZFS and TMPFS tmpdirs.
asomers updated this object.
asomers edited the test plan for this revision. (Show Details)
asomers added a reviewer: ngie.
contrib/netbsd-tests/usr.bin/grep/t_grep.sh
73 ↗(On Diff #12264)

Please do something like this so I can track this needing to be submitted back to NetBSD:

# Begin FreeBSD
if true; then
atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" -x "grep -r haddock recurse | sort"
else
# End FreeBSD
atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" grep -r haddock recurse
# Begin FreeBSD
fi
# End FreeBSD

Add FreeBSD note as requested by ngie. I'm not exactly sure what
indentation style ngie wanted. I'm treating the "(Begin|End) FreeBSD"
statements like C #ifdefs, and not indenting their bodies.

ngie added inline comments.
contrib/netbsd-tests/usr.bin/grep/t_grep.sh
78–81 ↗(On Diff #12316)

Please reply to this comment.

ngie edited edge metadata.

Ugh. I accidentally missed that you followed through with the feedback (please mark Done next time).

This revision is now accepted and ready to land.Jan 27 2016, 6:00 AM
This revision was automatically updated to reflect the committed changes.