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:
Alex Lyn 2024-03-08 09:41:05 +08:00 committed by GitHub
commit c73597c39d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 22 deletions

View File

@ -1429,11 +1429,7 @@ mod tests {
Some(vm.vm_config().clone()),
vm.shared_info().clone(),
);
#[cfg(target_arch = "x86_64")]
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 guest_addr = GuestAddress(*dbs_boot::layout::GUEST_MEM_END);
let cache_len = 1024 * 1024 * 1024;
let mmap_region = MmapRegion::build(

View File

@ -156,28 +156,17 @@ mod tests {
#[test]
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 || {
assert!(register_signal_handlers().is_ok());
let filter = SeccompFilter::new(
vec![
(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,
vec![(libc::SYS_mkdirat, vec![])].into_iter().collect(),
SeccompAction::Allow,
SeccompAction::Trap,
std::env::consts::ARCH.try_into().unwrap(),
)
.unwrap();