From c6d618380fb4214ba7136631e4f30b9f495c85b9 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 6 Jan 2021 07:23:14 +0100 Subject: [PATCH] pipe-filter-gi: Fix test failure on AIX 7.2. * lib/pipe-filter-aux.h (SSIZE_MAX) [AIX]: Set to 4096. --- ChangeLog | 5 +++++ lib/pipe-filter-aux.h | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 61d4e7aaef..5419da4d19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-01-05 Bruno Haible + + pipe-filter-gi: Fix test failure on AIX 7.2. + * lib/pipe-filter-aux.h (SSIZE_MAX) [AIX]: Set to 4096. + 2021-01-05 Bruno Haible utimens, utimensat, fdutimensat: Avoid test failures on AIX 7.2. diff --git a/lib/pipe-filter-aux.h b/lib/pipe-filter-aux.h index 294a27ece5..2977260ece 100644 --- a/lib/pipe-filter-aux.h +++ b/lib/pipe-filter-aux.h @@ -26,6 +26,15 @@ _GL_INLINE_HEADER_BEGIN #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif +#ifdef _AIX +/* On AIX, despite having select() and despite having put the file descriptor + in non-blocking mode, it can happen that select() reports that fd[1] is + writable but writing a large amount of data to fd[1] then fails with errno + EAGAIN. Seen with test-pipe-filter-gi1 on AIX 7.2, with data sizes of + 29 KB. So, limit the size of data passed to the write() call to 4 KB. */ +# undef SSIZE_MAX +# define SSIZE_MAX 4096 +#endif /* We use a child process, and communicate through a bidirectional pipe. To avoid deadlocks, let the child process decide when it wants to read -- 2.39.5