io_uring: Disable multi_thread_submit_and_complete

This CL reverts previous attempts at reducing the flakiness of the test
and disables it completely.

BUG=b:183722981
TEST=./test_all

Change-Id: I36527d6404c67ff9e73792676a52f064d2f48d14
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2787246
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Dennis Kempin 2021-03-25 11:07:25 -07:00 committed by Commit Bot
parent 44c728c123
commit 758503bcb5

View file

@ -1423,7 +1423,9 @@ mod tests {
);
}
// TODO(b/183722981): Fix and re-enable test
#[test]
#[ignore]
fn multi_thread_submit_and_complete() {
const NUM_SUBMITTERS: usize = 7;
const NUM_COMPLETERS: usize = 3;
@ -1504,13 +1506,30 @@ mod tests {
t.join().unwrap();
}
// Make sure we didn't submit more entries than expected.
assert_eq!(uring.complete_ring.num_ready(), 0);
// Now that all submitters are finished, add NOPs to wake up any completers blocked on the
// syscall.
for i in 0..NUM_COMPLETERS {
uring
.add_nop((NUM_SUBMITTERS * ITERATIONS + i) as UserData)
.unwrap();
}
uring.submit().unwrap();
for t in threads {
t.join().unwrap();
}
// Make sure we didn't submit more entries than expected. Only the last few NOPs added to
// wake up the completer threads may still be in the completion ring.
assert!(uring.complete_ring.num_ready() <= NUM_COMPLETERS as u32);
assert_eq!(
in_flight.lock().abs() as u32 + uring.complete_ring.num_ready(),
0
NUM_COMPLETERS as u32
);
assert_eq!(uring.submit_ring.lock().added, 0);
assert_eq!(
uring.stats.total_ops.load(Ordering::Relaxed),
(NUM_SUBMITTERS * ITERATIONS + NUM_COMPLETERS) as u64
);
// Leave the completer threads hanging to be cleaned up by the OS.
}
}