Skip to content

Commit 57e2a55

Browse files
committed
Ignore test_disable_enable_perf_events and test_get_set_thp_disable on Loongarch64 QEMU
1 parent 1c7d389 commit 57e2a55

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/sys/test_prctl.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ mod test_prctl {
9999
prctl::set_timerslack(original).unwrap();
100100
}
101101

102+
// Loongarch need to use a newer QEMU that disabled these PRCTL subcodes/methods.
103+
// https://github.com/qemu/qemu/commit/220717a6f46a99031a5b1af964bbf4dec1310440
104+
// So we should ignore them when testing in QEMU environments.
105+
#[cfg_attr(all(qemu, target_arch = "loongarch64"), ignore)]
102106
#[test]
103107
fn test_disable_enable_perf_events() {
104108
prctl::task_perf_events_disable().unwrap();
@@ -112,6 +116,10 @@ mod test_prctl {
112116
assert!(no_new_privs);
113117
}
114118

119+
// Loongarch need to use a newer QEMU that disabled these PRCTL subcodes/methods
120+
// https://github.com/qemu/qemu/commit/220717a6f46a99031a5b1af964bbf4dec1310440
121+
// So we should ignore them when testing in QEMU environments.
122+
#[cfg_attr(all(qemu, target_arch = "loongarch64"), ignore)]
115123
#[test]
116124
fn test_get_set_thp_disable() {
117125
let original = prctl::get_thp_disable().unwrap();

0 commit comments

Comments
 (0)