optimize test_transfer. fix set_upload_mode() bug for seeds. clean up some verbose logging. fix tests to not fail by EAGAIN on stdout

This commit is contained in:
Arvid Norberg
2010-12-24 00:37:01 +00:00
parent 31386d8396
commit c4422cd34e
6 changed files with 95 additions and 28 deletions

View File

@@ -39,6 +39,14 @@ extern bool tests_failure;
int main()
{
#ifdef O_NONBLOCK
// on darwin, stdout is set to non-blocking mode by default
// which sometimes causes tests to fail with EAGAIN just
// by printing logs
int flags = fcntl(stdout, F_GETFL, 0);
fcntl(stdout, F_SETFL, flags & ~O_NONBLOCK);
#endif
#ifndef BOOST_NO_EXCEPTIONS
try
{