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)
Thu, Aug 13, 5:12 AM
Unknown Object (File)
Wed, Aug 12, 10:05 PM
Unknown Object (File)
Wed, Aug 12, 1:39 PM
Unknown Object (File)
Tue, Aug 11, 4:55 PM
Unknown Object (File)
Tue, Aug 11, 8:31 AM
Unknown Object (File)
Mon, Aug 10, 7:06 PM
Unknown Object (File)
Mon, Aug 10, 2:39 AM
Unknown Object (File)
Sun, Aug 9, 3:55 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.