On Wed Dec 05 23:30:14 2007, ANDK wrote:
Show quoted text> I have observed that this test frequently produces FAILs but if I try to
> run it often enough with the same perl I also get PASSes:
>
> t/GdkDisplayManager..................The application
> 'GdkDisplayManager.t' lost its connection to the display :121.0;
> most likely the X server was shut down or you killed/destroyed
> the application.
> Dubious, test returned 1 (wstat 256, 0x100)
> No subtests run
The output suggests that the problem occurs right at the first relevant
line: my $manager = Gtk2::Gdk::DisplayManager -> get(); The C code and
the XS for that function look rather innocent, so I have no idea what
might cause the failure. Can you verify whether that that line really
is the offender or if the failure happens even earlier?
Show quoted text> Needless to say that these failures disturb investigations on other
> issues. Maybe tests that try to connect to the window manager should be
> made Todo tests that output some diagnostics on both success and
> failure? That would help to shake out the more serious bugs and at the
> same time collect evidence about the display manager failures from
> harvesting PASS reports from cpantesters.
Well, that's the crux with nearly all of our tests. Gtk2 and friends
provide nearly zero functionality by themselves, they merely map the C
API to Perl. Nontheless, we still want to have tests that make sure the
mapping is sensible. Unfortunately, we can't test without inadvertently
also testing parts of gtk+ itself. gtk+ doesn't work correctly (and
complains rather loudly) when it's not connected to the windowing
system. So marking every test that connects to the windowing system as
TODO would amount to marking nearly the whole test suite.
Show quoted text> Or maybe you can make the tests more robust by not giving up on the
> first failed connection attempt?
Well, the test in question uses Gtk2::TestHelper to handle the
initilization stuff. Gtk2::TestHelper in turn uses Gtk2::init_check to
see if connecting to the windowing system is possible. If not, all
tests are automatically skipped.