]> Savannah Git Hosting - gnulib.git/commitdiff
maint: port tests to z/OS errno behavior
authorDaniel Richard G <skunk@iSKUNK.ORG>
Wed, 17 Aug 2016 23:57:35 +0000 (16:57 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 18 Aug 2016 00:44:56 +0000 (17:44 -0700)
* tests/test-nonblocking-reader.h:
* tests/test-nonblocking-writer.h:
Accommodate z/OS errno code preferences. (I believe this should
still be within spec; IBM is good at following the letter if not
the spirit of such things.)

ChangeLog
tests/test-nonblocking-reader.h
tests/test-nonblocking-writer.h

index 88276cc5479780806c8c91da6edc61c532109670..2b75f35eaab93044a62a4c1cdea25594d7240fb6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2016-08-17  Daniel Richard G.  <skunk@iSKUNK.ORG>
 
+       maint: port tests to z/OS errno behavior
+       * tests/test-nonblocking-reader.h:
+       * tests/test-nonblocking-writer.h:
+       Accommodate z/OS errno code preferences. (I believe this should
+       still be within spec; IBM is good at following the letter if not
+       the spirit of such things.)
+
        maint: preprocessor changes to support z/OS
        * lib/alloca.in.h, lib/fnmatch.c, lib/get-rusage-as.c:
        * lib/glob.c, lib/math.in.h, lib/ptsname_r.c:
index e912af2b8a512e920c3f906659ff154f146d7af7..71d9599a6aaaeefd34e9770d26eb9b1acd2be9df 100644 (file)
@@ -110,7 +110,7 @@ full_read_from_nonblocking_fd (size_t fd, void *buf, size_t count)
       ASSERT (spent_time < 0.5);
       if (ret < 0)
         {
-          ASSERT (saved_errno == EAGAIN);
+          ASSERT (saved_errno == EAGAIN || saved_errno == EWOULDBLOCK);
           usleep (SMALL_DELAY);
         }
       else
index b39a65c8ac034bda36cc7091bd237b08be68d15c..0a387c947fd4b5d29bbb64bca5e16269b022edaf 100644 (file)
@@ -124,7 +124,7 @@ main_writer_loop (int test, size_t data_block_size, int fd,
                         (long) ret, dbgstrerror (ret < 0, saved_errno));
             if (ret < 0 && bytes_written >= data_block_size)
               {
-                ASSERT (saved_errno == EAGAIN);
+                ASSERT (saved_errno == EAGAIN || saved_errno == EWOULDBLOCK);
                 ASSERT (spent_time < 0.5);
                 break;
               }
@@ -133,7 +133,7 @@ main_writer_loop (int test, size_t data_block_size, int fd,
             ASSERT (spent_time < 0.5);
             if (ret < 0)
               {
-                ASSERT (saved_errno == EAGAIN);
+                ASSERT (saved_errno == EAGAIN || saved_errno == EWOULDBLOCK);
                 usleep (SMALL_DELAY);
               }
             else
@@ -165,7 +165,7 @@ main_writer_loop (int test, size_t data_block_size, int fd,
             ASSERT (spent_time < 0.5);
             if (ret < 0)
               {
-                ASSERT (saved_errno == EAGAIN);
+                ASSERT (saved_errno == EAGAIN || saved_errno == EWOULDBLOCK);
                 usleep (SMALL_DELAY);
               }
             else