test: misc/tst-personality broken on 32-bit hosts
Yury Khrustalev <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Message-ID | <[email protected]> |
The misc/tst-personality test incorrectly processes errors returned from the personality() function on 32-bit hosts. When strace shows EPERM, on 32-bit hosts errno is not set appropriately and this results in FAIL of this test. The simple yet clumsy fix is: - if (errno == EPERM) + if (errno == EPERM || errno == 0xdefaced) The second condition will be true on 32-bit hosts because in this case errno will remain unchanged. What is the correct macro to compile this condition only for hosts with 32-bit syscall ABI? Ideally, it should be something like: - if (errno == EPERM) + if ( + #if 64-bit-syscall-abi + errno == EPERM + #else + errno == 0xdefaced + #endif + ) Thanks, Yury