UT: fix compile error in unit tests

fix compile error in unit tests for DummyConfigInfo.

Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
This commit is contained in:
Chao Wu 2022-07-03 23:34:26 +08:00
parent 11b3f95140
commit 38957fe00b
4 changed files with 3 additions and 14 deletions

View File

@ -867,8 +867,8 @@ mod tests {
assert_eq!(&builder.get_next_mem_file(), "/tmp/shmem");
assert_eq!(builder.mem_index, 3);
builder.set_prealloc(true);
builder.set_dirty_page_logging(true);
builder.toggle_prealloc(true);
builder.toggle_dirty_page_logging(true);
assert!(builder.mem_prealloc);
assert!(builder.dirty_page_logging);
}

View File

@ -10,7 +10,6 @@ use std::fs::File;
use std::sync::mpsc::{Receiver, Sender, TryRecvError};
use log::{debug, error, info, warn};
use vmm_sys_util::eventfd::EventFd;
use crate::error::{Result, StartMicrovmError, StopMicrovmError};
use crate::event_manager::EventManager;

View File

@ -30,7 +30,6 @@ macro_rules! get_bucket_update {
}
}};
}
pub(crate) use get_bucket_update;
/// Trait for generic configuration information.
pub trait ConfigItem {
@ -414,7 +413,7 @@ mod tests {
Exist,
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, Default)]
pub struct DummyConfigInfo {
id: String,
content: String,

View File

@ -966,15 +966,6 @@ pub mod tests {
fn test_vcpu_check_io_port_info() {
let (vcpu, _receiver) = create_vcpu();
// boot complete signal
let res = vcpu
.check_io_port_info(
MAGIC_IOPORT_SIGNAL_GUEST_BOOT_COMPLETE,
&[MAGIC_VALUE_SIGNAL_GUEST_BOOT_COMPLETE],
)
.unwrap();
assert!(res);
// debug info signal
let res = vcpu
.check_io_port_info(MAGIC_IOPORT_DEBUG_INFO, &[0, 0, 0, 0])