Bug 49473 - Set TCP_NODELAY in tests
Summary: Set TCP_NODELAY in tests
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Jonny Lamb
QA Contact: Telepathy bugs list
URL: http://cgit.freedesktop.org/~jonny/te...
Whiteboard: r+
Keywords: patch
Depends on: 49471
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-04 03:36 UTC by Jonny Lamb
Modified: 2012-09-17 14:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jonny Lamb 2012-05-04 03:36:39 UTC
This cuts 30% off the running time of the test suite: I had 5:43.58 before and 4:00.52 afterwards. So, not bad.

You could argue that this should only be enabled when it's not a release build. Thoughts on that?
Comment 1 Simon McVittie 2012-07-23 10:36:47 UTC
I think this needs some #ifdefs, unless you've verified that it can be cross-compiled to Windows (I recommend mingw-w64, as seen in Debian unstable) and/or looked it up on MSDN.

Either throw in some configure checks for setsockopt, IPPROTO_TCP and TCP_NODELAY, or approximate it by #ifdef G_OS_UNIX?

Other than that it seems good. We like fast tests.

(In reply to comment #0)
> You could argue that this should only be enabled when it's not a release build.

I'd rather not have release builds test themselves differently. Perhaps you could make it controllable by an environment variable or its own --enable thing, and have Gabble use the default (i.e. not NODELAY) during distcheck?
Comment 2 Jonny Lamb 2012-08-30 20:46:36 UTC
(In reply to comment #1)
> Either throw in some configure checks for setsockopt, IPPROTO_TCP and
> TCP_NODELAY, or approximate it by #ifdef G_OS_UNIX?

I did this. :-)

> (In reply to comment #0)
> > You could argue that this should only be enabled when it's not a release build.
> 
> I'd rather not have release builds test themselves differently. Perhaps you
> could make it controllable by an environment variable or its own --enable
> thing, and have Gabble use the default (i.e. not NODELAY) during distcheck?

Okay I made the default be not having NODELAY, but setting GABBLE_NODELAY will enable it for a test. I even wrote about it in tests/README.
Comment 3 Simon McVittie 2012-08-31 10:33:00 UTC
Looks great. We like faster tests.
Comment 4 Jonny Lamb 2012-09-17 14:12:36 UTC
Merged, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.