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)
Tue, Nov 18, 3:19 AM
Unknown Object (File)
Mon, Nov 17, 4:24 AM
Unknown Object (File)
Sun, Nov 16, 5:21 PM
Unknown Object (File)
Sun, Nov 16, 3:06 PM
Unknown Object (File)
Sun, Nov 16, 2:27 PM
Unknown Object (File)
Fri, Nov 7, 3:50 AM
Unknown Object (File)
Wed, Nov 5, 2:40 AM
Unknown Object (File)
Sun, Nov 2, 5:07 AM
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.