From 57348fea89df95f8c497ce19b2415c4c86c7ed13 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 16 Aug 2023 17:45:26 +0200 Subject: [PATCH] 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-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. --- ChangeLog | 28 ++++++++++++++++++++++++++++ tests/test-c32isalnum.c | 2 +- tests/test-c32isalpha.c | 2 +- tests/test-c32isblank.c | 2 +- tests/test-c32iscntrl.c | 2 +- tests/test-c32isdigit.c | 2 +- tests/test-c32isgraph.c | 2 +- tests/test-c32islower.c | 2 +- tests/test-c32isprint.c | 2 +- tests/test-c32ispunct.c | 2 +- tests/test-c32isspace.c | 2 +- tests/test-c32isupper.c | 2 +- tests/test-c32isxdigit.c | 2 +- tests/test-c32rtomb.c | 2 +- tests/test-c32snrtombs.c | 2 +- tests/test-c32srtombs.c | 2 +- tests/test-c32stombs.c | 2 +- tests/test-c32tolower.c | 2 +- tests/test-c32toupper.c | 2 +- tests/test-mbrtoc16.c | 2 +- tests/test-mbrtoc32.c | 2 +- tests/test-mbsnrtoc32s.c | 2 +- tests/test-mbsrtoc32s.c | 2 +- tests/test-mbstoc32s.c | 2 +- 24 files changed, 51 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 082cbfa914..26d25b4ef9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,31 @@ +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-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-13 Bruno Haible stdint: Fix configure test result with gcc 4.7 or 4.8. 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 b7617ee105..0d346a1ccd 100644 --- a/tests/test-c32isprint.c +++ b/tests/test-c32isprint.c @@ -199,7 +199,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 8969873181..7c444cca8f 100644 --- a/tests/test-c32rtomb.c +++ b/tests/test-c32rtomb.c @@ -152,7 +152,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-c32snrtombs.c b/tests/test-c32snrtombs.c index ef09679524..5439acbaeb 100644 --- a/tests/test-c32snrtombs.c +++ b/tests/test-c32snrtombs.c @@ -160,7 +160,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-c32srtombs.c b/tests/test-c32srtombs.c index 3d5c67a77f..6a6a73271f 100644 --- a/tests/test-c32srtombs.c +++ b/tests/test-c32srtombs.c @@ -160,7 +160,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-c32stombs.c b/tests/test-c32stombs.c index 53339d1fef..76c32dff23 100644 --- a/tests/test-c32stombs.c +++ b/tests/test-c32stombs.c @@ -139,7 +139,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-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-mbrtoc16.c b/tests/test-mbrtoc16.c index 03732dddb4..3ba2649c55 100644 --- a/tests/test-mbrtoc16.c +++ b/tests/test-mbrtoc16.c @@ -325,7 +325,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-mbrtoc32.c b/tests/test-mbrtoc32.c index f5a51ef34e..e2c82eb265 100644 --- a/tests/test-mbrtoc32.c +++ b/tests/test-mbrtoc32.c @@ -324,7 +324,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-mbsnrtoc32s.c b/tests/test-mbsnrtoc32s.c index 342626d2a2..bc5cae0507 100644 --- a/tests/test-mbsnrtoc32s.c +++ b/tests/test-mbsnrtoc32s.c @@ -247,7 +247,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-mbsrtoc32s.c b/tests/test-mbsrtoc32s.c index b1576d8da5..f026a7a0d0 100644 --- a/tests/test-mbsrtoc32s.c +++ b/tests/test-mbsrtoc32s.c @@ -247,7 +247,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-mbstoc32s.c b/tests/test-mbstoc32s.c index 09a1e072cf..932f3c6f25 100644 --- a/tests/test-mbstoc32s.c +++ b/tests/test-mbstoc32s.c @@ -206,7 +206,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 -- 2.39.5