mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 14:58:16 +00:00
kata-types: fix bug in kata-types several test cases
(1) As mis-use of cap.set causing previous Caps lost which causing assert! failed, just replacing cap.set with cap.add. (2) It will return error if there's no such name setting when do update_config_by_annotation { ... if config.runtime.name.is_empty() { return Err(io::Error::new( io::ErrorKind::InvalidData, "Runtime name is missing in the configuration", )); } ... } Fixes #9783 Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -127,7 +127,7 @@ mod tests {
|
||||
assert!(cap.is_fs_sharing_supported());
|
||||
|
||||
// test set hybrid-vsock support
|
||||
cap.set(CapabilityBits::HybridVsockSupport);
|
||||
cap.add(CapabilityBits::HybridVsockSupport);
|
||||
assert!(cap.is_hybrid_vsock_supported());
|
||||
// test append capabilities
|
||||
cap.add(CapabilityBits::GuestMemoryProbe);
|
||||
|
@@ -84,6 +84,7 @@ sandbox_bind_mounts=["/proc/self"]
|
||||
vfio_mode="vfio"
|
||||
experimental=["a", "b"]
|
||||
enable_pprof = true
|
||||
name="virt-container"
|
||||
hypervisor_name = "qemu"
|
||||
agent_name = "agent0"
|
||||
|
||||
|
@@ -83,6 +83,7 @@ sandbox_bind_mounts=["/proc/self"]
|
||||
vfio_mode="vfio"
|
||||
experimental=["a", "b"]
|
||||
enable_pprof = true
|
||||
name="virt-container"
|
||||
hypervisor_name = "qemu"
|
||||
agent_name = "agent0"
|
||||
|
||||
|
Reference in New Issue
Block a user