osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: svn commit: r1843478 - /httpd/test/framework/trunk/t/ssl/ocsp.t


On Wed, Oct 10, 2018 at 12:27 PM <jim@xxxxxxxxxx> wrote:
Author: jim
Date: Wed Oct 10 17:27:33 2018
New Revision: 1843478

URL: http://svn.apache.org/viewvc?rev=1843478&view=rev
Log:
Better method... just check return status

Modified:
    httpd/test/framework/trunk/t/ssl/ocsp.t

Modified: httpd/test/framework/trunk/t/ssl/ocsp.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/ssl/ocsp.t?rev=1843478&r1=1843477&r2=1843478&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/ssl/ocsp.t (original)
+++ httpd/test/framework/trunk/t/ssl/ocsp.t Wed Oct 10 17:27:33 2018
@@ -21,7 +21,7 @@ Apache::TestRequest::module('ssl_ocsp');
 # support in earlier versions without messing around with stderr
 my $openssl = Apache::TestSSLCA::openssl();
 if (!have_min_apache_version('2.4.26')
-    or `$openssl list-standard-commands 2>/dev/null` !~ /ocsp/) {
+    or system("$openssl ocsp 2>/dev/null") == 0) {

On Windows, /dev/null is invalid (output target nul, eg NUL). 

On every platform this is an always-fail noop, since `openssl ocsp` always results in an error. Not enough arguments. You disabled this test on all environments, please revert.

One test without extraneous stdout garbage might be to test ( `$openssl ocsp -help` !~ /Usage:/ ) ... in theory this would both succeed (success 0), eat stdout, and there should be no Usage: instructions if the ocsp verb doesn't exist.

Thoughts?