mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-21 01:13:56 +00:00
Merge pull request #9208 from studychao/chao/fix_virt_ci
Dragonball: fix unit test problems when switching to new virt github machine
This commit is contained in:
commit
c73597c39d
@ -1429,11 +1429,7 @@ mod tests {
|
|||||||
Some(vm.vm_config().clone()),
|
Some(vm.vm_config().clone()),
|
||||||
vm.shared_info().clone(),
|
vm.shared_info().clone(),
|
||||||
);
|
);
|
||||||
#[cfg(target_arch = "x86_64")]
|
let guest_addr = GuestAddress(*dbs_boot::layout::GUEST_MEM_END);
|
||||||
let guest_addr = GuestAddress(0x200000000000);
|
|
||||||
// TODO: #7290 - https://github.com/kata-containers/kata-containers/issues/7290
|
|
||||||
#[cfg(target_arch = "aarch64")]
|
|
||||||
let guest_addr = GuestAddress(0xF800000000);
|
|
||||||
|
|
||||||
let cache_len = 1024 * 1024 * 1024;
|
let cache_len = 1024 * 1024 * 1024;
|
||||||
let mmap_region = MmapRegion::build(
|
let mmap_region = MmapRegion::build(
|
||||||
|
@ -156,28 +156,17 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_signal_handler() {
|
fn test_signal_handler() {
|
||||||
|
// When METRICS initializes lazy, it will call the call_once to add locks.
|
||||||
|
// If the signal interrupts the initialization process, initializing again the
|
||||||
|
// metrics in the signal interrupt handler will cause a deadlock.
|
||||||
|
lazy_static::initialize(&METRICS);
|
||||||
let child = thread::spawn(move || {
|
let child = thread::spawn(move || {
|
||||||
assert!(register_signal_handlers().is_ok());
|
assert!(register_signal_handlers().is_ok());
|
||||||
|
|
||||||
let filter = SeccompFilter::new(
|
let filter = SeccompFilter::new(
|
||||||
vec![
|
vec![(libc::SYS_mkdirat, vec![])].into_iter().collect(),
|
||||||
(libc::SYS_brk, vec![]),
|
|
||||||
(libc::SYS_exit, vec![]),
|
|
||||||
(libc::SYS_futex, vec![]),
|
|
||||||
(libc::SYS_getpid, vec![]),
|
|
||||||
(libc::SYS_munmap, vec![]),
|
|
||||||
(libc::SYS_kill, vec![]),
|
|
||||||
(libc::SYS_rt_sigprocmask, vec![]),
|
|
||||||
(libc::SYS_rt_sigreturn, vec![]),
|
|
||||||
(libc::SYS_sched_getaffinity, vec![]),
|
|
||||||
(libc::SYS_set_tid_address, vec![]),
|
|
||||||
(libc::SYS_sigaltstack, vec![]),
|
|
||||||
(libc::SYS_write, vec![]),
|
|
||||||
]
|
|
||||||
.into_iter()
|
|
||||||
.collect(),
|
|
||||||
SeccompAction::Trap,
|
|
||||||
SeccompAction::Allow,
|
SeccompAction::Allow,
|
||||||
|
SeccompAction::Trap,
|
||||||
std::env::consts::ARCH.try_into().unwrap(),
|
std::env::consts::ARCH.try_into().unwrap(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user