You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2018/03/20 14:20:12 UTC

Re: svn commit: r1827303 - /httpd/test/framework/trunk/t/ab/base.t


On 03/20/2018 01:42 PM, covener@apache.org wrote:
> Author: covener
> Date: Tue Mar 20 12:42:07 2018
> New Revision: 1827303
> 
> URL: http://svn.apache.org/viewvc?rev=1827303&view=rev
> Log:
> dump stderr on ok() failure
> 
> also convert a print to t_debug
> 
> 
> 
> Modified:
>     httpd/test/framework/trunk/t/ab/base.t
> 
> Modified: httpd/test/framework/trunk/t/ab/base.t
> URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/ab/base.t?rev=1827303&r1=1827302&r2=1827303&view=diff
> ==============================================================================
> --- httpd/test/framework/trunk/t/ab/base.t (original)
> +++ httpd/test/framework/trunk/t/ab/base.t Tue Mar 20 12:42:07 2018
> @@ -3,9 +3,11 @@ use warnings FATAL => 'all';
>  
>  use Apache::Test;
>  use Apache::TestConfig;
> +use Apache::TestUtil qw(t_debug);
>  use IPC::Open3;
>  use Symbol;
>  use File::Spec::Functions qw(catfile);
> +use Data::Dumper;
>  
>  my $vars = Apache::Test::vars();
>  
> @@ -13,7 +15,7 @@ plan tests => ($vars->{ssl_module_name}
>  
>  sub run_and_gather_output {
>      my $command = shift;
> -    print "# running: ", $command, "\n";
> +    t_debug "# running: ", $command, "\n";
>      my ($cin, $cout, $cerr);
>      $cerr = gensym();
>      my $pid = open3($cin, $cout, $cerr, $command);
> @@ -35,8 +37,10 @@ if ($vars->{ssl_module_name}) {
>      my $https_url = Apache::TestRequest::module2url($vars->{ssl_module_name}, {scheme => 'https', path => '/'});
>      my $https_results = run_and_gather_output("$ab_path -q -n 10 $https_url");
>      ok ($https_results->{status} == 0);
> -    ok (scalar(@{$https_results->{stderr}}) == 0);
> +    ok (scalar(@{$https_results->{stderr}}), 0, 
> +        "https stderr was scary " . Dumper $https_results->{stderr});
>  
>      #XXX: For some reason, stderr is getting pushed into stdout. This test will at least catch known SSL failures
> -    ok (scalar(grep(/SSL.*(fail|err)/i, @{$https_results->{stdout}}) == 0) );
> +    ok (scalar(grep(/SSL.*(fail|err)/i, @{$https_results->{stdout}})), 0, 
> +        "https stdout had some error strong " .  Dumper $https_results->{stdout} );


had some error string ?

Regards

RĂ¼diger


Re: svn commit: r1827303 - /httpd/test/framework/trunk/t/ab/base.t

Posted by Eric Covener <co...@gmail.com>.
>> +        "https stdout had some error strong " .  Dumper $https_results->{stdout} );
>
>
> had some error string ?
>
Thanks, took the oppty to more fully reword. 1827314.