From 061c7e5e3d523f924c7983b6ef83eb706d177a5d Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Fri, 12 Mar 2021 10:50:27 +0100 Subject: [PATCH] tests: zfs: complain when a first sub-test dies Previously, $count was not increased and no test failure was reported. Signed-off-by: Fabian Ebner --- test/run_test_zfspoolplugin.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/run_test_zfspoolplugin.pl b/test/run_test_zfspoolplugin.pl index 9c5e841..2f63f1b 100755 --- a/test/run_test_zfspoolplugin.pl +++ b/test/run_test_zfspoolplugin.pl @@ -2714,7 +2714,10 @@ for (my $i = $start_test; $i <= $end_test; $i++) { eval { $tests->{$i}(); }; - warn $@ if $@; + if (my $err = $@) { + warn $err; + $count++; + } cleanup_zfs(); }