From 6859294c269b1c4e0a8506830f7c61977b19f59a Mon Sep 17 00:00:00 2001 From: Matthijs Mekking Date: Tue, 27 Jun 2023 16:27:35 +0200 Subject: [PATCH] Check all keys despite early failure In the kasp script, if one expected key is not found, continue checking the other key ids, even if there is no match for the first one. This provides a bit more information which keys mismatch and makes for easier debugging test failures. (cherry picked from commit 674249f66a5c41d6742aebb2461ba0659c01eee7) --- bin/tests/system/kasp.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/kasp.sh b/bin/tests/system/kasp.sh index f0c83b19ab..d49baa3047 100644 --- a/bin/tests/system/kasp.sh +++ b/bin/tests/system/kasp.sh @@ -725,6 +725,7 @@ check_numkeys() { _check_keys() { ret=0 + _ret=0 # Clear key ids. key_set KEY1 ID "no" @@ -767,10 +768,10 @@ _check_keys() { # If ret is still non-zero, none of the files matched. echo_i "failed" - return 1 + _ret=1 done - return 0 + return $_ret } # Check keys for a configured zone. This verifies: