Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2C5A2200CC7 for ; Sun, 16 Jul 2017 15:38:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2A8D91609DD; Sun, 16 Jul 2017 13:38:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 71DB71609DC for ; Sun, 16 Jul 2017 15:38:35 +0200 (CEST) Received: (qmail 95007 invoked by uid 500); 16 Jul 2017 13:38:34 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 94998 invoked by uid 99); 16 Jul 2017 13:38:33 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Jul 2017 13:38:33 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id AD4433A0042 for ; Sun, 16 Jul 2017 13:38:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1802057 - /httpd/test/framework/trunk/t/modules/proxy_fcgi.t Date: Sun, 16 Jul 2017 13:38:30 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170716133832.AD4433A0042@svn01-us-west.apache.org> archived-at: Sun, 16 Jul 2017 13:38:36 -0000 Author: jim Date: Sun Jul 16 13:38:30 2017 New Revision: 1802057 URL: http://svn.apache.org/viewvc?rev=1802057&view=rev Log: Avoid magic numbers and instead tag on invalid port numbers Modified: httpd/test/framework/trunk/t/modules/proxy_fcgi.t Modified: httpd/test/framework/trunk/t/modules/proxy_fcgi.t URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/proxy_fcgi.t?rev=1802057&r1=1802056&r2=1802057&view=diff ============================================================================== --- httpd/test/framework/trunk/t/modules/proxy_fcgi.t (original) +++ httpd/test/framework/trunk/t/modules/proxy_fcgi.t Sun Jul 16 13:38:30 2017 @@ -112,7 +112,7 @@ sub run_fcgi_envvar_request my $backend = shift || "FCGI"; # Launch the FCGI process. - my $child = launch_envvar_echo_daemon($fcgi_port) unless ($fcgi_port == -1) ; + my $child = launch_envvar_echo_daemon($fcgi_port) unless ($fcgi_port <= 0) ; # Hit the backend. my $r = GET($uri); @@ -129,7 +129,7 @@ sub run_fcgi_envvar_request } # Rejoin the child FCGI process. - waitpid($child, 0) unless ($fcgi_port == -1) ; + waitpid($child, 0) unless ($fcgi_port <= 0) ; return \%envs; } @@ -244,7 +244,7 @@ if (have_module('actions')) { ok 0; exit; } - $envs = run_fcgi_envvar_request(-1, "/php/fpm/action/sub2/test.php/foo/bar?query", "PHP-FPM"); + $envs = run_fcgi_envvar_request(0, "/php/fpm/action/sub2/test.php/foo/bar?query", "PHP-FPM"); ok t_cmp($envs->{'SCRIPT_NAME'}, '/php/fpm/action/sub2/test.php', "Handler PHP-FPM sets correct SCRIPT_NAME"); ok t_cmp($envs->{'PATH_INFO'}, '/foo/bar', @@ -256,7 +256,7 @@ if (have_module('actions')) { ok t_cmp($envs->{'FCGI_ROLE'}, 'RESPONDER', "Handler PHP-FPM sets correct FCGI_ROLE"); - $envs = run_fcgi_envvar_request(-1, "/php-fpm-pp/php/fpm/pp/sub1/test.php/foo/bar?query", "PHP-FPM"); + $envs = run_fcgi_envvar_request(0, "/php-fpm-pp/php/fpm/pp/sub1/test.php/foo/bar?query", "PHP-FPM"); ok t_cmp($envs->{'SCRIPT_NAME'}, '/php-fpm-pp/php/fpm/pp/sub1/test.php', "ProxyPass PHP-FPM sets correct SCRIPT_NAME"); ok t_cmp($envs->{'PATH_INFO'}, '/foo/bar', @@ -268,7 +268,7 @@ if (have_module('actions')) { ok t_cmp($envs->{'FCGI_ROLE'}, 'RESPONDER', "ProxyPass PHP-FPM sets correct FCGI_ROLE"); - $envs = run_fcgi_envvar_request(-1, "/php-fpm-pp/php/fpm/pp/sub1/test.php", "PHP-FPM"); + $envs = run_fcgi_envvar_request(0, "/php-fpm-pp/php/fpm/pp/sub1/test.php", "PHP-FPM"); ok t_cmp($envs->{'PATH_INFO'}, undef, "ProxyPass PHP-FPM sets correct empty PATH_INFO"); ok t_cmp($envs->{'PATH_TRANSLATED'}, undef,