Bug 92887 - test-fdpass returns error although all tests are skipped on windows
Summary: test-fdpass returns error although all tests are skipped on windows
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.10
Hardware: Other Windows (All)
: medium normal
Assignee: Simon McVittie
QA Contact: D-Bus Maintainers
URL:
Whiteboard: review? 1.10
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-11-10 10:14 UTC by Ralf Habacker
Modified: 2015-11-17 13:49 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
fdpass test: assert that TCP connections don't say they can pass fds (5.78 KB, patch)
2015-11-17 13:24 UTC, Simon McVittie
Details | Splinter Review

Description Ralf Habacker 2015-11-10 10:14:34 UTC
Running test-fdpass on windows skips all tests because fd passing is not supported.

/relay: SKIP
/limit: SKIP
/too-many/plus1: SKIP
/too-many/plus2: SKIP
/too-many/plus17: SKIP
/too-many/split: SKIP
/flood/1: SKIP
/flood/half-limit: SKIP
/flood/over-half-limit: SKIP
/flood/limit: SKIP
/odd-limit/minus1: SKIP
/odd-limit/at: SKIP
/odd-limit/plus1: SKIP
/odd-limit/plus2: SKIP

Unfortunally it returns an exit code of 77, which is indicated as error by ctest.

      Start  9: test-fdpass
 8/15 Test  #9: test-fdpass ......................***Failed    0.05 sec
Comment 1 Simon McVittie 2015-11-17 13:15:09 UTC
(In reply to Ralf Habacker from comment #0)
> Running test-fdpass on windows skips all tests because fd passing is not
> supported.
...
> Unfortunally it returns an exit code of 77, which is indicated as error by
> ctest.

Exit code 77 is special for Automake, which treats it as "the whole test was skipped". GLib's test framework produces Automake-compatible exit codes. I can't find an equivalent in CMake's documentation, unfortunately. We can work around this by making sure there is one test that will not be skipped, even on Windows.

I notice that we don't have a test that says "if we open a TCP connection, it does not claim that it can pass fds", which seems like something that might be useful to test. That would pass on both Windows and Unix.
Comment 2 Simon McVittie 2015-11-17 13:24:00 UTC
Created attachment 119734 [details] [review]
fdpass test: assert that TCP connections don't say they can  pass fds

As well as slightly increasing our test coverage, this ensures
that at least one test-case in this test is not skipped, working
around CMake's lack of support for the Automake-style exit code
produced by GTest executables (they exit 77 if everything was skipped).
Comment 3 Ralf Habacker 2015-11-17 13:41:39 UTC
Comment on attachment 119734 [details] [review]
fdpass test: assert that TCP connections don't say they can  pass fds

Review of attachment 119734 [details] [review]:
-----------------------------------------------------------------

Did run on windows.

bin/test-fdpass.exe ; echo $?
/unsupported: OK
/relay: SKIP
/limit: SKIP
/too-many/plus1: SKIP
/too-many/plus2: SKIP
/too-many/plus17: SKIP
/too-many/split: SKIP
/flood/1: SKIP
/flood/half-limit: SKIP
/flood/over-half-limit: SKIP
/flood/limit: SKIP
/odd-limit/minus1: SKIP
/odd-limit/at: SKIP
/odd-limit/plus1: SKIP
/odd-limit/plus2: SKIP
0

looks good.
Comment 4 Ralf Habacker 2015-11-17 13:49:07 UTC
Comment on attachment 119734 [details] [review]
fdpass test: assert that TCP connections don't say they can  pass fds

committed to dbus-1.10


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.