-
Notifications
You must be signed in to change notification settings - Fork 61
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
Tests writes and iteration with Loom #163
Conversation
Allows to instrument more code Reduces the max number of interruptions in the CI to keep the run time small
@@ -79,3 +79,5 @@ jobs: | |||
with: | |||
command: test | |||
args: --test loom --features=loom,instrumentation --release --verbose | |||
env: | |||
LOOM_MAX_PREEMPTIONS: 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We limit here the number of context switch to keep the number of sequence of states that Loom checks to an amount compatible with a usable CI runtime.
@@ -155,6 +155,9 @@ impl Header { | |||
} | |||
|
|||
pub struct Entry<B: AsRef<[u8]> + AsMut<[u8]>>(usize, B); | |||
#[cfg(feature = "loom")] | |||
pub type FullEntry = Entry<Vec<u8>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad hack because of the stack limitations introduced by Loom.
Is it possible to increase the stack size with |
I tried to play with it and with |
tests/loom.rs
Outdated
}); | ||
|
||
t1.join().unwrap(); | ||
t2.join().unwrap(); | ||
t3.join().unwrap(); | ||
|
||
// Checks, that either T1 committed before T2 or reverse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So IIUC here the assert_eq is not really what we want to test, comment may not be up to date. Would just put Check state consistency
.
No description provided.