Skip Menu |

This queue is for tickets about the Net-OpenSSH CPAN distribution.

Report information
The Basics
Id: 86837
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Net-OpenSSH

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

Bug Information
Severity: (no value)
Broken in: 0.60
Fixed in: (no value)



Subject: tests hang, fail
When running tests, they sit for 15 seconds and produce this output: $ make test PERL_DL_NONLAZY=1 /home/ad/karene/perl5/perlbrew/perls/perl-5.16.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t # # SSH client found: OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012. # Trying to connect to localhost, timeout is 15s. # Connection failed... trying fallback aproach # sshd command found at /usr/sbin/sshd. # Faking connection, timeout is 15s. # Using configuration from '/tmp/Net-OpenSSH-0.60/t' sh: 1: cannot create /var/run/motd.new: Permission denied stty: standard input: Invalid argument # Failed test at t/1_run.t line 102. # got: 'Changes # MANIFEST # META.json # META.yml # MYMETA.json # MYMETA.yml # Makefile # Makefile.PL # README # blib # lib # pm_to_blib # sample # stty: standard input: Invalid argument # t # test.dat # test.out # ' # expected: 'Changes # MANIFEST # META.json # META.yml # MYMETA.json # MYMETA.yml # Makefile # Makefile.PL # README # blib # lib # pm_to_blib # sample # t # test.dat # test.out # ' stty: standard input: Invalid argument Signal 11 (SEGV) caught by ps (procps version 3.2.8). Please send bug reports to <feedback@lists.sf.net> or <albert@users.sf.net> # Failed test at t/1_run.t line 114. Signal 11 (SEGV) caught by ps (procps version 3.2.8). Please send bug reports to <feedback@lists.sf.net> or <albert@users.sf.net> # Failed test 'errput' # at t/1_run.t line 122. # got: 'stty: standard input: Invalid argument # ' # expected: '' # Failed test 'external_master 1' # at t/1_run.t line 128. # got: 'stty: standard input: Invalid argument # ' # expected: '' stty: standard input: Invalid argument stty: standard input: Invalid argument stty: standard input: Invalid argument # Failed test at t/1_run.t line 151. # got: 'stty: standard input: Invalid argument # foo 1 # foo 2 # foo 3 # foo 4 # foo 5 # foo 6 # foo 7 # foo 8 # foo 9 # foo 10 # ' # expected: 'foo 1 # foo 2 # foo 3 # foo 4 # foo 5 # foo 6 # foo 7 # foo 8 # foo 9 # foo 10 # ' # Failed test at t/1_run.t line 154. # got: 'stty: standard input: Invalid argument # foo 1 # foo 2 # foo 3 # foo 4 # foo 5 # foo 6 # foo 7 # foo 8 # foo 9 # foo 10 # ' # expected: 'foo 1 # foo 2 # foo 3 # foo 4 # foo 5 # foo 6 # foo 7 # foo 8 # foo 9 # foo 10 # ' stty: standard input: Invalid argument stty: standard input: Invalid argument stty: standard input: Invalid argument stty: standard input: Invalid argument stty: standard input: Invalid argument # Looks like you failed 6 tests of 46. t/1_run.t ... Dubious, test returned 6 (wstat 1536, 0x600) Failed 6/46 subtests (less 1 skipped subtest: 39 okay) t/2_pods.t .. skipped: Only the author needs to check that POD docs are right Test Summary Report ------------------- t/1_run.t (Wstat: 1536 Tests: 46 Failed: 6) Failed tests: 3, 7, 11, 13, 21-22 Non-zero exit status: 6 Files=2, Tests=46, 31 wallclock secs ( 0.02 usr 0.01 sys + 9.90 cusr 1.31 csys = 11.24 CPU) Result: FAIL Failed 1/2 test programs. 6/46 subtests failed. make: *** [test_dynamic] Error 255 This is an x86 ubuntu box, not running as root.
Hi Karen, Thank you for reporting the problem. On Wed Jul 10 18:51:37 2013, ETHER wrote: Show quoted text
> > When running tests, they sit for 15 seconds and produce this output: > > $ make test > PERL_DL_NONLAZY=1 /home/ad/karene/perl5/perlbrew/perls/perl- > 5.16.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, > 'blib/lib', 'blib/arch')" t/*.t > # > # SSH client found: OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 > 14 Mar 2012. > # Trying to connect to localhost, timeout is 15s. > # Connection failed... trying fallback aproach > # sshd command found at /usr/sbin/sshd. > # Faking connection, timeout is 15s. > # Using configuration from '/tmp/Net-OpenSSH-0.60/t' > sh: 1: cannot create /var/run/motd.new: Permission denied > stty: standard input: Invalid argument
Your shell is doing unexpected things. Probably you have some custom configuration that interferes with the module testing. I have uploaded a new version to CPAN that skips the tests when it detects that happening: https://metacpan.org/release/SALVA/Net-OpenSSH-0.61_05 Could you test it and tell me if it worked?
Subject: Re: [rt.cpan.org #86837] tests hang, fail
Date: Thu, 11 Jul 2013 12:53:51 -0700
To: Salvador Fandino Garcia via RT <bug-Net-OpenSSH [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
On Thu, Jul 11, 2013 at 03:12:46AM -0400, Salvador Fandino Garcia via RT wrote: Show quoted text
> Your shell is doing unexpected things. Probably you have some custom configuration that interferes with the module testing. > > I have uploaded a new version to CPAN that skips the tests when it detects that happening: > > https://metacpan.org/release/SALVA/Net-OpenSSH-0.61_05 > > Could you test it and tell me if it worked?
I'm afraid the output is the same as before; your change does not seem to be working. sh -c 'echo hello 2>&1' works fine - the output is "hello\n". What should be I looking for to identify odd configurations? I do not output anything special on 'ssh localhost'.
Subject: Re: [rt.cpan.org #86837] tests hang, fail
Date: Fri, 12 Jul 2013 15:12:03 +0200
To: bug-Net-OpenSSH [...] rt.cpan.org
From: Salvador Fandiño <sfandino [...] yahoo.com>
On 07/11/2013 09:54 PM, Karen Etheridge via RT wrote: Show quoted text
> Queue: Net-OpenSSH > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=86837 > > > On Thu, Jul 11, 2013 at 03:12:46AM -0400, Salvador Fandino Garcia via RT wrote:
>> Your shell is doing unexpected things. Probably you have some custom configuration that interferes with the module testing. >> >> I have uploaded a new version to CPAN that skips the tests when it detects that happening: >> >> https://metacpan.org/release/SALVA/Net-OpenSSH-0.61_05 >> >> Could you test it and tell me if it worked?
> I'm afraid the output is the same as before; your change does not seem to > be working. > > sh -c 'echo hello 2>&1' works fine - the output is "hello\n". > > What should be I looking for to identify odd configurations? I do not > output anything special on 'ssh localhost'. >
I have uploaded a new version to CPAN: https://metacpan.org/release/SALVA/Net-OpenSSH-0.61_06 To check that the module works as expected, the test script runs several commands both through a ssh connection to localhost and directly as subprocesses (i.e. via system) and then compares both outputs for equality. On your system, you have some customization, probably on ~/.bashrc that introduces some garbage in the output (it looks as you have some stty command that prints an error when called by a shell not connected to a TTY). The code I had added to detect that kind of problem, was running a very simple command locally and checking for unexpected rubbish on the output. Unfortunately, bash uses some (undocumented) heuristics to detect when it is being called by sshd and adjust its behavior accordingly (i.e. loading ~/.bashrc) that were not being triggered. On this new version, bash is really fooled into thinking it is being called by sshd and ~/.bashrc is loaded.
Subject: Re: [rt.cpan.org #86837] tests hang, fail
Date: Fri, 12 Jul 2013 09:53:04 -0700
To: Salvador \"Fandiño\" via RT <bug-Net-OpenSSH [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
On Fri, Jul 12, 2013 at 09:12:48AM -0400, Salvador \"Fandi?o\" via RT wrote: Show quoted text
> I have uploaded a new version to CPAN: > > https://metacpan.org/release/SALVA/Net-OpenSSH-0.61_06
Excellent, that worked: PERL_DL_NONLAZY=1 /home/ad/karene/perl5/perlbrew/perls/perl-5.16.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/1_run.t .... # shell is not clean: $?=0, output... # stty: standard input: Inappropriate ioctl for device # ok t/1_run.t .... skipped: Your shell does unexpected things! t/2_pods.t ... skipped: Only the author needs to check that POD docs are right t/quoting.t .. # shell is not clean: $?=0, output... # stty: standard input: Inappropriate ioctl for device # ok t/quoting.t .. skipped: Your shell does unexpected things! Files=3, Tests=0, 0 wallclock secs ( 0.04 usr 0.00 sys + 0.06 cusr 0.01 csys = 0.11 CPU) Result: NOTESTS Manifying blib/man3/Net::OpenSSH::Constants.3 Manifying blib/man3/Net::OpenSSH::ConnectionCache.3 Manifying blib/man3/Net::OpenSSH::OSTracer.3 Appending installation info to /home/ad/karene/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux/perllocal.pod OK Successfully installed Net-OpenSSH-0.61_06 1 distribution installed Show quoted text
> On your system, you have some customization, probably on ~/.bashrc that introduces some garbage in the output (it looks as you have some stty command that prints an error when called by a shell not connected to a TTY).
Hmm, that would be unfortunate, as it isn't my intention to break tools that invoke subshells etc. Do you know of a quick way to capture the output of a tty-less shell, so I can try to determine what bits in my .bashrc might be responsible? (It might be useful to include such output in the tests, perhaps as a diag() message, to alert the user that this problem exists and some tests have been short-circuited as a result.
On Fri Jul 12 12:53:21 2013, ETHER wrote: Show quoted text
> On Fri, Jul 12, 2013 at 09:12:48AM -0400, Salvador \"Fandi?o\" via RT > wrote:
> > I have uploaded a new version to CPAN: > > > > https://metacpan.org/release/SALVA/Net-OpenSSH-0.61_06
> > Excellent, that worked: > > PERL_DL_NONLAZY=1 /home/ad/karene/perl5/perlbrew/perls/perl- > 5.16.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, > 'blib/lib', 'blib/arch')" t/*.t > t/1_run.t .... # shell is not clean: $?=0, output... > # stty: standard input: Inappropriate ioctl for device > # ok > t/1_run.t .... skipped: Your shell does unexpected things! > t/2_pods.t ... skipped: Only the author needs to check that POD > docs are right > t/quoting.t .. # shell is not clean: $?=0, output... > # stty: standard input: Inappropriate ioctl for device > # ok > t/quoting.t .. skipped: Your shell does unexpected things! > Files=3, Tests=0, 0 wallclock secs ( 0.04 usr 0.00 sys + 0.06 > cusr 0.01 csys = 0.11 CPU) > Result: NOTESTS > Manifying blib/man3/Net::OpenSSH::Constants.3 > Manifying blib/man3/Net::OpenSSH::ConnectionCache.3 > Manifying blib/man3/Net::OpenSSH::OSTracer.3 > Appending installation info to > /home/ad/karene/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64- > linux/perllocal.pod > OK > Successfully installed Net-OpenSSH-0.61_06 > 1 distribution installed > >
> > On your system, you have some customization, probably on ~/.bashrc
> that introduces some garbage in the output (it looks as you have > some stty command that prints an error when called by a shell not > connected to a TTY). > > Hmm, that would be unfortunate, as it isn't my intention to break > tools > that invoke subshells etc. Do you know of a quick way to capture the > output of a tty-less shell, so I can try to determine what bits in my > .bashrc might be responsible?
It's already there: stty: standard input: Inappropriate ioctl for device 'stty' is called without first ensuring that stdin is a tty. It should be easy to fix: test -t 0 && stty ... Show quoted text
> (It might be useful to include such output in the tests, perhaps as a > diag() message, to alert the user that this problem exists and some > tests > have been short-circuited as a result.
yes, I have improved the error message.