2 ms·
I wouldn't say "no unit tests". There are xfstests, the problem is that nobody runs them on stable backports to verify their correctness and completeness.
by patrakov 3y ago
I wouldn't say "no unit tests". There are xfstests, the problem is that nobody runs them on stable backports to verify their correctness and completeness.
- jeffbee 3y agoxfstests 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).