mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-19 20:24:35 +00:00
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:
parent
11b3f95140
commit
38957fe00b
@ -867,8 +867,8 @@ mod tests {
|
|||||||
assert_eq!(&builder.get_next_mem_file(), "/tmp/shmem");
|
assert_eq!(&builder.get_next_mem_file(), "/tmp/shmem");
|
||||||
assert_eq!(builder.mem_index, 3);
|
assert_eq!(builder.mem_index, 3);
|
||||||
|
|
||||||
builder.set_prealloc(true);
|
builder.toggle_prealloc(true);
|
||||||
builder.set_dirty_page_logging(true);
|
builder.toggle_dirty_page_logging(true);
|
||||||
assert!(builder.mem_prealloc);
|
assert!(builder.mem_prealloc);
|
||||||
assert!(builder.dirty_page_logging);
|
assert!(builder.dirty_page_logging);
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ use std::fs::File;
|
|||||||
use std::sync::mpsc::{Receiver, Sender, TryRecvError};
|
use std::sync::mpsc::{Receiver, Sender, TryRecvError};
|
||||||
|
|
||||||
use log::{debug, error, info, warn};
|
use log::{debug, error, info, warn};
|
||||||
use vmm_sys_util::eventfd::EventFd;
|
|
||||||
|
|
||||||
use crate::error::{Result, StartMicrovmError, StopMicrovmError};
|
use crate::error::{Result, StartMicrovmError, StopMicrovmError};
|
||||||
use crate::event_manager::EventManager;
|
use crate::event_manager::EventManager;
|
||||||
|
@ -30,7 +30,6 @@ macro_rules! get_bucket_update {
|
|||||||
}
|
}
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
pub(crate) use get_bucket_update;
|
|
||||||
|
|
||||||
/// Trait for generic configuration information.
|
/// Trait for generic configuration information.
|
||||||
pub trait ConfigItem {
|
pub trait ConfigItem {
|
||||||
@ -414,7 +413,7 @@ mod tests {
|
|||||||
Exist,
|
Exist,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug, Default)]
|
||||||
pub struct DummyConfigInfo {
|
pub struct DummyConfigInfo {
|
||||||
id: String,
|
id: String,
|
||||||
content: String,
|
content: String,
|
||||||
|
@ -966,15 +966,6 @@ pub mod tests {
|
|||||||
fn test_vcpu_check_io_port_info() {
|
fn test_vcpu_check_io_port_info() {
|
||||||
let (vcpu, _receiver) = create_vcpu();
|
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
|
// debug info signal
|
||||||
let res = vcpu
|
let res = vcpu
|
||||||
.check_io_port_info(MAGIC_IOPORT_DEBUG_INFO, &[0, 0, 0, 0])
|
.check_io_port_info(MAGIC_IOPORT_DEBUG_INFO, &[0, 0, 0, 0])
|
||||||
|
Loading…
Reference in New Issue
Block a user