From 6e1dfcc1653139734deceb3774874f633eb1573d Mon Sep 17 00:00:00 2001 From: "Lain \"Fearyncess\" Yang" Date: Sun, 22 Sep 2024 00:51:19 +0800 Subject: [PATCH] Ignore `test_disable_enable_perf_events` and `test_get_set_thp_disable` on Loongarch64 QEMU --- test/sys/test_prctl.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/sys/test_prctl.rs b/test/sys/test_prctl.rs index 85327034d2..da072bba46 100644 --- a/test/sys/test_prctl.rs +++ b/test/sys/test_prctl.rs @@ -99,6 +99,10 @@ mod test_prctl { prctl::set_timerslack(original).unwrap(); } + // Loongarch need to use a newer QEMU that disabled these PRCTL subcodes/methods. + // https://github.com/qemu/qemu/commit/220717a6f46a99031a5b1af964bbf4dec1310440 + // So we should ignore them when testing in QEMU environments. + #[cfg_attr(all(qemu, target_arch = "loongarch64"), ignore)] #[test] fn test_disable_enable_perf_events() { prctl::task_perf_events_disable().unwrap(); @@ -112,6 +116,10 @@ mod test_prctl { assert!(no_new_privs); } + // Loongarch need to use a newer QEMU that disabled these PRCTL subcodes/methods + // https://github.com/qemu/qemu/commit/220717a6f46a99031a5b1af964bbf4dec1310440 + // So we should ignore them when testing in QEMU environments. + #[cfg_attr(all(qemu, target_arch = "loongarch64"), ignore)] #[test] fn test_get_set_thp_disable() { let original = prctl::get_thp_disable().unwrap();