From ce8984706ec663c9e235755d31062222e4c1933d Mon Sep 17 00:00:00 2001 From: Dirk Date: Fri, 24 Jan 2025 20:36:59 +0100 Subject: [PATCH] Finalize unit test * pattern search + replace for tls_sockets() vs. openssl * better error handling for invocations with perl functions system + die --- t/12_diff_opensslversions.t | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/t/12_diff_opensslversions.t b/t/12_diff_opensslversions.t index 9c3d803..e88d33b 100755 --- a/t/12_diff_opensslversions.t +++ b/t/12_diff_opensslversions.t @@ -19,6 +19,7 @@ my $cat_csvfile2=""; my $uri="google.com"; my $diff=""; my $distro_openssl="/usr/bin/openssl"; +my @args=""; die "Unable to open $prg" unless -f $prg; die "Unable to open $distro_openssl" unless -f $distro_openssl; @@ -29,11 +30,15 @@ unlink "tmp2.csv"; #1 run printf "\n%s\n", "Diff test IPv4 with supplied openssl against \"$uri\""; -`$prg $check2run $csvfile $uri 2>&1`; +@args="$prg $check2run $csvfile $uri 2>&1"; +system("@args") == 0 + or die ("FAILED: \"@args\""); # 2 printf "\n%s\n", "Diff test IPv4 with $distro_openssl against \"$uri\""; -`$prg $check2run $csvfile2 --openssl=$distro_openssl $uri 2>&1`; +@args="$prg $check2run $csvfile2 --openssl=$distro_openssl $uri 2>&1"; +system("@args") == 0 + or die ("FAILED: \"@args\" "); $cat_csvfile = `cat $csvfile`; $cat_csvfile2 = `cat $csvfile2`; @@ -50,6 +55,10 @@ $cat_csvfile2 =~ s/HTTP_headerTime.*\n//g; $cat_csvfile =~ s/"engine_problem.*\n//g; $cat_csvfile2 =~ s/"engine_problem.*\n//g; +# PR #2628. TL:DR; make the kx between tls_sockets() and openssl the same for this CI run +$cat_csvfile =~ s/ECDH 256/ECDH 253/g; +$cat_csvfile =~ s/ECDH\/MLKEM/ECDH 253 /g; + # Nonce in CSP $cat_csvfile =~ s/.nonce-.* //g; $cat_csvfile2 =~ s/.nonce-.* //g;