]> Savannah Git Hosting - gnulib.git/commitdiff
tests: Before declaring a SKIP, test if there were ASSERT failures.
authorBruno Haible <bruno@clisp.org>
Sat, 25 May 2024 09:44:21 +0000 (11:44 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 25 May 2024 10:02:55 +0000 (12:02 +0200)
* HACKING: Document idiom to use with test_exit_status.
* tests/test-c32isalnum.c (main): If there were ASSERT failures, report
them instead of declaring SKIP.
* 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-c32rtomb-w32.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-canonicalize.c (main): Likewise.
* tests/test-canonicalize-lgpl.c (main): Likewise.
* tests/test-duplocale.c (main): Likewise.
* tests/test-fbufmode.c (main): Likewise.
* tests/test-fenv-except-state-3.c (main): Likewise.
* tests/test-fenv-except-trapping-1.c (main): Likewise.
* tests/test-fenv-except-trapping-2.c (main): Likewise.
* tests/test-fnmatch.c (main): Likewise.
* tests/test-fnmatch-w32.c (main): Likewise.
* tests/test-fpurge.c (main): Likewise.
* tests/test-freadable.c (main): Likewise.
* tests/test-fseek.c (main): Likewise.
* tests/test-fseeko.c (main): Likewise.
* tests/test-ftell.c (main): Likewise.
* tests/test-ftell3.c (main): Likewise.
* tests/test-ftello.c (main): Likewise.
* tests/test-ftello3.c (main): Likewise.
* tests/test-fwritable.c (main): Likewise.
* tests/test-fwriting.c (main): Likewise.
* tests/test-getrandom.c (main): Likewise.
* tests/test-mbrlen-w32.c (main): Likewise.
* tests/test-mbrtoc16.c (main): Likewise.
* tests/test-mbrtoc16-w32.c (main): Likewise.
* tests/test-mbrtoc32.c (main): Likewise.
* tests/test-mbrtoc32-w32.c (main): Likewise.
* tests/test-mbrtowc-w32.c (main): Likewise.
* tests/test-mbsnrtoc32s.c (main): Likewise.
* tests/test-mbsrtoc32s.c (main): Likewise.
* tests/test-mbstoc32s.c (main): Likewise.
* tests/test-nl_langinfo2.c (main): Likewise.
* tests/test-nstrftime.c (main): Likewise.
* tests/test-passfd.c (main): Likewise.
* tests/test-posix_spawn-script.c (main): Likewise.
* tests/test-posix_spawnp-script.c (main): Likewise.
* tests/test-ptsname.c (main): Likewise.
* tests/test-ptsname_r.c (main): Likewise.
* tests/test-remove.c (main): Likewise.
* tests/test-strfmon_l.c (main): Likewise.
* tests/test-utime.c (main): Likewise.
* tests/test-wcrtomb-w32.c (main): Likewise.
* tests/test-execute-script.c (main): Obey CONTINUE_AFTER_ASSERT better.
* tests/test-spawn-pipe-script.c (main): Likewise.
* tests/test-linkat.c (main): Use the common idiom.

64 files changed:
ChangeLog
HACKING
tests/test-c32isalnum.c
tests/test-c32isalpha.c
tests/test-c32isblank.c
tests/test-c32iscntrl.c
tests/test-c32isdigit.c
tests/test-c32isgraph.c
tests/test-c32islower.c
tests/test-c32isprint.c
tests/test-c32ispunct.c
tests/test-c32isspace.c
tests/test-c32isupper.c
tests/test-c32isxdigit.c
tests/test-c32rtomb-w32.c
tests/test-c32rtomb.c
tests/test-c32snrtombs.c
tests/test-c32srtombs.c
tests/test-c32stombs.c
tests/test-c32tolower.c
tests/test-c32toupper.c
tests/test-canonicalize-lgpl.c
tests/test-canonicalize.c
tests/test-duplocale.c
tests/test-execute-script.c
tests/test-fbufmode.c
tests/test-fenv-except-state-3.c
tests/test-fenv-except-trapping-1.c
tests/test-fenv-except-trapping-2.c
tests/test-fnmatch-w32.c
tests/test-fnmatch.c
tests/test-fpurge.c
tests/test-freadable.c
tests/test-fseek.c
tests/test-fseeko.c
tests/test-ftell.c
tests/test-ftell3.c
tests/test-ftello.c
tests/test-ftello3.c
tests/test-fwritable.c
tests/test-fwriting.c
tests/test-getrandom.c
tests/test-linkat.c
tests/test-mbrlen-w32.c
tests/test-mbrtoc16-w32.c
tests/test-mbrtoc16.c
tests/test-mbrtoc32-w32.c
tests/test-mbrtoc32.c
tests/test-mbrtowc-w32.c
tests/test-mbsnrtoc32s.c
tests/test-mbsrtoc32s.c
tests/test-mbstoc32s.c
tests/test-nl_langinfo2.c
tests/test-nstrftime.c
tests/test-passfd.c
tests/test-posix_spawn-script.c
tests/test-posix_spawnp-script.c
tests/test-ptsname.c
tests/test-ptsname_r.c
tests/test-remove.c
tests/test-spawn-pipe-script.c
tests/test-strfmon_l.c
tests/test-utime.c
tests/test-wcrtomb-w32.c

index 52d51ba5a77728446be375ac1d6c9e51a03151f6..ba2fe6dbb1ebc65d80c92fb750e8205e7d864858 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,71 @@
+2024-05-25  Bruno Haible  <bruno@clisp.org>
+
+       tests: Before declaring a SKIP, test if there were ASSERT failures.
+       * HACKING: Document idiom to use with test_exit_status.
+       * tests/test-c32isalnum.c (main): If there were ASSERT failures, report
+       them instead of declaring SKIP.
+       * 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-c32rtomb-w32.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-canonicalize.c (main): Likewise.
+       * tests/test-canonicalize-lgpl.c (main): Likewise.
+       * tests/test-duplocale.c (main): Likewise.
+       * tests/test-fbufmode.c (main): Likewise.
+       * tests/test-fenv-except-state-3.c (main): Likewise.
+       * tests/test-fenv-except-trapping-1.c (main): Likewise.
+       * tests/test-fenv-except-trapping-2.c (main): Likewise.
+       * tests/test-fnmatch.c (main): Likewise.
+       * tests/test-fnmatch-w32.c (main): Likewise.
+       * tests/test-fpurge.c (main): Likewise.
+       * tests/test-freadable.c (main): Likewise.
+       * tests/test-fseek.c (main): Likewise.
+       * tests/test-fseeko.c (main): Likewise.
+       * tests/test-ftell.c (main): Likewise.
+       * tests/test-ftell3.c (main): Likewise.
+       * tests/test-ftello.c (main): Likewise.
+       * tests/test-ftello3.c (main): Likewise.
+       * tests/test-fwritable.c (main): Likewise.
+       * tests/test-fwriting.c (main): Likewise.
+       * tests/test-getrandom.c (main): Likewise.
+       * tests/test-mbrlen-w32.c (main): Likewise.
+       * tests/test-mbrtoc16.c (main): Likewise.
+       * tests/test-mbrtoc16-w32.c (main): Likewise.
+       * tests/test-mbrtoc32.c (main): Likewise.
+       * tests/test-mbrtoc32-w32.c (main): Likewise.
+       * tests/test-mbrtowc-w32.c (main): Likewise.
+       * tests/test-mbsnrtoc32s.c (main): Likewise.
+       * tests/test-mbsrtoc32s.c (main): Likewise.
+       * tests/test-mbstoc32s.c (main): Likewise.
+       * tests/test-nl_langinfo2.c (main): Likewise.
+       * tests/test-nstrftime.c (main): Likewise.
+       * tests/test-passfd.c (main): Likewise.
+       * tests/test-posix_spawn-script.c (main): Likewise.
+       * tests/test-posix_spawnp-script.c (main): Likewise.
+       * tests/test-ptsname.c (main): Likewise.
+       * tests/test-ptsname_r.c (main): Likewise.
+       * tests/test-remove.c (main): Likewise.
+       * tests/test-strfmon_l.c (main): Likewise.
+       * tests/test-utime.c (main): Likewise.
+       * tests/test-wcrtomb-w32.c (main): Likewise.
+       * tests/test-execute-script.c (main): Obey CONTINUE_AFTER_ASSERT better.
+       * tests/test-spawn-pipe-script.c (main): Likewise.
+       * tests/test-linkat.c (main): Use the common idiom.
+
 2024-05-25  Collin Funk  <collin.funk1@gmail.com>
 
        byteswap tests: Verify header can be used from C++.
diff --git a/HACKING b/HACKING
index 964b880d204b51578cbf0dd4af45a64796cbdfeb..34c3adf033eb9f9349078f1a515189efa0a8dcaf 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -76,6 +76,41 @@ Test Suite
 When adding a module, add a unit test module as well.  This is our best
 chance to catch portability problems.
 
+A unit test can have many sub-tests. Try to make the sub-tests independent
+of each other, so that it becomes easy to disable some sub-tests by enclosing
+them in #if 0 ... #endif.
+
+The main() function's exit code meaning is:
+  - 0: PASS
+  - 77: SKIP; you should print the reason why the test is skipped.
+  - 99: ERROR, i.e. test framework error
+  - any other exit code < 126: FAIL
+
+In tests that #include "macros.h" and use the ASSERT macro:
+The main() function should, before it returns 0 (for PASS) or 77 (for SKIP)
+test the value of test_exit_status and return that instead. So:
+  - not
+        return 0;
+    but instead
+        return test_exit_status;
+  - not
+        return result; // where result can be 0 or 1
+    but instead
+        return (result ? result : test_exit_status);
+  - not
+        fputs ("Skipping test: <reason>\n", stderr);
+        return 77;
+    but instead
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
+        fputs ("Skipping test: <reason>\n", stderr);
+        return 77;
+    Only at the beginning of the main() function, when ASSERT has not yet been
+    invoked, we know that test_exit_status must be zero and can therefore write
+        fputs ("Skipping test: <reason>\n", stderr);
+        return 77;
+    directly.
+
 
 Maintaining high quality
 ========================
index b35c2a1f20e2667abe8c8e5d588fdf0297d0b2f3..d5f8dcf5d209ae0c54870e40e680427872ae6fc2 100644 (file)
@@ -213,6 +213,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 3e177d8c8d881a295f74bdfd465de6549f159df6..1e5431eae0f0c101477f8bfb23d01734a2c9e3c5 100644 (file)
@@ -211,6 +211,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index be4fde3350d9acd2effc75d5978e2cc847d1a1a2..3aa6a28b7c1c3185c96b120bd2e87651af30bd4c 100644 (file)
@@ -170,6 +170,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index a00209a5ac4975e962152e3c1727ae6b5d0104ab..6933cb106843505624f5959ec118776858e86d2a 100644 (file)
@@ -172,6 +172,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 3d950ee18198ae7ef181428596e85dff26984b9a..44cca8f02440c1a0a1df9f1c6702da63d6885911 100644 (file)
@@ -184,6 +184,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 1ea9f782b56f2a2f389b52c3c4fbb87c6c3f6d6f..0198fc7a32c6a1f964a4eceea86edf4fe1365b1d 100644 (file)
@@ -195,6 +195,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 2fae4006e67543b175d48965351db468c3f50dce..4075e2dd11486710b67297e7caab33dc1307c873 100644 (file)
@@ -268,6 +268,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index cab10ddbe99e62363b2026cb30c0f3ad94ea5807..0d66989668c8e03489489f9952f0ef66023c5a20 100644 (file)
@@ -198,6 +198,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 8d96f03b9c53d4566bca9b36f26a7735eaf03ad9..ee21852601e59df9f78a21122978865cd6b85d69 100644 (file)
@@ -266,6 +266,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index c5ce347891694be4ad3b8fad7a2bbe8af613e887..9409bb695c08b5cfd1144f2182748e350a7c54da 100644 (file)
@@ -166,6 +166,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index a824747f668a95df7c0a3219e916c9e25e5bff3d..4856f3eb662a5a281d29c4ad34c702d383b9d271 100644 (file)
@@ -260,6 +260,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 68d1ce769779295611ea1a6dfd9a58d6a0a07c8e..c9c5da571149c38157ded5a184a6f1ea1f565fd3 100644 (file)
@@ -201,6 +201,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index ad08859d04c8fa3a1441bafdc8a1eed092e279c4..f474776c90d9ac9d869f3f528c62c014ae6ba327 100644 (file)
@@ -330,8 +330,12 @@ main (int argc, char *argv[])
     }
 
   if (result == 77)
-    fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
-             codepage);
+    {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
+      fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+               codepage);
+    }
   return (result ? result : test_exit_status);
 }
 
index b54de70aa6c73f9fd26042da8a47f97e7c6b484d..c02657c630f97979672de1bc6f586761486a5b27 100644 (file)
@@ -157,6 +157,8 @@ main (int argc, char *argv[])
       case '5':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 26b2dd8ef6c2c3a777a39bf4f2e045dcbaf2124f..7bb2709c3a8c4e7cbd9f29ec8cd0362a941c3290 100644 (file)
@@ -161,6 +161,8 @@ main (int argc, char *argv[])
         case '5':
           /* Locale encoding is GB18030.  */
           #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+          if (test_exit_status != EXIT_SUCCESS)
+            return test_exit_status;
           fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
           return 77;
           #endif
index 7153f4f1c03149dfd825fa03f7b2e10f7af286d8..3a36aaeee82662a3074c1938d7a84b50a5358569 100644 (file)
@@ -161,6 +161,8 @@ main (int argc, char *argv[])
         case '5':
           /* Locale encoding is GB18030.  */
           #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+          if (test_exit_status != EXIT_SUCCESS)
+            return test_exit_status;
           fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
           return 77;
           #endif
index 0b7f78812ea3415cf0580bf04be56770fc7ff189..62f77342e4366267a1c26c95a2c588512f471a6e 100644 (file)
@@ -140,6 +140,8 @@ main (int argc, char *argv[])
         case '5':
           /* Locale encoding is GB18030.  */
           #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+          if (test_exit_status != EXIT_SUCCESS)
+            return test_exit_status;
           fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
           return 77;
           #endif
index fd017edb86dc628fd89531252583edff90b59a6d..eb956b50092f1dc5617c453e2fcafcce6255f3f9 100644 (file)
@@ -337,6 +337,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 740ccdca18de2ea9bfac531b1ac9e02d34d830e8..d0c2ba634aeea88e799350b5815a67f1d9ecce45 100644 (file)
@@ -349,6 +349,8 @@ main (int argc, char *argv[])
       case '4':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index e388154d551279fa70cfc9d0d06722bc8c399491..769f7c39685a6b21cecb4a3b69d02c15f89269aa 100644 (file)
@@ -157,6 +157,8 @@ main (void)
     {
       ASSERT (remove (BASE "/tra") == 0);
       ASSERT (rmdir (BASE) == 0);
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
       fputs ("skipping test: symlinks not supported on this file system\n",
              stderr);
       return 77;
index cdd428259d0b12bfc78b8b167daa8df8c52f5d60..0224c2bbcf45e7c7340e6e1280eee82e18e697a6 100644 (file)
@@ -181,6 +181,8 @@ main (void)
     {
       ASSERT (remove (BASE "/tra") == 0);
       ASSERT (rmdir (BASE) == 0);
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
       fputs ("skipping test: symlinks not supported on this file system\n",
              stderr);
       return 77;
index 803772b66232b02c49eb1f13b4bc9fce9ed54718..a27f1378f0b8ba4bbc7708a8227786637103fca5 100644 (file)
@@ -226,6 +226,8 @@ main ()
 
   if (skipped)
     {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
       fprintf (stderr, "Skipping test: Spanish Unicode locale is not installed\n");
       return 77;
     }
index b9d381d573a47ec2f3f467ff6b32e66ed0f9bfc4..dfb9d8c259656a74493edec51ca4f820128ec26f 100644 (file)
@@ -63,14 +63,13 @@ main ()
       }
   }
 
-  if (test_exit_status)
-    return test_exit_status;
-
 #if defined _WIN32 && !defined __CYGWIN__
   /* On native Windows, scripts - even with '#!' marker - are not executable.
      Only .bat and .cmd files are.  */
   ASSERT (fclose (fp) == 0);
   ASSERT (unlink (DATA_FILENAME) == 0);
+  if (test_exit_status)
+    return test_exit_status;
   fprintf (stderr, "Skipping test: scripts are not executable on this platform.\n");
   return 77;
 #else
index 20ca02a15cb5140a0252438ede7aaa816d95053f..a726ab53dbbaff6120e3c991634a9b033ef1a288 100644 (file)
@@ -102,6 +102,8 @@ main ()
   return ret;
 
  skip:
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
   fprintf (stderr, "Skipping test: file operations failed.\n");
   return 77;
 }
index 7298be40077435cf617b49d435aefc75e2d1e371..ad4d81d52b266d48d2b20397b87a02e216bd395a 100644 (file)
@@ -60,6 +60,8 @@ main ()
      terminates the program.  */
   if (sigfpe_on_invalid () < 0)
     {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
       fputs ("Skipping test: trapping floating-point exceptions are not supported on this machine.\n", stderr);
       return 77;
     }
index 2fde5587fa242591db6871c7aafd57b5ed35afb6..8d9f3e91115cf6effab85e37b0ceede0665768c3 100644 (file)
@@ -57,6 +57,8 @@ main ()
         if (fedisableexcept (FE_ALL_EXCEPT) == -1
             || feenableexcept (uint_to_exceptions (a)) == -1)
           {
+            if (test_exit_status != EXIT_SUCCESS)
+              return test_exit_status;
             fputs ("Skipping test: trapping floating-point exceptions are not supported on this machine.\n", stderr);
             return 77;
           }
index d97567bc1e34c89158adf80c70e31cf5f70571db..166454080e5af48990e57eae91eb4e07c82a4005 100644 (file)
@@ -492,6 +492,8 @@ main (int argc, char *argv[])
       #endif
       if (known_failure)
         {
+          if (test_exit_status != EXIT_SUCCESS)
+            return test_exit_status;
           fputs ("Skipping test: known failure on this platform\n", stderr);
           return 77;
         }
@@ -510,6 +512,8 @@ main (int argc, char *argv[])
   return test_exit_status;
 
  skip:
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
   fputs ("Skipping test: trapping floating-point exceptions are not supported on this machine.\n", stderr);
   return 77;
 }
index 486e7fe217c5d0e64332ca5945537bb04a2652c4..7f1585553591b2c7ad0949e1d477a259ddf8aaf2 100644 (file)
@@ -392,8 +392,12 @@ main (int argc, char *argv[])
     }
 
   if (result == 77)
-    fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
-             codepage);
+    {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
+      fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+               codepage);
+    }
   return (result ? result : test_exit_status);
 }
 
index 96e2d1f949d8a0634bc344c25836fad69c97c099..87fc4145f7a3a978cb9f29659166f9ffd6c53a6c 100644 (file)
@@ -854,6 +854,8 @@ main (int argc, char *argv[])
       case '5':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15)
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 07663e2e76bffab967a402c12c80bc79fb163da2..ac3ddb501053236eca0948ccb522b2004942e1f7 100644 (file)
@@ -128,7 +128,9 @@ main (void)
   return test_exit_status;
 
  skip:
-  fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
   remove (TESTFILE);
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
+  fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
   return 77;
 }
index 1122053611b3cc31ceacfd7e296659ee3ce75e7b..734b4111874b4c19ef3b1a0cbf16c24ed5ca2486 100644 (file)
@@ -112,6 +112,8 @@ main ()
   return test_exit_status;
 
  skip:
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
   fprintf (stderr, "Skipping test: file operations failed.\n");
   return 77;
 }
index f33cdb4a45177a4ae37d6601570d1bd9641d9dcd..f1d398851a309dc666875c69f11406775da63e60 100644 (file)
@@ -52,6 +52,8 @@ main (int argc, char **argv)
         {
           if (FUNC_UNGETC_BROKEN)
             {
+              if (test_exit_status != EXIT_SUCCESS)
+                return test_exit_status;
               fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
                      stderr);
               return 77;
index a251333b95e0b00eef36b95af5cf65bdfb1891d6..c6f132d6d0ec54a7cce21067ba5dc4cc7299b484 100644 (file)
@@ -56,6 +56,8 @@ main (int argc, _GL_UNUSED char **argv)
         {
           if (FUNC_UNGETC_BROKEN)
             {
+              if (test_exit_status != EXIT_SUCCESS)
+                return test_exit_status;
               fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
                      stderr);
               return 77;
index 34bbd0ccbe160babf8be4c29d47e59914fbf84d7..3951acfc7ed5587a84ea2f6d96ceec131164c42f 100644 (file)
@@ -82,6 +82,8 @@ main (int argc, char **argv)
     {
       if (FUNC_UNGETC_BROKEN)
         {
+          if (test_exit_status != EXIT_SUCCESS)
+            return test_exit_status;
           fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
                  stderr);
           return 77;
index 44540fde2f2e71823334fb2d25ffbc058c292388..5e777d1e7c4955f86d05f0a8b0be591ba7079b68 100644 (file)
@@ -72,7 +72,9 @@ main (void)
   return test_exit_status;
 
  skip:
-  fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
   remove (TESTFILE);
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
+  fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
   return 77;
 }
index 62dbac43c4290062f5e7654be743a809d45ccc10..bafb7fa7e384a2bdb7d1e79c00eca0cf9e7306ee 100644 (file)
@@ -90,6 +90,8 @@ main (int argc, _GL_UNUSED char **argv)
     {
       if (FUNC_UNGETC_BROKEN)
         {
+          if (test_exit_status != EXIT_SUCCESS)
+            return test_exit_status;
           fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
                  stderr);
           return 77;
index e5174fd2b627da6b006e118cb77932a0d0774a85..6874784643979561b3e49afefc32de34ea6be76e 100644 (file)
@@ -72,7 +72,9 @@ main (void)
   return test_exit_status;
 
  skip:
-  fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
   remove (TESTFILE);
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
+  fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
   return 77;
 }
index ef1539ff9c10c220eda3170b662b7c2a2b034cc3..f5b5f87687448f9c19fd685ac53e69b2b832db54 100644 (file)
@@ -112,6 +112,8 @@ main ()
   return test_exit_status;
 
  skip:
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
   fprintf (stderr, "Skipping test: file operations failed.\n");
   return 77;
 }
index 4c1ff18c243b1e0d5374b2551a07860c84a8cced..4ccf428cce335b5f962b28dc47e6ebc02621be5c 100644 (file)
@@ -159,6 +159,8 @@ main ()
   return test_exit_status;
 
  skip:
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
   fprintf (stderr, "Skipping test: file operations failed.\n");
   return 77;
 }
index 0102ffa24e52146361519b7437d49dbb0920297a..a658bf098c886c5ed54a1502b016849af3884f9a 100644 (file)
@@ -84,6 +84,8 @@ main (void)
   if (getrandom (buf1, 1, 0) < 1)
     if (getrandom (buf1, 1, GRND_RANDOM) < 1)
       {
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: getrandom is ineffective\n", stderr);
         return 77;
       }
index 04814ddd1bde28fd5f580646495ae69093faad1f..eb7ac4e556a1a1e62b4e9187a50aa220b5cd6c88 100644 (file)
@@ -202,13 +202,11 @@ main (void)
       ASSERT (rmdir (BASE "sub1") == 0);
       ASSERT (rmdir (BASE "sub2") == 0);
       free (cwd);
-      if (!test_exit_status)
-        {
-          fputs ("skipping test: symlinks not supported on this file system\n",
-                 stderr);
-          return 77;
-        }
-      return test_exit_status;
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
+      fputs ("skipping test: symlinks not supported on this file system\n",
+             stderr);
+      return 77;
     }
   dfd = open (".", O_RDONLY);
   ASSERT (0 <= dfd);
index cb0802a6779aefa01f024f3afe594c6ae9b3eb6e..4f1415dedb599f459735a3b1d974f9c8e7f1e4f4 100644 (file)
@@ -546,8 +546,12 @@ main (int argc, char *argv[])
     }
 
   if (result == 77)
-    fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
-             codepage);
+    {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
+      fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+               codepage);
+    }
   return (result ? result : test_exit_status);
 }
 
index 0aa23a721afe80cfc0c346774b5ca47006df6dbc..36528483a3ee059ef5cd96b1ad571d5ca52cd028 100644 (file)
@@ -755,8 +755,12 @@ main (int argc, char *argv[])
     }
 
   if (result == 77)
-    fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
-             codepage);
+    {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
+      fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+               codepage);
+    }
   return (result ? result : test_exit_status);
 }
 
index 5bb769fd262d2a1902df502d9ae6615d2102ec83..25b39fc22c355a4281585440a81c75ecf00775c8 100644 (file)
@@ -362,6 +362,8 @@ main (int argc, char *argv[])
       case '5':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 1ec7c9966606ef21901c7d83d7a0af55e21d8b8c..07f4d3ccf9ca77411de5d559fb5bb3906206c845 100644 (file)
@@ -731,8 +731,12 @@ main (int argc, char *argv[])
     }
 
   if (result == 77)
-    fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
-             codepage);
+    {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
+      fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+               codepage);
+    }
   return (result ? result : test_exit_status);
 }
 
index b1c50c963cdf03aef637b7614140c15f12b46d44..b26c7888a2885bb69f0a9d77fc1b7bc6abe5c223 100644 (file)
@@ -388,6 +388,8 @@ main (int argc, char *argv[])
       case '5':
         /* Locale encoding is GB18030.  */
         #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
         return 77;
         #endif
index 2edd5660ab6dbb0e9a386c328e6644363ec38251..832f3672fc6e0c39853bfff3eb6cde4f67e8a593 100644 (file)
@@ -715,8 +715,12 @@ main (int argc, char *argv[])
     }
 
   if (result == 77)
-    fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
-             codepage);
+    {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
+      fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+               codepage);
+    }
   return (result ? result : test_exit_status);
 }
 
index 63776aad37c15960acc7792cbea2a47269bd1e08..79237b7398834882e21b0f255097ee2b3bdead54 100644 (file)
@@ -316,6 +316,8 @@ main (int argc, char *argv[])
             case '5':
               /* Locale encoding is GB18030.  */
               #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+              if (test_exit_status != EXIT_SUCCESS)
+                return test_exit_status;
               fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
               return 77;
               #endif
index 066cfbc21528246809a871dd4dd8602904bb2f89..35d87a2e46a42f6d106e6209228aae3ce3818ce5 100644 (file)
@@ -316,6 +316,8 @@ main (int argc, char *argv[])
             case '5':
               /* Locale encoding is GB18030.  */
               #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+              if (test_exit_status != EXIT_SUCCESS)
+                return test_exit_status;
               fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
               return 77;
               #endif
index 987e18ee5676b01d0fa6738635ec3a045d6d4ccf..c481dc3354464ce3a3e7dfbdf7b04a9387718c78 100644 (file)
@@ -264,6 +264,8 @@ main (int argc, char *argv[])
             case '5':
               /* Locale encoding is GB18030.  */
               #if (defined __GLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 13 && __GLIBC_MINOR__ <= 15) || (GL_CHAR32_T_IS_UNICODE && (defined __FreeBSD__ || defined __NetBSD__ || defined __sun))
+              if (test_exit_status != EXIT_SUCCESS)
+                return test_exit_status;
               fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
               return 77;
               #endif
index 7fe8e1d451098917ff289b3032ad41f7b842fccf..fd3ebbde1e0c6fd00258aef23e801457699f5a95 100644 (file)
@@ -134,6 +134,8 @@ main (int argc, char *argv[])
 
   if (skipped_all)
     {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
       fputs ("Skipping test: French locale is not installed\n", stderr);
       return 77;
     }
index 391bb72c14f1d3dc50cc7abd5a8884e91b693c2e..c363eea067d28588116757809f9d694bca4e9f4f 100644 (file)
@@ -61,6 +61,8 @@ main (void)
 #if MUSL_LIBC
       if (fail == 0)
         {
+          if (test_exit_status != EXIT_SUCCESS)
+            return test_exit_status;
           fputs ("Skipping test: musl libc does not come with localizations\n",
                  stderr);
           return 77;
index 86623a6da88d39487fc9c66af8fbd826de104879..72dcd83b71f163ad65a63c9c7b13d958bed72f8e 100644 (file)
@@ -140,6 +140,8 @@ main ()
   ASSERT(recvfd (0, 0) == -1);
   ASSERT(errno == ENOSYS);
 
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
   fputs ("skipping test: socketpair not supported on this system\n",
          stderr);
   return 77;
index 287ab520723c247b6bb9953e262deb41f64b6a4c..e00b38da07a3047011b8fc75c363c38aeb487309 100644 (file)
@@ -93,6 +93,8 @@ main ()
 #if defined _WIN32 && !defined __CYGWIN__
   /* On native Windows, scripts - even with '#!' marker - are not executable.
      Only .bat and .cmd files are.  */
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
   fprintf (stderr, "Skipping test: scripts are not executable on this platform.\n");
   return 77;
 #else
index d1ed9d9a18c0303eca3ca5159e9eddcd0e50a203..160d5d8c917e9b189f42c839197d5d250467509a 100644 (file)
@@ -93,6 +93,8 @@ main ()
 #if defined _WIN32 && !defined __CYGWIN__
   /* On native Windows, scripts - even with '#!' marker - are not executable.
      Only .bat and .cmd files are.  */
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
   fprintf (stderr, "Skipping test: scripts are not executable on this platform.\n");
   return 77;
 #else
index bbeeb0a1a35c4bbb7d6a0a5d9dd58cadb49254be..934a12f2a15bf2dfb5c85c7563754260f2a64af4 100644 (file)
@@ -87,6 +87,8 @@ main (void)
     fd = open ("/dev/tty", O_RDONLY);
     if (fd < 0)
       {
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fprintf (stderr, "Skipping test: cannot open controlling tty\n");
         return 77;
       }
@@ -114,6 +116,8 @@ main (void)
     fd = open ("/dev/ptmx", O_RDWR | O_NOCTTY);
     if (fd < 0)
       {
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fprintf (stderr, "Skipping test: cannot open pseudo-terminal\n");
         return 77;
       }
@@ -142,6 +146,8 @@ main (void)
     fd = open ("/dev/ptc", O_RDWR | O_NOCTTY);
     if (fd < 0)
       {
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fprintf (stderr, "Skipping test: cannot open pseudo-terminal\n");
         return 77;
       }
index 04e27f007bfec6ec3940c59ddccb1fadfec1b7a5..5e89dfa249bcf3b097bef83f573777d1abecfe47 100644 (file)
@@ -136,6 +136,8 @@ main (void)
     fd = open ("/dev/tty", O_RDONLY);
     if (fd < 0)
       {
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fprintf (stderr, "Skipping test: cannot open controlling tty\n");
         return 77;
       }
@@ -164,6 +166,8 @@ main (void)
     fd = open ("/dev/ptmx", O_RDWR | O_NOCTTY);
     if (fd < 0)
       {
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fprintf (stderr, "Skipping test: cannot open pseudo-terminal\n");
         return 77;
       }
@@ -195,6 +199,8 @@ main (void)
     fd = open ("/dev/ptc", O_RDWR | O_NOCTTY);
     if (fd < 0)
       {
+        if (test_exit_status != EXIT_SUCCESS)
+          return test_exit_status;
         fprintf (stderr, "Skipping test: cannot open pseudo-terminal\n");
         return 77;
       }
index 3d0645fbbe8e8b80eccdbe82a6d264bc19f1dd36..91e7524e2d4698f65f124e9641272c3868cc9c61 100644 (file)
@@ -86,6 +86,8 @@ main (void)
      symlink.  */
   if (symlink (BASE "dir", BASE "link") != 0)
     {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
       fputs ("skipping test: symlinks not supported on this file system\n",
              stderr);
       return 77;
index 744e2054d52d91e1fb165e3290ee0db594830103..07b06c1b29f45a6d6ba5d6d2403a1262c3e605a6 100644 (file)
@@ -67,12 +67,11 @@ main ()
       }
   }
 
-  if (test_exit_status != EXIT_SUCCESS)
-    return test_exit_status;
-
 #if defined _WIN32 && !defined __CYGWIN__
   /* On native Windows, scripts - even with '#!' marker - are not executable.
      Only .bat and .cmd files are.  */
+  if (test_exit_status != EXIT_SUCCESS)
+    return test_exit_status;
   fprintf (stderr, "Skipping test: scripts are not executable on this platform.\n");
   return 77;
 #else
index 80147c188d349cbac5c418a184d4b3bbc0d51d01..c9a75449324bc6c959e75e677e9d8f21c973395c 100644 (file)
@@ -55,11 +55,15 @@ main (void)
      glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=19633>.  */
   if (setlocale (LC_ALL, "en_US.UTF-8") == NULL)
     {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
       fprintf (stderr, "Skipping test: English Unicode locale is not installed\n");
       return 77;
     }
   if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
     {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
       fprintf (stderr, "Skipping test: English Unicode locale is not installed\n");
       return 77;
     }
index 63fbe20eba0bcba03851115110e6e3cf8a33003c..00cee63265ef3163c0cc3fa3297e644de300b342 100644 (file)
@@ -100,6 +100,8 @@ test_utime (bool print)
   if (symlink (BASE "file", BASE "link"))
     {
       ASSERT (unlink (BASE "file") == 0);
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
       if (print)
         fputs ("skipping test: symlinks not supported on this file system\n",
                stderr);
index b2b8f35cabb52f6702cc4435e4b12716b25581da..d275ec46d71c0bdca7f2b51209ead26748708a0e 100644 (file)
@@ -318,8 +318,12 @@ main (int argc, char *argv[])
     }
 
   if (result == 77)
-    fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
-             codepage);
+    {
+      if (test_exit_status != EXIT_SUCCESS)
+        return test_exit_status;
+      fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+               codepage);
+    }
   return (result ? result : test_exit_status);
 }