[openssl-commits] [openssl] master update
Andy Polyakov
appro at openssl.org
Tue Oct 13 17:49:03 UTC 2015
The branch master has been updated
via 2d2a83543f757cf3a48a1a0e412aee183a6d539b (commit)
via 82987e6119403661c45f781a8b6748941c15ade6 (commit)
via 85833408b4fb6e109cb05bf8dbe9cdb6bd8f280d (commit)
via 4ada8be2a6c538ee66a9a35a182052f359fc94b3 (commit)
from 1dce6c3f9eef0da2866b82d816dc945883427060 (commit)
- Log -----------------------------------------------------------------
commit 2d2a83543f757cf3a48a1a0e412aee183a6d539b
Author: Andy Polyakov <appro at openssl.org>
Date: Mon Oct 12 22:31:20 2015 +0200
testlib/OpenSSL/Test.pm: remove redundant 'cmd /c', MSWin32 Perl can take care of itself.
Reviewed-by: Richard Levitte <levitte at openssl.org>
commit 82987e6119403661c45f781a8b6748941c15ade6
Author: Andy Polyakov <appro at openssl.org>
Date: Mon Oct 12 22:26:14 2015 +0200
Harmonize do_rehash_rule with updated test/recipies/25-test_verify.t.
Reviewed-by: Richard Levitte <levitte at openssl.org>
commit 85833408b4fb6e109cb05bf8dbe9cdb6bd8f280d
Author: Andy Polyakov <appro at openssl.org>
Date: Mon Oct 12 22:24:27 2015 +0200
Test suite: chomp->s/\R// to harmonize with mingw 'make test'.
Reviewed-by: Richard Levitte <levitte at openssl.org>
commit 4ada8be2a6c538ee66a9a35a182052f359fc94b3
Author: Andy Polyakov <appro at openssl.org>
Date: Mon Oct 12 22:16:07 2015 +0200
Test suite: minimal required to get mingw 'make test' work under Linux.
(part by Alessandro Ghedini)
Reviewed-by: Richard Levitte <levitte at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
test/recipes/00-check_testexes.t | 6 +++---
test/recipes/10-test_bn.t | 2 +-
test/recipes/20-test_enc.t | 2 +-
test/recipes/25-test_req.t | 2 +-
test/recipes/25-test_verify.t | 3 +++
test/recipes/70-test_sslextension.t | 2 +-
test/recipes/70-test_sslsessiontick.t | 2 +-
test/recipes/70-test_sslskewith0p.t | 2 +-
test/recipes/70-test_sslvertol.t | 2 +-
test/recipes/80-test_ssl.t | 2 +-
test/recipes/tconversion.pl | 12 ++++++++++--
test/testlib/OpenSSL/Test.pm | 14 ++++++++++----
test/testlib/OpenSSL/Test/Utils.pm | 2 +-
util/mk1mf.pl | 4 ++--
util/pl/VC-32.pl | 1 +
util/pl/unix.pl | 3 ++-
util/shlib_wrap.sh | 2 +-
17 files changed, 41 insertions(+), 22 deletions(-)
diff --git a/test/recipes/00-check_testexes.t b/test/recipes/00-check_testexes.t
index 3ab38c7..c086f7f 100644
--- a/test/recipes/00-check_testexes.t
+++ b/test/recipes/00-check_testexes.t
@@ -12,7 +12,7 @@ my $OpenSSL_ver = "";
my $Makefile = top_file("Makefile");
if (open(FH, $Makefile)) {
$OpenSSL_ver =
- (map { chomp; s/^VERSION=([^\s]*)\s*$//; $1 } grep { /^VERSION=/ } <FH>)[0];
+ (map { s/\R//; s/^VERSION=([^\s]*)\s*$//; $1 } grep { /^VERSION=/ } <FH>)[0];
close FH;
}
@@ -24,14 +24,14 @@ plan skip_all => "because MINFO not found. If you want this test to run, please
my $MINFO_ver = "";
while(<FH>) {
- chomp;
+ s/\R//; # chomp;
if (/^VERSION=([^\s]*)\s*$/) {
$MINFO_ver = $1;
}
last if /^RELATIVE_DIRECTORY=test$/;
}
while(<FH>) {
- chomp;
+ s/\R//; # chomp;
last if /^EXE=/;
}
close FH;
diff --git a/test/recipes/10-test_bn.t b/test/recipes/10-test_bn.t
index 29b449f..a01d9bf 100644
--- a/test/recipes/10-test_bn.t
+++ b/test/recipes/10-test_bn.t
@@ -25,7 +25,7 @@ my $init = ok(run(test(["bntest"], stdout => $testresults)), 'initialize');
@lines = <DATA>;
close DATA;
}
- chomp(@lines);
+ map { s/\R//; } @lines; # chomp(@lines);
plan tests => scalar grep(/^print /, @lines);
diff --git a/test/recipes/20-test_enc.t b/test/recipes/20-test_enc.t
index bd5a436..836d979 100644
--- a/test/recipes/20-test_enc.t
+++ b/test/recipes/20-test_enc.t
@@ -21,7 +21,7 @@ my $test = catfile(".", "p");
my $cmd = "openssl";
my @ciphers =
- map { chomp; s/^\s+//; s/\s+$//; split /\s+/ }
+ map { s/^\s+//; s/\s+$//; split /\s+/ }
run(app([$cmd, "list", "-cipher-commands"]), capture => 1);
plan tests => 1 + (scalar @ciphers)*2;
diff --git a/test/recipes/25-test_req.t b/test/recipes/25-test_req.t
index 4f9de77..ce1f869 100644
--- a/test/recipes/25-test_req.t
+++ b/test/recipes/25-test_req.t
@@ -31,7 +31,7 @@ sub run_conversion {
open DATA, "req-check.err";
SKIP: {
plan skip_all => "skipping req conversion test for $reqfile"
- if grep /Unknown Public Key/, map { chomp } <DATA>;
+ if grep /Unknown Public Key/, map { s/\R//; } <DATA>;
tconversion("req", "testreq.pem", @openssl_args);
}
diff --git a/test/recipes/25-test_verify.t b/test/recipes/25-test_verify.t
index 10897a1..7c0f091 100644
--- a/test/recipes/25-test_verify.t
+++ b/test/recipes/25-test_verify.t
@@ -8,6 +8,9 @@ use OpenSSL::Test qw/:DEFAULT top_dir top_file/;
setup("test_verify");
+plan skip_all => "no rehash.time was found."
+ unless (-f top_file("rehash.time"));
+
plan tests => 1;
note("Expect some failures and expired certificate");
diff --git a/test/recipes/70-test_sslextension.t b/test/recipes/70-test_sslextension.t
index 4aa3f61..bd99b19 100755
--- a/test/recipes/70-test_sslextension.t
+++ b/test/recipes/70-test_sslextension.t
@@ -60,7 +60,7 @@ my $test_name = "test_sslextension";
setup($test_name);
plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
- unless (map { chomp; s/^SHARED_LIBS=\s*//; $_ }
+ unless (map { s/\R//; s/^SHARED_LIBS=\s*//; $_ }
grep { /^SHARED_LIBS=/ }
do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne "";
diff --git a/test/recipes/70-test_sslsessiontick.t b/test/recipes/70-test_sslsessiontick.t
index a7a450a..9209fd7 100755
--- a/test/recipes/70-test_sslsessiontick.t
+++ b/test/recipes/70-test_sslsessiontick.t
@@ -61,7 +61,7 @@ my $test_name = "test_sslsessiontick";
setup($test_name);
plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
- unless (map { chomp; s/^SHARED_LIBS=\s*//; $_ }
+ unless (map { s/\R//; s/^SHARED_LIBS=\s*//; $_ }
grep { /^SHARED_LIBS=/ }
do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne "";
diff --git a/test/recipes/70-test_sslskewith0p.t b/test/recipes/70-test_sslskewith0p.t
index d8d74b3..3f5e131 100755
--- a/test/recipes/70-test_sslskewith0p.t
+++ b/test/recipes/70-test_sslskewith0p.t
@@ -60,7 +60,7 @@ my $test_name = "test_sslskewith0p";
setup($test_name);
plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
- unless (map { chomp; s/^SHARED_LIBS=\s*//; $_ }
+ unless (map { s/\R//; s/^SHARED_LIBS=\s*//; $_ }
grep { /^SHARED_LIBS=/ }
do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne "";
diff --git a/test/recipes/70-test_sslvertol.t b/test/recipes/70-test_sslvertol.t
index 9717f80..78c6410 100755
--- a/test/recipes/70-test_sslvertol.t
+++ b/test/recipes/70-test_sslvertol.t
@@ -60,7 +60,7 @@ my $test_name = "test_sslextension";
setup($test_name);
plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
- unless (map { chomp; s/^SHARED_LIBS=\s*//; $_ }
+ unless (map { s/\R//; s/^SHARED_LIBS=\s*//; $_ }
grep { /^SHARED_LIBS=/ }
do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne "";
diff --git a/test/recipes/80-test_ssl.t b/test/recipes/80-test_ssl.t
index 6e5e22e..5f520de 100644
--- a/test/recipes/80-test_ssl.t
+++ b/test/recipes/80-test_ssl.t
@@ -414,7 +414,7 @@ sub testssl {
map { split(/:/, $_) }
run(app(["openssl", "ciphers", "${_}:$ciphers"]),
capture => 1);
- chomp @c;
+ map { s/\R//; } @c; # chomp @c;
$protocolciphersuitcount += scalar @c;
$_ => [ @c ] } @protocols;
diff --git a/test/recipes/tconversion.pl b/test/recipes/tconversion.pl
index 011dcbf..07e3406 100644
--- a/test/recipes/tconversion.pl
+++ b/test/recipes/tconversion.pl
@@ -68,14 +68,14 @@ sub tconversion {
}
if ($testtype ne "p7d") {
- is(compare_text("$testtype-fff.p", "$testtype-f.p"), 0,
+ is(cmp_text("$testtype-fff.p", "$testtype-f.p"), 0,
'comparing orig to p');
}
foreach my $to (@conversionforms) {
next if $to eq "d";
foreach my $from (@conversionforms) {
- is(compare_text("$testtype-f.$to", "$testtype-ff.$from$to"), 0,
+ is(cmp_text("$testtype-f.$to", "$testtype-ff.$from$to"), 0,
"comparing $to to $from$to");
}
}
@@ -85,4 +85,12 @@ sub tconversion {
unlink glob "$testtype-fff.*";
}
+sub cmp_text {
+ return compare_text(@_, sub {
+ $_[0] =~ s/\R//g;
+ $_[1] =~ s/\R//g;
+ return $_[0] ne $_[1];
+ });
+}
+
1;
diff --git a/test/testlib/OpenSSL/Test.pm b/test/testlib/OpenSSL/Test.pm
index c64d68d..06accb5 100644
--- a/test/testlib/OpenSSL/Test.pm
+++ b/test/testlib/OpenSSL/Test.pm
@@ -284,8 +284,6 @@ sub run {
my $prefix = "";
if ( $^O eq "VMS" ) { # VMS
$prefix = "pipe ";
- } elsif ($^O eq "MSWin32") { # MSYS
- $prefix = "cmd /c ";
}
my @r = ();
@@ -357,7 +355,7 @@ operating system.
=cut
sub top_dir {
- return __top_file(@_, ""); # This caters for operating systems that have
+ return __top_dir(@_); # This caters for operating systems that have
# a very distinct syntax for directories.
}
@@ -577,6 +575,12 @@ sub __top_file {
return catfile($directories{TOP}, at _,$f);
}
+sub __top_dir {
+ BAIL_OUT("Must run setup() first") if (! $test_name);
+
+ return catdir($directories{TOP}, at _);
+}
+
sub __test_file {
BAIL_OUT("Must run setup() first") if (! $test_name);
@@ -668,7 +672,9 @@ sub __fixup_cmd {
my $prefix = __top_file("util", "shlib_wrap.sh")." ";
my $ext = $ENV{"EXE_EXT"} || "";
- if ( $^O eq "VMS" ) { # VMS
+ if (defined($ENV{EXE_SHELL})) {
+ $prefix = "$ENV{EXE_SHELL} ";
+ } elsif ($^O eq "VMS" ) { # VMS
$prefix = "mcr ";
$ext = ".exe";
} elsif ($^O eq "MSWin32") { # Windows
diff --git a/test/testlib/OpenSSL/Test/Utils.pm b/test/testlib/OpenSSL/Test/Utils.pm
index fc9b533..5312c20 100644
--- a/test/testlib/OpenSSL/Test/Utils.pm
+++ b/test/testlib/OpenSSL/Test/Utils.pm
@@ -46,7 +46,7 @@ my $disabled_set = 0;
sub check_disabled {
#print STDERR "Running check_disabled\n";
foreach (run(app(["openssl", "list", "-disabled"]), capture => 1)) {
- chomp;
+ s/\R//; # chomp;
next if /:/; # skip header
$disabled{lc $_} = 1;
}
diff --git a/util/mk1mf.pl b/util/mk1mf.pl
index 9d8a47d..491a1bb 100755
--- a/util/mk1mf.pl
+++ b/util/mk1mf.pl
@@ -779,8 +779,8 @@ reallyclean:
EOF
-$rules .= &do_rehash_rule("rehash", "certs apps");
-$rules .= &do_test_rule("test", "rehash", "run_tests.pl");
+$rules .= &do_rehash_rule("rehash.time", "certs apps");
+$rules .= &do_test_rule("test", "rehash.time", "run_tests.pl");
my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform";
$platform_cpp_symbol =~ s/-/_/g;
diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl
index a2d35c6..8cb4835 100644
--- a/util/pl/VC-32.pl
+++ b/util/pl/VC-32.pl
@@ -307,6 +307,7 @@ $target: $deps
set OPENSSL=\$(BIN_D)${o}openssl.exe
set OPENSSL_DEBUG_MEMORY=on
\$(PERL) tools/c_rehash certs/demo
+ echo off > $target
EOF
return $ret
}
diff --git a/util/pl/unix.pl b/util/pl/unix.pl
index 528d4d0..c1fa1ff 100644
--- a/util/pl/unix.pl
+++ b/util/pl/unix.pl
@@ -193,7 +193,8 @@ $target: $deps
(OPENSSL="`pwd`/util/opensslwrap.sh"; \\
OPENSSL_DEBUG_MEMORY=on; \\
export OPENSSL OPENSSL_DEBUG_MEMORY; \\
- \$(PERL) tools/c_rehash certs/demo)
+ \$(PERL) tools/c_rehash certs/demo; \\
+ touch $target)
EOF
return $ret
}
diff --git a/util/shlib_wrap.sh b/util/shlib_wrap.sh
index 8775cb5..646b0fe 100755
--- a/util/shlib_wrap.sh
+++ b/util/shlib_wrap.sh
@@ -88,7 +88,7 @@ if [ -f "$LIBCRYPTOSO" -a -z "$preload_var" ]; then
export LD_PRELOAD _RLD_LIST DYLD_INSERT_LIBRARIES
fi
-cmd="$1${EXE_EXT}"
+cmd="$1"; [ -x "$cmd" ] || cmd="$cmd${EXE_EXT}"
shift
if [ $# -eq 0 ]; then
exec "$cmd" # old sh, such as Tru64 4.x, fails to expand empty "$@"
More information about the openssl-commits
mailing list