Open mulkieran opened 5 years ago
It looks like the handy Rust crate partial-io might be our friend as well.
@GuillaumeGomez This one is very open-ended. I think it makes sense to try to explore the partial-io crate to see how if it can be used to help out w/ our testing problem - I only took a brief look at it, but it did seem a likely candidate.
@lleshchi You might want to think about this while you're working on https://github.com/stratis-storage/stratisd/issues/2133
Something like this would allow also to test behaviour on other differences besides time stamp:
StaticHeader::setup()
does the correct thing.proptest might be our friend here.
The difference between this test andbda_test_recovery
is that that test randomly changes the buffers, not the headers. So, it tests only fixes at the level where one static header location is unreadable.test_recovery
tests the situation where both buffers are readable, but one or both are not correct StaticHeaders. It covers, at least in theory:test_rewrite_older
is supposed to cover._Neither test covers an unreadable buffer.