From: Daniel Richard G Date: Wed, 17 Aug 2016 23:57:35 +0000 (-0700) Subject: maint: port tests to z/OS errno behavior X-Git-Tag: v1.0~6685 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=e6921e98649766d059849da14084db34471b19c8;p=gnulib.git 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.) --- diff --git a/ChangeLog b/ChangeLog index 88276cc547..2b75f35eaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2016-08-17 Daniel Richard G. + 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: diff --git a/tests/test-nonblocking-reader.h b/tests/test-nonblocking-reader.h index e912af2b8a..71d9599a6a 100644 --- a/tests/test-nonblocking-reader.h +++ b/tests/test-nonblocking-reader.h @@ -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 diff --git a/tests/test-nonblocking-writer.h b/tests/test-nonblocking-writer.h index b39a65c8ac..0a387c947f 100644 --- a/tests/test-nonblocking-writer.h +++ b/tests/test-nonblocking-writer.h @@ -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