Module Name: src
Committed By: njoly
Date: Mon Dec 27 15:24:13 UTC 2010
Modified Files:
src/tests/lib/libc/gen: t_siginfo.c
Log Message:
Do use integer arithmetics to generate FPE_INTDIV in sigfpe_int testcase.
Ok pgoyette.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/gen/t_siginfo.c
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/gen/t_siginfo.c
diff -u src/tests/lib/libc/gen/t_siginfo.c:1.3 src/tests/lib/libc/gen/t_siginfo.c:1.4
--- src/tests/lib/libc/gen/t_siginfo.c:1.3 Sun Dec 26 12:32:28 2010
+++ src/tests/lib/libc/gen/t_siginfo.c Mon Dec 27 15:24:13 2010
@@ -333,7 +333,7 @@
ATF_TC_BODY(sigfpe_int, tc)
{
struct sigaction sa;
- double d = strtod("0", NULL);
+ long l = strtol("0", NULL, 10);
sa.sa_flags = SA_SIGINFO;
sa.sa_sigaction = sigfpe_int_action;
@@ -342,7 +342,7 @@
#ifndef __vax__
fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP);
#endif
- printf("%g\n", 1 / d);
+ printf("%ld\n", 1 / l);
if (intdiv_signalled == 0)
atf_tc_fail("FPE signal handler was not invoked");
}