aboutsummaryrefslogtreecommitdiff
path: root/test/recipes/80-test_ca.t
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-01-13 15:16:41 +0100
committerRichard Levitte <levitte@openssl.org>2016-01-13 15:23:44 +0100
commit4034c38b25b44773660f7427acfcdbbb56f47907 (patch)
tree3c5545bc3c8eb7a17891362fa570e419b30796cd /test/recipes/80-test_ca.t
parentac33c5a477568127ad99b1260a8978477de50e36 (diff)
downloadopenssl-4034c38b25b44773660f7427acfcdbbb56f47907.zip
openssl-4034c38b25b44773660f7427acfcdbbb56f47907.tar.gz
openssl-4034c38b25b44773660f7427acfcdbbb56f47907.tar.bz2
Fix test/recipes/80-test_ca.t to work on VMS
VMS uses a variant of openssl.cnf named openssl-vms.cnf. There's a Perl on VMS mystery where a open pipe will not SIGPIPE when the child process exits, which means that a loop sending "y\n" to it will never stop. Adding a counter helps fix this (set to 10, we know that none of the CA.pl commands will require more). Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/recipes/80-test_ca.t')
-rw-r--r--test/recipes/80-test_ca.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/recipes/80-test_ca.t b/test/recipes/80-test_ca.t
index ff6eb65..b00e303 100644
--- a/test/recipes/80-test_ca.t
+++ b/test/recipes/80-test_ca.t
@@ -13,7 +13,8 @@ setup("test_ca");
my $perl = $^X;
$ENV{OPENSSL} = cmdstr(app(["openssl"]));
my $CA_pl = top_file("apps", "CA.pl");
-my $std_openssl_cnf = top_file("apps", "openssl.cnf");
+my $std_openssl_cnf = $^O eq "VMS"
+ ? top_file("apps", "openssl-vms.cnf") : top_file("apps", "openssl.cnf");
($perl) = quotify($perl) unless $^O eq "VMS"; # never quotify a command on VMS. Ever!
@@ -46,9 +47,10 @@ unlink "newcert.pem", "newreq.pem";
sub yes {
+ my $cntr = 10;
open(PIPE, "|-", join(" ",@_));
local $SIG{PIPE} = "IGNORE";
- 1 while print PIPE "y\n";
+ 1 while $cntr-- > 0 && print PIPE "y\n";
close PIPE;
return 0;
}