diff options
author | Jeremy Allison <jra@samba.org> | 2013-03-08 13:44:08 -0800 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-03-22 18:16:45 +0100 |
commit | 566a2e6828bb5d6ea3a35e24938675a296bbe95b (patch) | |
tree | bcdd6efa31cbd25c20721d508e9d11fccb1fe9a9 /lib | |
parent | c3ee49a09944cec9ee1e41c32dd31bdc170f610c (diff) | |
download | samba-566a2e6828bb5d6ea3a35e24938675a296bbe95b.tar.gz samba-566a2e6828bb5d6ea3a35e24938675a296bbe95b.tar.xz samba-566a2e6828bb5d6ea3a35e24938675a296bbe95b.zip |
Fix tevent testsuite issue on Solaris.
On Solaris/Nexenta/Illumos once a pipe is full it will not be reported
as writable until PIPE_BUF (actually on Solaris 4096, which is less than
PIPE_BUF) bytes have been read from it.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Mar 22 18:16:45 CET 2013 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tevent/testsuite.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c index 1fcfa1cac3..7851c6c92d 100644 --- a/lib/tevent/testsuite.c +++ b/lib/tevent/testsuite.c @@ -482,8 +482,13 @@ static void test_event_fd2_sock_handler(struct tevent_context *ev_ctx, return; } - if (oth_sock->num_read > 0) { + if (oth_sock->num_read >= PIPE_BUF) { /* + * On Linux we become writable once we've read + * one byte. On Solaris we only become writable + * again once we've read 4096 bytes. PIPE_BUF + * is probably a safe bet to test against. + * * There should be room to write a byte again */ if (!(flags & TEVENT_FD_WRITE)) { |