stratis-storage / stratisd

Easy to use local storage management for Linux.
https://stratis-storage.github.io
Mozilla Public License 2.0
798 stars 55 forks source link

Improve and extend test_rewrite_older and test_recovery #1445

Open mulkieran opened 5 years ago

mulkieran commented 5 years ago

Something like this would allow also to test behaviour on other differences besides time stamp:

proptest might be our friend here.

The difference between this test and bda_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:

Neither test covers an unreadable buffer.

mulkieran commented 5 years ago

It looks like the handy Rust crate partial-io might be our friend as well.

mulkieran commented 5 years ago

@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.

mulkieran commented 3 years ago

@lleshchi You might want to think about this while you're working on https://github.com/stratis-storage/stratisd/issues/2133