Module Name: src
Committed By: riastradh
Date: Tue May 14 16:04:18 UTC 2024
Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.h
Log Message:
t_ptrace_wait: Force result by write to volatile, not call to usleep.
This is causing each FPE-related test to time out because it's
actually passinga large number to usleep, which now respects large
numbers.
To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/tests/lib/libc/sys/t_ptrace_wait.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/sys/t_ptrace_wait.h
diff -u src/tests/lib/libc/sys/t_ptrace_wait.h:1.34 src/tests/lib/libc/sys/t_ptrace_wait.h:1.35
--- src/tests/lib/libc/sys/t_ptrace_wait.h:1.34 Tue May 24 20:08:38 2022
+++ src/tests/lib/libc/sys/t_ptrace_wait.h Tue May 14 16:04:17 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.h,v 1.34 2022/05/24 20:08:38 andvar Exp $ */
+/* $NetBSD: t_ptrace_wait.h,v 1.35 2024/05/14 16:04:17 riastradh Exp $ */
/*-
* Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -677,6 +677,8 @@ are_fpu_exceptions_supported(void)
#define are_fpu_exceptions_supported() 1
#endif
+volatile double ignore_result;
+
static void __used
trigger_fpe(void)
{
@@ -701,7 +703,7 @@ trigger_fpe(void)
#endif
/* Division by zero causes CPU trap, translated to SIGFPE */
- usleep((int)(a / b));
+ ignore_result = (int)(a / b);
}
static void __used