perl-Debug-Client-0.29-3.fc22 fails to build in mock because tests do not finish: + make test PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/00-check-deps.t ..... ok # Info: Testing Debug::Client 0.29 # Info: Perl v5.20.1 t/01-compile.t ........ ok t/02-exports.t ........ ok t/03-pod.t ............ skipped: Author tests, not required for installation. t/04-pod-coverage.t ... skipped: Author tests, not required for installation. # # Info: Perl v5.20.1 # Info: OS linux # Info: Term::ReadLine::Gnu installed # Info: Using ReadLine implementation -> Term::ReadLine::Gnu # INFO: $ENV{TERM} -> vt100 t/06-term.t ........... ok ^CCould not run mockbuild: ERROR: Exception(/home/petr/fedora/perl-Debug-Client/perl-Debug-Client-0.29-3.fc22.src.rpm) Config(rawhide-x86_64) 235 minutes 20 seconds First noticed with this build root difference: perl-Term-ReadLine-Gnu 1.25-1.fc22 > 1.26-1.fc22 perl-CPAN-Meta-Check 0.009-3.fc22 > 0.010-1.fc22 perl-Getopt-Long 2.42-310.fc22 > 2.43-1.fc22 perl-Module-Build 2:0.42.10-3.fc22 > 2:0.42.10-4.fc22 perl-Test-Harness 3.34-1.fc22 > 3.35-1.fc22 perl-Compress-Bzip2 2.19-2.fc22 > 2.20-1.fc22 perl-inc-latest > 2:0.42.10-4.fc22 patch 2.7.3-1.fc22 > 2.7.4-1.fc22 libgpg-error 1.17-1.fc22 > 1.17-2.fc22 perl-IO-Socket-SSL 2.010-1.fc22 > 2.011-1.fc22 kernel-headers 3.19.0-0.rc6.git2.1.... > 3.19.0-0.rc6.git3.1....
This is caused by upgrading perl-Term-ReadLine-Gnu from 1.25 to 1.26. The dead-lock is here: $ prove -b -v t/07-initialize.t t/07-initialize.t .. 1..4 ok 1 - initialize with prams LOCK ok 2 - quit with prams ok 3 - initialize without prams ok 4 - quit witout prams ok Either is a bug in the perl-Term-ReadLine-Gnu or it's a race in the test because of suspicious sleep call: ok( my $debugger = Debug::Client->new( host => $host, port => $port, porto => $porto, listen => $listen, reuse => $reuse_addr ), 'initialize with prams' ); $debugger->run; sleep 1; ok( $debugger->quit, 'quit with prams' );
It halts in the $debug->run on reading response from perl debugger. The Debug::Client::run() sends "c" command to the debugger and waits for a response. But no response comes because the "c" command is not flushed from buffers to the TCP socket. This is caused by Term-ReadLine-Gnu commit: r481 | hayashi | 2015-01-31 13:07:49 +0100 (So, 31 led 2015) | 2 lines make handling of iostreams simple (make _rl_store_iostream() return void and remove _rl_fetch_iostream()) [rt.cpan.org #101078]
Actualy the "c" command is flushed, but it's emitted before perl debugger is ready to process input. Either the debugger should buffer the input, or the Debug::Client should wait for debugger prompt. At the end, it's a race.
There still something fishy with the perl debuger: It does not emit "DB<1>" prompt if the debugger is run from the t/07-initialize.t test. If the debugger is run from another session, it emits the "DB<1>". That explains why the debugger does not process the "c" command. But I don't know why the behaviour differs.
Please note upstream moved from Padre track to <https://github.com/PadreIDE/Debug-Client>.
This was a regression in the Term-ReadLine-Gnu-1.26. Upstream provided a patch. I will apply it to Fedora ≥ 22.
Fixed as perl-Term-ReadLine-Gnu-1.26-2.fc22 in F22.