tests: Add integration test to force io_uring off for block

Fixes: #1561

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-11-17 17:13:43 +00:00 committed by Samuel Ortiz
parent c622278030
commit f913dd6150

View File

@ -2853,8 +2853,7 @@ mod tests {
handle_child_output(r, &output);
}
#[test]
fn test_virtio_blk() {
fn _test_virtio_block(disable_io_uring: bool) {
let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(&mut focal);
@ -2884,8 +2883,9 @@ mod tests {
)
.as_str(),
format!(
"path={},readonly=on,direct=on,num_queues=4",
blk_file_path.to_str().unwrap()
"path={},readonly=on,direct=on,num_queues=4,_disable_io_uring={}",
blk_file_path.to_str().unwrap(),
disable_io_uring
)
.as_str(),
])
@ -2937,6 +2937,16 @@ mod tests {
handle_child_output(r, &output);
}
#[test]
fn test_virtio_block() {
_test_virtio_block(false)
}
#[test]
fn test_virtio_block_disable_io_uring() {
_test_virtio_block(false)
}
#[test]
fn test_vhost_user_net_default() {
test_vhost_user_net(None, 2, Some(&prepare_vhost_user_net_daemon), false)