tests: skip readahead.test on MIPS n64 when built with glibc < 2.25

Due to a bug in glibc readahead syscall wrapper on MIPS n64,
this wrapper cannot be used in readahead.test.

* tests/readahead.c [HAVE_READAHEAD && LINUX_MIPSN64 && glibc < 2.25]:
Undefine HAVE_READAHEAD.

Reported-by: James Cowgill <james410@cowgill.org.uk>
This commit is contained in:
Дмитрий Левин 2017-01-05 18:20:57 +00:00
parent 92ac6131a1
commit e752ef61c3

View File

@ -29,15 +29,24 @@
#include <asm/unistd.h>
#ifdef HAVE_READAHEAD
/* Check for glibc readahead argument passing bugs. */
# ifdef __GLIBC__
/*
* Check for glibc readahead off64_t argument passing bug,
* glibc < 2.8 had an incorrect order of higher and lower parts of offset,
* see https://sourceware.org/bugzilla/show_bug.cgi?id=5208
*/
# if !(defined __GLIBC_MINOR__ && \
(__GLIBC__ << 16) + __GLIBC_MINOR__ >= (2 << 16) + 8)
# undef HAVE_READAHEAD
# endif
# endif /* glibc < 2.8 */
/*
* glibc < 2.25 had an incorrect implementation on mips n64,
* see https://sourceware.org/bugzilla/show_bug.cgi?id=21026
*/
# if defined LINUX_MIPSN64 && !(defined __GLIBC_MINOR__ && \
(__GLIBC__ << 16) + __GLIBC_MINOR__ >= (2 << 16) + 25)
# undef HAVE_READAHEAD
# endif /* LINUX_MIPSN64 && glibc < 2.25 */
# endif /* __GLIBC__ */
#endif /* HAVE_READAHEAD */