From 5a579b74a94e67ec0fc3b2b90acc5f77f54f215e Mon Sep 17 00:00:00 2001 From: Colton Willey Date: Tue, 16 Jun 2026 12:56:34 -0700 Subject: [PATCH] cmd_test: default WOLFPROV_FORCE_FAIL to 0 in ecc-cmd-test.sh When WOLFPROV_FORCE_FAIL is unset, the unquoted numeric test guarding the force-fail re-run expands to '[ -ne 0 ]', so every ECC key test prints '[: -ne: unary operator expected' to stderr. The condition still evaluates false, so the re-run is correctly skipped and results are unaffected, but the noise looks alarming in test output. Initialize the variable with a default, matching what rsa-cmd-test.sh already does. --- scripts/cmd_test/ecc-cmd-test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/cmd_test/ecc-cmd-test.sh b/scripts/cmd_test/ecc-cmd-test.sh index cac88e53..f8e97d70 100755 --- a/scripts/cmd_test/ecc-cmd-test.sh +++ b/scripts/cmd_test/ecc-cmd-test.sh @@ -40,6 +40,8 @@ echo "This is test data for ECC signing and verification." > ecc_outputs/test_da CURVES=("prime256v1" "secp384r1" "secp521r1") PROVIDER_NAMES=("libwolfprov" "default") +WOLFPROV_FORCE_FAIL=${WOLFPROV_FORCE_FAIL:-0} + # Function to validate key validate_key() { local curve=$1