Page MenuHomeFreeBSD

Add unit test for ggate flush
Needs ReviewPublic

Authored by jo_bruelltuete.com on Jan 8 2022, 2:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 27, 9:54 AM
Unknown Object (File)
Thu, Mar 26, 6:14 PM
Unknown Object (File)
Thu, Mar 26, 4:07 PM
Unknown Object (File)
Thu, Mar 26, 3:12 PM
Unknown Object (File)
Fri, Mar 20, 6:56 AM
Unknown Object (File)
Fri, Mar 20, 3:25 AM
Unknown Object (File)
Fri, Mar 20, 12:22 AM
Unknown Object (File)
Mar 12 2026, 3:05 PM
Subscribers

Details

Reviewers
asomers
peterj
Summary

Add a test case for flush in ggate.

And while here fix the problem it uncovers.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sbin/ggate/ggated/ggated.c
753

fsync() doesn't actually result in any flushes...
but i suppose we want both here? any opinions?

tests/sys/geom/class/gate/ggate_test.sh
30

how to trigger a bio_flush from user mode?
zpool works.
none of the fsync or dd with conv=fsync do, however.

39

cleanup is not great...

the cleanup() functions here are never called when i try to run this script.

jo_bruelltuete.com added inline comments.
tests/sys/geom/class/gate/ggate_test.sh
223

no, bad idea... this breaks the tests (they no longer fail on failure)

tests/sys/geom/class/gate/ggate_test.sh
37

this way around the test will only pass if numflushes has a number in it.

186

fill the whole device

232

64m is minimum pool size.