]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test/recipes/02-test_errstr.t: Do not test negative system error codes
authorRichard Levitte <levitte@openssl.org>
Tue, 6 Apr 2021 13:30:38 +0000 (15:30 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 7 Apr 2021 20:09:58 +0000 (22:09 +0200)
It's been deemed unlikely that these will end up in OpenSSL error
records, so we simply don't test them if they happen to be among the
error codes that perl has support for.

Fixes #14763

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14779)

test/recipes/02-test_errstr.t

index 6bc07f6d6525078b76fe52872a96674f76d453d1..3bbf530c282dd29a30b3fe000aa5b2486f48e85f 100644 (file)
@@ -69,6 +69,10 @@ foreach my $errname (@Errno::EXPORT_OK) {
       # is to skip this errcode.
       skip "perl error strings and ssystem error strings for errcode 0 differ", 1
           if $errcode == 0;
+      # On some systems (for example Hurd), there are negative error codes.
+      # These are currently unsupported in OpenSSL error reports.
+      skip "negative error codes are not supported in OpenSSL", 1
+          if $errcode < 0;
 
       &ok(match_syserr_reason($errcode));
     }