NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/49653: tests/lib/libc/gen/t_siginfo:sigbus_adraln failed on m68k



At Tue, 10 Feb 2015 09:55:00 +0000 (UTC),
Martin Husemann wrote:
>  Please do not do it as a #ifdef compile time check, but use a proper sysctl
>  variable to check at runtime.
>  
>  Other archtiectures use for example:
>  
>  	machdep.unaligned_sigbus = 1
>  
>  (e.g. on macppc and arm, where it depends on the concrete cpu model you are
>  running on)

I see, I agree that mine is not good way if there are two types cpu
in an arch.

Then I re-read the kernel source code (to try to implement the sysctl)
and if my understanding is correct, sun2's arch seems "m68000" not
"m68k". Furthermore all m68k (except sun2) seems not support 68010.
This means that the SIGBUS never happens on all m68k.

If so, how about this?

Index: tests/lib/libc/gen/t_siginfo.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/gen/t_siginfo.c,v
retrieving revision 1.27
diff -u -r1.27 t_siginfo.c
--- tests/lib/libc/gen/t_siginfo.c	29 Dec 2014 18:36:27 -0000	1.27
+++ tests/lib/libc/gen/t_siginfo.c	11 Feb 2015 14:17:18 -0000
@@ -464,6 +464,9 @@
 	if (val == 0)
 		atf_tc_skip("No SIGBUS signal for unaligned accesses");
 #endif
+#if defined(__m68k__)
+	atf_tc_skip("No SIGBUS signal for unaligned accesses");
+#endif
 
 	sa.sa_flags = SA_SIGINFO;
 	sa.sa_sigaction = sigbus_action;

---
Tetsuya Isaki <isaki%pastel-flower.jp@localhost / isaki%NetBSD.org@localhost>


Home | Main Index | Thread Index | Old Index