]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test_gendhparam: Drop expected error output
authorTomas Mraz <tomas@openssl.org>
Wed, 12 Jan 2022 08:55:43 +0000 (09:55 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 13 Jan 2022 12:18:58 +0000 (13:18 +0100)
Otherwise it sometimes confuses the TAP parser.

Fixes #17480

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/17481)

test/recipes/15-test_gendhparam.t

index b5fe6448891cdbe3959ae609d76671494d3c27b3..b95695b4dc078f9bbdeea1da0c959fde6ec3bb55 100644 (file)
@@ -140,9 +140,17 @@ foreach my $test (@testdata) {
         push(@pkeyopts, '-pkeyopt');
         push(@pkeyopts, $_);
     }
-    my @lines = run(app(['openssl', 'genpkey', '-genparam',
+    my @lines;
+    if ($expected[0] eq 'ERROR') {
+        @lines = run(app(['openssl', 'genpkey', '-genparam',
+                          '-algorithm', $alg, '-text', @pkeyopts],
+                         stderr => undef),
+                     capture => 1);
+    } else {
+        @lines = run(app(['openssl', 'genpkey', '-genparam',
                           '-algorithm', $alg, '-text', @pkeyopts]),
-                    capture => 1);
+                     capture => 1);
+    }
     ok(compareline(\@lines, \@expected), $msg);
 }