wycheproof: hide debug output behind -v flag

This commit is contained in:
Lucas Gabriel Vuotto 2024-05-31 16:53:05 +00:00
parent e62534925b
commit afc2e4b721
3 changed files with 37 additions and 25 deletions

View file

@ -18,7 +18,7 @@ tests-aead:
@echo Undefined WYCHEPROOF_DIR; false
.endif
.for p in ${AEAD}
perl ${.CURDIR}/aead.pl -x ./${p} \
perl ${.CURDIR}/aead.pl ${TESTOPTS} -x ./${p} \
${WYCHEPROOF_DIR}/testvectors/chacha20_poly1305_test.json \
${WYCHEPROOF_DIR}/testvectors_v1/chacha20_poly1305_test.json
.endfor

View file

@ -21,7 +21,7 @@ sub main ()
my %opts;
my $rc = 0;
getopts("x:", \%opts) && @ARGV > 0 or usage;
getopts("vx:", \%opts) && @ARGV > 0 or usage;
usage unless defined $opts{"x"};
for my $f (@ARGV) {
@ -42,6 +42,7 @@ sub main ()
push(@args, "-m", $test->{msg});
push(@args, "-T", $testgroup->{tagSize});
push(@args, "-t", $test->{tag});
push(@args, "-v") if $opts{"v"};
open(my $th, "-|", $opts{"x"}, @args) or die;
my $result = slurp($th);