Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/gen Do not compare si_addr (address of faulti...
details: https://anonhg.NetBSD.org/src/rev/4bc91cbb49e5
branches: trunk
changeset: 778948:4bc91cbb49e5
user: martin <martin%NetBSD.org@localhost>
date: Sun Apr 22 08:52:26 2012 +0000
description:
Do not compare si_addr (address of faulting instruction) against the
unaligned data address causing the fault - this will always fail.
If anybody knows a portable way to get the data address involved in the
fault, please fix the test case as originally intended.
diffstat:
tests/lib/libc/gen/t_siginfo.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r 82f3af3be11d -r 4bc91cbb49e5 tests/lib/libc/gen/t_siginfo.c
--- a/tests/lib/libc/gen/t_siginfo.c Sun Apr 22 07:23:42 2012 +0000
+++ b/tests/lib/libc/gen/t_siginfo.c Sun Apr 22 08:52:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_siginfo.c,v 1.15 2012/04/20 00:40:31 jym Exp $ */
+/* $NetBSD: t_siginfo.c,v 1.16 2012/04/22 08:52:26 martin Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -418,13 +418,26 @@
ATF_REQUIRE_EQ(info->si_errno, 0);
ATF_REQUIRE_EQ(info->si_code, BUS_ADRALN);
+#if 0
if (strcmp(atf_config_get("atf_arch"), "i386") == 0 ||
strcmp(atf_config_get("atf_arch"), "x86_64") == 0) {
atf_tc_expect_fail("x86 architecture does not correctly "
"report the address where the unaligned access occured");
}
+ /*
+ * XXX: This is bogus: si_addr is documented as the text address
+ * where the fault occurs, addr is the faulting data address,
+ * see TOG about siginfo_t:
+ *
+ * void * si_addr Address of faulting instruction.
+ *
+ * Is there a portable way to get the accessed data address from
+ * the handler?
+ */
ATF_REQUIRE_EQ(info->si_addr, (void *)addr);
+#endif
+
atf_tc_pass();
/* NOTREACHED */
}
Home |
Main Index |
Thread Index |
Old Index