From 3bfb7239daf3d6a89476e163dc925c641d356729 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Wed, 12 Jan 2022 09:55:43 +0100 Subject: [PATCH] test_gendhparam: Drop expected error output Otherwise it sometimes confuses the TAP parser. Fixes #17480 Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/17481) --- test/recipes/15-test_gendhparam.t | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/recipes/15-test_gendhparam.t b/test/recipes/15-test_gendhparam.t index b5fe644889..b95695b4dc 100644 --- a/test/recipes/15-test_gendhparam.t +++ b/test/recipes/15-test_gendhparam.t @@ -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); }