summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-06-16 06:46:45 +0200
committerRichard Levitte <levitte@openssl.org>2021-06-26 06:43:08 +0200
commite7137c8497234e442f0a2639c43453b5baea7695 (patch)
treec370f67f9a149e2fba46a2a7451ac8eaf9dadd42 /test
parent89fe295257f374647122f73776ddb34555c543f0 (diff)
Fix test_errstr for VMS
Occasionally, we get an error code on VMS that doesn't translate into POSIX, and the error string reflects that Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15823)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/02-test_errstr.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/recipes/02-test_errstr.t b/test/recipes/02-test_errstr.t
index c7ada64c46..9427601292 100644
--- a/test/recipes/02-test_errstr.t
+++ b/test/recipes/02-test_errstr.t
@@ -122,7 +122,10 @@ sub match_any {
$desc = "match '$first' ($desc) with '$strings[0]'";
}
- return ( scalar( grep { $first eq $_ } @strings ) > 0,
+ return ( scalar(
+ grep { ref $_ eq 'Regexp' ? $first =~ $_ : $first eq $_ }
+ @strings
+ ) > 0,
$desc );
}
@@ -150,6 +153,9 @@ sub match_syserr_reason {
# ... and $! will give you the error string back
$!
};
+ # Occasionally, we get an error code that is simply not translatable
+ # to POSIX semantics on VMS, and we get an error string saying so.
+ push @strings, qr/^non-translatable vms error code:/ if $^O eq 'VMS';
# The OpenSSL fallback string
push @strings, "reason($errcode)";