From c3dccf5514eac7bc31ee833a09bd079470dcd6b4 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 8 Jun 2021 01:17:02 +0200 Subject: [PATCH] Avoid some test failures on DragonFly BSD 6.0. * tests/test-c32isalnum.c (main): On Dragonfly BSD, disable tests that fail. * tests/test-c32isalpha.c (main): Likewise. * tests/test-c32islower.c (main): Likewise. * tests/test-c32isupper.c (main): Likewise. * tests/test-ptsname.c (main): Treat Dragonfly BSD like Solaris. --- ChangeLog | 10 ++++++++++ tests/test-c32isalnum.c | 6 ++++-- tests/test-c32isalpha.c | 6 ++++-- tests/test-c32islower.c | 12 +++++++++--- tests/test-c32isupper.c | 8 ++++++-- tests/test-ptsname.c | 5 +++-- 6 files changed, 36 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 744f4b8aef..f1eaf5bd39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2021-06-07 Bruno Haible + + Avoid some test failures on DragonFly BSD 6.0. + * tests/test-c32isalnum.c (main): On Dragonfly BSD, disable tests that + fail. + * tests/test-c32isalpha.c (main): Likewise. + * tests/test-c32islower.c (main): Likewise. + * tests/test-c32isupper.c (main): Likewise. + * tests/test-ptsname.c (main): Treat Dragonfly BSD like Solaris. + 2021-06-07 Kamil Dudka mountlist: recognize fuse.portal as dummy file system diff --git a/tests/test-c32isalnum.c b/tests/test-c32isalnum.c index 8f61ad99c6..546cb8a6ec 100644 --- a/tests/test-c32isalnum.c +++ b/tests/test-c32isalnum.c @@ -149,7 +149,7 @@ main (int argc, char *argv[]) /* U+00D7 MULTIPLICATION SIGN */ is = for_character ("\241\337", 2); ASSERT (is == 0); - #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) + #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__) /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */ is = for_character ("\217\251\254", 3); ASSERT (is != 0); @@ -165,7 +165,7 @@ main (int argc, char *argv[]) is = for_character ("\243\261", 2); ASSERT (is != 0); #endif - #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__) + #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__) /* U+FF4D FULLWIDTH LATIN SMALL LETTER M */ is = for_character ("\243\355", 2); ASSERT (is != 0); @@ -232,9 +232,11 @@ main (int argc, char *argv[]) is = for_character ("\243\261", 2); ASSERT (is != 0); #endif + #if !defined __DragonFly__ /* U+FF4D FULLWIDTH LATIN SMALL LETTER M */ is = for_character ("\243\355", 2); ASSERT (is != 0); + #endif #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined __sun) /* U+10330 GOTHIC LETTER AHSA */ is = for_character ("\220\060\322\066", 4); diff --git a/tests/test-c32isalpha.c b/tests/test-c32isalpha.c index 9b07186921..cf6d2bc63f 100644 --- a/tests/test-c32isalpha.c +++ b/tests/test-c32isalpha.c @@ -147,7 +147,7 @@ main (int argc, char *argv[]) /* U+00D7 MULTIPLICATION SIGN */ is = for_character ("\241\337", 2); ASSERT (is == 0); - #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) + #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__) /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */ is = for_character ("\217\251\254", 3); ASSERT (is != 0); @@ -163,7 +163,7 @@ main (int argc, char *argv[]) is = for_character ("\243\261", 2); ASSERT (is == 0); #endif - #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__) + #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__) /* U+FF4D FULLWIDTH LATIN SMALL LETTER M */ is = for_character ("\243\355", 2); ASSERT (is != 0); @@ -230,9 +230,11 @@ main (int argc, char *argv[]) is = for_character ("\243\261", 2); ASSERT (is == 0); #endif + #if !defined __DragonFly__ /* U+FF4D FULLWIDTH LATIN SMALL LETTER M */ is = for_character ("\243\355", 2); ASSERT (is != 0); + #endif #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined __sun) /* U+10330 GOTHIC LETTER AHSA */ is = for_character ("\220\060\322\066", 4); diff --git a/tests/test-c32islower.c b/tests/test-c32islower.c index 0b811fdc24..33dfb89961 100644 --- a/tests/test-c32islower.c +++ b/tests/test-c32islower.c @@ -156,12 +156,12 @@ main (int argc, char *argv[]) /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */ is = for_character ("\217\252\261", 3); ASSERT (is == 0); - #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined __CYGWIN__) + #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined __CYGWIN__) /* U+00DF LATIN SMALL LETTER SHARP S */ is = for_character ("\217\251\316", 3); ASSERT (is != 0); #endif - #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__) + #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__) /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */ is = for_character ("\217\253\261", 3); ASSERT (is != 0); @@ -172,7 +172,7 @@ main (int argc, char *argv[]) /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */ is = for_character ("\217\251\250", 3); ASSERT (is == 0); - #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__) + #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__) /* U+0142 LATIN SMALL LETTER L WITH STROKE */ is = for_character ("\217\251\310", 3); ASSERT (is != 0); @@ -188,9 +188,11 @@ main (int argc, char *argv[]) /* U+3073 HIRAGANA LETTER BI */ is = for_character ("\244\323", 2); ASSERT (is == 0); + #if !defined __DragonFly__ /* U+FF47 FULLWIDTH LATIN SMALL LETTER G */ is = for_character ("\243\347", 2); ASSERT (is != 0); + #endif } return 0; @@ -282,9 +284,11 @@ main (int argc, char *argv[]) is = for_character ("\201\060\211\070", 4); ASSERT (is != 0); #endif + #if !defined __DragonFly__ /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */ is = for_character ("\250\246", 2); ASSERT (is != 0); + #endif #if !(defined __FreeBSD__ || defined __DragonFly__ || defined __sun) /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */ is = for_character ("\201\060\213\067", 4); @@ -315,9 +319,11 @@ main (int argc, char *argv[]) /* U+3162 HANGUL LETTER YI */ is = for_character ("\201\071\256\062", 4); ASSERT (is == 0); + #if !defined __DragonFly__ /* U+FF47 FULLWIDTH LATIN SMALL LETTER G */ is = for_character ("\243\347", 2); ASSERT (is != 0); + #endif /* U+FFDB HALFWIDTH HANGUL LETTER YI */ is = for_character ("\204\061\241\071", 4); ASSERT (is == 0); diff --git a/tests/test-c32isupper.c b/tests/test-c32isupper.c index 5604a8f9b6..c36f17f62f 100644 --- a/tests/test-c32isupper.c +++ b/tests/test-c32isupper.c @@ -151,7 +151,7 @@ main (int argc, char *argv[]) case '2': /* Locale encoding is EUC-JP. */ { - #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__) + #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__) /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */ is = for_character ("\217\252\261", 3); ASSERT (is != 0); @@ -165,7 +165,7 @@ main (int argc, char *argv[]) /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */ is = for_character ("\217\253\363", 3); ASSERT (is == 0); - #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__) + #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__) /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */ is = for_character ("\217\251\250", 3); ASSERT (is != 0); @@ -184,9 +184,11 @@ main (int argc, char *argv[]) /* U+3073 HIRAGANA LETTER BI */ is = for_character ("\244\323", 2); ASSERT (is == 0); + #if !defined __DragonFly__ /* U+FF27 FULLWIDTH LATIN CAPITAL LETTER G */ is = for_character ("\243\307", 2); ASSERT (is != 0); + #endif } return 0; @@ -303,9 +305,11 @@ main (int argc, char *argv[]) /* U+3162 HANGUL LETTER YI */ is = for_character ("\201\071\256\062", 4); ASSERT (is == 0); + #if !defined __DragonFly__ /* U+FF27 FULLWIDTH LATIN CAPITAL LETTER G */ is = for_character ("\243\307", 2); ASSERT (is != 0); + #endif /* U+FFDB HALFWIDTH HANGUL LETTER YI */ is = for_character ("\204\061\241\071", 4); ASSERT (is == 0); diff --git a/tests/test-ptsname.c b/tests/test-ptsname.c index 5dde071d54..8f12fa8602 100644 --- a/tests/test-ptsname.c +++ b/tests/test-ptsname.c @@ -102,9 +102,10 @@ main (void) close (fd); } -#if defined __sun +#if defined __sun || defined __DragonFly__ /* Solaris has BSD-style /dev/pty[p-r][0-9a-f] files, but the function - ptsname() does not work on them. */ + ptsname() does not work on them. + DragonFly BSD has only /dev/ptmx. */ { int fd; char *result; -- 2.39.5