cros_async: event - fix poll unit test

Make the unit test explicitly run the poll or uring back end.
This will fix running the test if the host doesn't support uring.

Change-Id: I3b5e585c0b5ee442ef41c77c21ae6742c18a3ff4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2545126
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
This commit is contained in:
Dylan Reid 2020-11-13 14:40:53 -08:00 committed by Commit Bot
parent d32098de9a
commit 385c320525

View file

@ -78,14 +78,14 @@ mod tests {
eventfd.write(0xaa).unwrap();
let fut = go(EventAsync::new_uring(eventfd).unwrap());
pin_mut!(fut);
let val = crate::run_executor(crate::RunOne::new(fut)).unwrap();
let val = crate::run_one_uring(fut).unwrap();
assert_eq!(val, 0xaa);
let eventfd = EventFd::new().unwrap();
eventfd.write(0xaa).unwrap();
let fut = go(EventAsync::new_poll(eventfd).unwrap());
pin_mut!(fut);
let val = crate::run_executor(crate::RunOne::new(fut)).unwrap();
let val = crate::run_one_poll(fut).unwrap();
assert_eq!(val, 0xaa);
}
}