2 ms·
xfstests are not unit tests, they are integration stress tests, and their coverage is quite poor. Nothing in that suite exercises `xfs_bmap_btalloc_at_eof` part
by jeffbee 3y ago
xfstests are not unit tests, they are integration stress tests, and their coverage is quite poor. Nothing in that suite exercises `xfs_bmap_btalloc_at_eof` particularly. That's the kind of unit test you want before undertaking a large refactor. There are several testable postconditions that would be trivial to test, if this code had an easy way to add and run unit tests. It has two mutable (in-out) parameters and a comment that says allocation returns as if the function was never called. And that is where the bug lies, according to the patch (which also adds or modifies no tests).