From 7d704c86c6b7e647958012091f1b0a0c8b3b1fab Mon Sep 17 00:00:00 2001 From: Jason White Date: Sat, 29 Jul 2023 03:49:57 -0700 Subject: [PATCH] Fix timer_semantics tests Summary: The default opt-level was recently lowered from 1 to 0. `syscalls::syscall!(...)` has one branch to check the error code while `syscalls::raw_syscall!()` does not. Presumably, this branch was getting optimized out when opt-level=1, but not when opt-level=0 and thus started causing the highly-sensitive timer tests to start failing. Reviewed By: VladimirMakaev Differential Revision: D47892355 fbshipit-source-id: 9d19d4a1a1e0521650ffcb46a93f4a61a07bcae1 --- tests/timer_semantics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/timer_semantics.rs b/tests/timer_semantics.rs index d9ffc28..14811a1 100644 --- a/tests/timer_semantics.rs +++ b/tests/timer_semantics.rs @@ -289,7 +289,7 @@ mod tests { #[inline(always)] unsafe fn syscall_no_branches(no: Sysno, arg1: libc::c_long) { - syscalls::syscall!(no, arg1, 0, 0, 0, 0, 0); + syscalls::raw_syscall!(no, arg1, 0, 0, 0, 0, 0); } fn sched_precise() {