[openssl] master update

Richard Levitte levitte at openssl.org
Sat Sep 12 01:52:03 UTC 2020


The branch master has been updated
       via  c88f6f0e408328e13e9ad61b9658114cddbaba92 (commit)
      from  c9352933fe3b383a0208430183b44a0d43f70a04 (commit)


- Log -----------------------------------------------------------------
commit c88f6f0e408328e13e9ad61b9658114cddbaba92
Author: Richard Levitte <levitte at openssl.org>
Date:   Sun Sep 6 08:51:32 2020 +0200

    TEST: skip POSIX errcode zero in tesst/recipes/02-test_errstr.t
    
    On most systems, there is no E macro for errcode zero in <errno.h>,
    which means that it seldom comes up here.  However, reports indicate
    that some platforms do have an E macro for errcode zero.
    With perl, errcode zero is a bit special.  Perl consistently gives
    the empty string for that one, while the C strerror() may give back
    something else.  The easiest way to deal with that possible mismatch
    is to skip this errcode.
    
    Fixes #12798
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/12799)

-----------------------------------------------------------------------

Summary of changes:
 test/recipes/02-test_errstr.t | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/test/recipes/02-test_errstr.t b/test/recipes/02-test_errstr.t
index 7c382b4124..6bc07f6d65 100644
--- a/test/recipes/02-test_errstr.t
+++ b/test/recipes/02-test_errstr.t
@@ -57,7 +57,21 @@ plan tests => scalar @Errno::EXPORT_OK
 foreach my $errname (@Errno::EXPORT_OK) {
     # The error names are perl constants, which are implemented as functions
     # returning the numeric value of that name.
-    &ok(match_syserr_reason("Errno::$errname"->()))
+    my $errcode = "Errno::$errname"->();
+
+  SKIP: {
+      # On most systems, there is no E macro for errcode zero in <errno.h>,
+      # which means that it seldom comes up here.  However, reports indicate
+      # that some platforms do have an E macro for errcode zero.
+      # With perl, errcode zero is a bit special.  Perl consistently gives
+      # the empty string for that one, while the C strerror() may give back
+      # something else.  The easiest way to deal with that possible mismatch
+      # is to skip this errcode.
+      skip "perl error strings and ssystem error strings for errcode 0 differ", 1
+          if $errcode == 0;
+
+      &ok(match_syserr_reason($errcode));
+    }
 }
 
 # OpenSSL library 1 is the "unknown" library


More information about the openssl-commits mailing list