Dirk Mueller
e34f56de3c
- Add folding rules for Clz32 and Clz64 (kde#243404) - Refresh s390x port (kde#243404) OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=26
36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
------------------------------------------------------------------------
|
|
r11644 | sewardj | 2011-03-15 09:13:08 +0100 (Di, 15. Mär 2011) | 3 Zeilen
|
|
|
|
Some fixes for the faultstatus testcase. Fixes #253206.
|
|
(Christian Borntraeger, borntraeger@de.ibm.com)
|
|
|
|
------------------------------------------------------------------------
|
|
Index: none/tests/faultstatus.c
|
|
===================================================================
|
|
--- none/tests/faultstatus.c (Revision 11643)
|
|
+++ none/tests/faultstatus.c (Revision 11644)
|
|
@@ -70,7 +70,13 @@ static int testcode(int code, int want)
|
|
|
|
static int testaddr(void *addr, volatile void *want)
|
|
{
|
|
+ /* Some architectures (e.g. s390) just provide enough information to
|
|
+ resolve the page fault, but do not provide the offset within a page */
|
|
+#if defined(__s390__)
|
|
+ if (addr != (void *) ((unsigned long) want & ~0xffful)) {
|
|
+#else
|
|
if (addr != want) {
|
|
+#endif
|
|
fprintf(stderr, " FAIL: expected si_addr==%p, not %p\n", want, addr);
|
|
return 0;
|
|
}
|
|
@@ -132,7 +138,8 @@ int main()
|
|
for(i = 0; i < sizeof(sigs)/sizeof(*sigs); i++)
|
|
sigaction(sigs[i], &sa, NULL);
|
|
|
|
- fd = open("faultstatus.tmp", O_CREAT|O_TRUNC|O_EXCL, 0600);
|
|
+ /* we need O_RDWR for the truncate below */
|
|
+ fd = open("faultstatus.tmp", O_CREAT|O_TRUNC|O_EXCL|O_RDWR, 0600);
|
|
if (fd == -1) {
|
|
perror("tmpfile");
|
|
exit(1);
|