Subject: | Fw: OpenSSH bug report - "make test" failures on Solaris 5.10 |
Date: | Sat, 21 Aug 2010 11:02:22 -0700 (PDT) |
To: | bug-Net-OpenSSH [...] rt.cpan.org |
From: | Salvador Fandino <sfandino [...] yahoo.com> |
Show quoted text
> When I tried to install Net::OpenSSH 0.48 (and also 0.49) on our
> Solaris server, I noticed that 2 of the new test cases are now
> failing. It isn't a huge problem for me, as I believe that I can
> ignore them. The module will do what I need it to even without the
> test cases passing. But I thought you might be interested to provide a
> fix to help other Solaris users, especially those that don't have the
> time or ability to poke around in the test suites.
>
> t/1_run.....NOK 15# Failed test at t/1_run.t line 121.
> # got: ''
> # expected: 'foo 1
> # foo 2
> ...'
> t/1_run.....NOK 16# Failed test at t/1_run.t line 124.
> # got: ''
> # expected: 'foo 1
> # foo 2
> ...'
>
> At first I was concerned, because I use stderr_to_stdout in my code.
> However, I noticed that both of the test cases use "1>&2" in the
> command, and then try to pull the contents of stderr. But I never do
> this in my scripts. Instead I run a command and then check if it sent
> any data to stderr. I commented out the 2 failing tests and then wrote
> 2 alternate tests cases, both of which run bad commands and capture
> stderr. They both pass on my Solaris server.
>
> 1.
> $output = $ssh->capture({stdin_data => "test", stderr_to_stdout => 1},
> "foobarbaz");
> ok($output =~ /command not found/i) || print "output = '$output'\n";
>
> 2.
> ($output,$errput) = $ssh->capture2("tar -tf foobarbaz.tar");
> is($errput,"tar: foobarbaz.tar: No such file or directory\n");
>
> I'm sure that the original test cases failing are due to a difference
> between Linux and Solaris, but I don't know if any users will want to
> put "1>&2" in their commands and also capture stderr. In any case, I
> thought you might want to know about it.
Message body is not shown because sender requested not to inline it.