Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzz iteration as part of operations #153

Merged
merged 2 commits into from
Oct 25, 2022
Merged

Fuzz iteration as part of operations #153

merged 2 commits into from
Oct 25, 2022

Conversation

Tpt
Copy link
Contributor

@Tpt Tpt commented Oct 24, 2022

Allows to test any interleaving of prev/next operations with commits, flushes...

Allows to test any interleaving of prev/next operations with commits, flushes...
@arkpar arkpar requested a review from cheme October 24, 2022 19:50
fuzz/src/lib.rs Show resolved Hide resolved
fuzz/src/lib.rs Outdated
},
IterPosition::End => {
let expected =
Self::valid_previous_values(&[u8::MAX, u8::MAX], &layers);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be IterPosition::End (current code works because key space is a single u8, but End would be better), by changing valid_previous_values to use IterPosition as parameter.
Same thing for valid_next_value call assuming the key are not 0 length
Edit: actually does not really matter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. It allowed me to factorise quite well the code. Thank you for pushing me to do it!

End,
}

pub struct DbWithIter {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be name DbWithFuzzingContext or FuzzingDb. Ok I don't come up with a good name either, maybe change it only the day there is other contextual fields than iter related ones :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, seems better to wait for new contextual fields imho.

@Tpt Tpt merged commit ef1ad59 into paritytech:master Oct 25, 2022
@Tpt Tpt deleted the iter branch October 25, 2022 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants