mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
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
This commit is contained in:
parent
c3ee49a099
commit
566a2e6828
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user