Skip Menu |

This queue is for tickets about the Gtk2 CPAN distribution.

Report information
The Basics
Id: 31255
Status: resolved
Priority: 0/
Queue: Gtk2

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.162
Fixed in: (no value)



Subject: Random test results
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 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. Or maybe you can make the tests more robust by not giving up on the first failed connection attempt?
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.
On 2007-12-05 23:30:14, 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 > > 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. > > Or maybe you can make the tests more robust by not giving up on the > first failed connection attempt? > >
Looking at http://analysis.cpantesters.org/solved?distv=Gtk2-1.24992 it seems that this particular issue (t/GdkDisplayManager.t failing) does not happen anymore. It is possible that this problem was caused by problems with the X server you used then (Xvnc? Xvfb? Xnest?), and is possibly fixed in newer versions.
Good catch! I always used Xvfb but of course am using newer versions nowadays than 11 years ago. I'll close this ticket a "repaired itself". Thanks!