Page MenuHomeFreeBSD

quot: Add tests
ClosedPublic

Authored by des on Oct 16 2025, 10:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 4, 5:55 PM
Unknown Object (File)
Sun, Nov 2, 10:11 PM
Unknown Object (File)
Sun, Nov 2, 5:53 AM
Unknown Object (File)
Fri, Oct 31, 3:54 PM
Unknown Object (File)
Wed, Oct 29, 3:13 PM
Unknown Object (File)
Sat, Oct 25, 4:37 PM
Unknown Object (File)
Sat, Oct 25, 4:37 PM
Unknown Object (File)
Sat, Oct 25, 4:37 PM

Details

Summary

To facilitate the task, we change the comparison function so that users
with equal filesystem usage are sorted by UID, and add an undocumented
option that prevents quot from replacing numerical UIDs with names. We
also switch from getfsfile(3) to getmntpoint(3) so the first line is
identical regardless of whether we pass quot a mountpoint or a device.

Diff Detail

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

Event Timeline

des requested review of this revision.Oct 16 2025, 10:33 AM
emaste added inline comments.
usr.sbin/quot/tests/quot_test.sh
51–53

Does three syncs provide any guarantee that one or two does not?

markj added inline comments.
usr.sbin/quot/tests/quot_test.sh
51–53

I don't think so, sync is asynchronous. More reliable would be to unmount the filesystem, or update the mount to make it read-only.

usr.sbin/quot/tests/quot_test.sh
51–53

Empirically, a single sync was not enough for the test to succeed. It is possible that a single sync plus a brief sleep would have done the trick, but I find the traditional triple sync more poetic.

des marked 2 inline comments as done.Thu, Oct 16, 9:31 PM
This revision is now accepted and ready to land.Thu, Oct 16, 9:42 PM
This revision was automatically updated to reflect the committed changes.