From: Bruno Haible Date: Wed, 16 Aug 2023 15:45:26 +0000 (+0200) Subject: tests: Avoid some test failures on Slackware 13.37. X-Git-Tag: v1.0~901 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=1402689ef59dece477fa9346e9a4a2af2ab64266;p=gnulib.git tests: Avoid some test failures on Slackware 13.37. * tests/test-c32isalnum.c (main): Disable GB18030 tests on glibc 2.13..2.15. * tests/test-c32isalpha.c (main): Likewise. * tests/test-c32isblank.c (main): Likewise. * tests/test-c32iscntrl.c (main): Likewise. * tests/test-c32isdigit.c (main): Likewise. * tests/test-c32isgraph.c (main): Likewise. * tests/test-c32islower.c (main): Likewise. * tests/test-c32isprint.c (main): Likewise. * tests/test-c32ispunct.c (main): Likewise. * tests/test-c32isspace.c (main): Likewise. * tests/test-c32isupper.c (main): Likewise. * tests/test-c32isxdigit.c (main): Likewise. * tests/test-c32rtomb.c (main): Likewise. * tests/test-c32snrtombs.c (main): Likewise. * tests/test-c32srtombs.c (main): Likewise. * tests/test-c32stombs.c (main): Likewise. * tests/test-c32tolower.c (main): Likewise. * tests/test-c32toupper.c (main): Likewise. * tests/test-fnmatch.c (main): Likewise. * tests/test-mbrtoc16.c (main): Likewise. * tests/test-mbrtoc32.c (main): Likewise. * tests/test-mbsnrtoc32s.c (main): Likewise. * tests/test-mbsrtoc32s.c (main): Likewise. * tests/test-mbstoc32s.c (main): Likewise. --- diff --git a/ChangeLog b/ChangeLog index fc8269e23d..873e683f0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +2023-08-16 Bruno Haible + + tests: Avoid some test failures on Slackware 13.37. + * tests/test-c32isalnum.c (main): Disable GB18030 tests on + glibc 2.13..2.15. + * tests/test-c32isalpha.c (main): Likewise. + * tests/test-c32isblank.c (main): Likewise. + * tests/test-c32iscntrl.c (main): Likewise. + * tests/test-c32isdigit.c (main): Likewise. + * tests/test-c32isgraph.c (main): Likewise. + * tests/test-c32islower.c (main): Likewise. + * tests/test-c32isprint.c (main): Likewise. + * tests/test-c32ispunct.c (main): Likewise. + * tests/test-c32isspace.c (main): Likewise. + * tests/test-c32isupper.c (main): Likewise. + * tests/test-c32isxdigit.c (main): Likewise. + * tests/test-c32rtomb.c (main): Likewise. + * tests/test-c32snrtombs.c (main): Likewise. + * tests/test-c32srtombs.c (main): Likewise. + * tests/test-c32stombs.c (main): Likewise. + * tests/test-c32tolower.c (main): Likewise. + * tests/test-c32toupper.c (main): Likewise. + * tests/test-fnmatch.c (main): Likewise. + * tests/test-mbrtoc16.c (main): Likewise. + * tests/test-mbrtoc32.c (main): Likewise. + * tests/test-mbsnrtoc32s.c (main): Likewise. + * tests/test-mbsrtoc32s.c (main): Likewise. + * tests/test-mbstoc32s.c (main): Likewise. + 2023-08-15 Bruno Haible readutmp tests: Add test against today's bug. diff --git a/tests/test-c32isalnum.c b/tests/test-c32isalnum.c index 9805c1331f..b1e3659cb8 100644 --- a/tests/test-c32isalnum.c +++ b/tests/test-c32isalnum.c @@ -212,7 +212,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32isalpha.c b/tests/test-c32isalpha.c index 31c98bb76f..1b3751db2c 100644 --- a/tests/test-c32isalpha.c +++ b/tests/test-c32isalpha.c @@ -210,7 +210,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32isblank.c b/tests/test-c32isblank.c index ac6f4251eb..6e91742611 100644 --- a/tests/test-c32isblank.c +++ b/tests/test-c32isblank.c @@ -169,7 +169,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32iscntrl.c b/tests/test-c32iscntrl.c index b47f936134..81b9344ee0 100644 --- a/tests/test-c32iscntrl.c +++ b/tests/test-c32iscntrl.c @@ -171,7 +171,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32isdigit.c b/tests/test-c32isdigit.c index a2a4ab1623..8c7ebcab70 100644 --- a/tests/test-c32isdigit.c +++ b/tests/test-c32isdigit.c @@ -183,7 +183,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32isgraph.c b/tests/test-c32isgraph.c index 6ee7a1c866..f41d3ec991 100644 --- a/tests/test-c32isgraph.c +++ b/tests/test-c32isgraph.c @@ -194,7 +194,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32islower.c b/tests/test-c32islower.c index 41e0e27cb6..6f1e2a946a 100644 --- a/tests/test-c32islower.c +++ b/tests/test-c32islower.c @@ -267,7 +267,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32isprint.c b/tests/test-c32isprint.c index 18ccf55677..fdabc2c637 100644 --- a/tests/test-c32isprint.c +++ b/tests/test-c32isprint.c @@ -197,7 +197,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32ispunct.c b/tests/test-c32ispunct.c index c655b6317a..792ff61a12 100644 --- a/tests/test-c32ispunct.c +++ b/tests/test-c32ispunct.c @@ -256,7 +256,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32isspace.c b/tests/test-c32isspace.c index da6335802c..0ca5dea317 100644 --- a/tests/test-c32isspace.c +++ b/tests/test-c32isspace.c @@ -165,7 +165,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32isupper.c b/tests/test-c32isupper.c index 31daad64c0..8cef611a41 100644 --- a/tests/test-c32isupper.c +++ b/tests/test-c32isupper.c @@ -259,7 +259,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32isxdigit.c b/tests/test-c32isxdigit.c index 0fec8a4a4b..43ef7f5556 100644 --- a/tests/test-c32isxdigit.c +++ b/tests/test-c32isxdigit.c @@ -200,7 +200,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32rtomb.c b/tests/test-c32rtomb.c index 4c39fd54a6..ffdc780199 100644 --- a/tests/test-c32rtomb.c +++ b/tests/test-c32rtomb.c @@ -156,7 +156,7 @@ main (int argc, char *argv[]) case '5': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32snrtombs.c b/tests/test-c32snrtombs.c index 9f2c88b307..0dee9c0a2e 100644 --- a/tests/test-c32snrtombs.c +++ b/tests/test-c32snrtombs.c @@ -160,7 +160,7 @@ main (int argc, char *argv[]) case '5': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32srtombs.c b/tests/test-c32srtombs.c index 465c30d4c2..e6c7a32d6e 100644 --- a/tests/test-c32srtombs.c +++ b/tests/test-c32srtombs.c @@ -160,7 +160,7 @@ main (int argc, char *argv[]) case '5': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32stombs.c b/tests/test-c32stombs.c index 5e5b957a49..69af9d28bb 100644 --- a/tests/test-c32stombs.c +++ b/tests/test-c32stombs.c @@ -139,7 +139,7 @@ main (int argc, char *argv[]) case '5': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32tolower.c b/tests/test-c32tolower.c index 1d35abb2bc..4141e58d85 100644 --- a/tests/test-c32tolower.c +++ b/tests/test-c32tolower.c @@ -336,7 +336,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-c32toupper.c b/tests/test-c32toupper.c index 4ec6431371..7047afc504 100644 --- a/tests/test-c32toupper.c +++ b/tests/test-c32toupper.c @@ -348,7 +348,7 @@ main (int argc, char *argv[]) case '4': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-fnmatch.c b/tests/test-fnmatch.c index b6ffc65539..488aacf0c0 100644 --- a/tests/test-fnmatch.c +++ b/tests/test-fnmatch.c @@ -853,6 +853,10 @@ main (int argc, char *argv[]) case '5': /* Locale encoding is GB18030. */ + #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) + fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); + return 77; + #endif ASSERT (fnmatch ("x?y", "x\250\271y", 0) == 0); /* "xüy" */ ASSERT (fnmatch ("x?y", "x\201\060\211\070y", 0) == 0); /* "xßy" */ diff --git a/tests/test-mbrtoc16.c b/tests/test-mbrtoc16.c index b76a9bed28..3e1d29eba7 100644 --- a/tests/test-mbrtoc16.c +++ b/tests/test-mbrtoc16.c @@ -361,7 +361,7 @@ main (int argc, char *argv[]) case '5': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-mbrtoc32.c b/tests/test-mbrtoc32.c index 93326085c2..f7a5b24e2a 100644 --- a/tests/test-mbrtoc32.c +++ b/tests/test-mbrtoc32.c @@ -360,7 +360,7 @@ main (int argc, char *argv[]) case '5': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-mbsnrtoc32s.c b/tests/test-mbsnrtoc32s.c index 09ebf2e76f..74ba643eb4 100644 --- a/tests/test-mbsnrtoc32s.c +++ b/tests/test-mbsnrtoc32s.c @@ -315,7 +315,7 @@ main (int argc, char *argv[]) case '5': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-mbsrtoc32s.c b/tests/test-mbsrtoc32s.c index 54ed63fa0c..0cbbbbd870 100644 --- a/tests/test-mbsrtoc32s.c +++ b/tests/test-mbsrtoc32s.c @@ -315,7 +315,7 @@ main (int argc, char *argv[]) case '5': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif diff --git a/tests/test-mbstoc32s.c b/tests/test-mbstoc32s.c index b0b4f5a719..7bcfe1b03c 100644 --- a/tests/test-mbstoc32s.c +++ b/tests/test-mbstoc32s.c @@ -263,7 +263,7 @@ main (int argc, char *argv[]) case '5': /* Locale encoding is GB18030. */ - #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun) + #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun || (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)) fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr); return 77; #endif