diff --git a/bin/tests/system/kasp.sh b/bin/tests/system/kasp.sh index bc8cc9e0f5..4177f20802 100644 --- a/bin/tests/system/kasp.sh +++ b/bin/tests/system/kasp.sh @@ -34,6 +34,8 @@ SHA256="R16NojROxtxH/xbDl//ehDsHm5DjWTQ2YXV+hGC2iBY=" VIEW1="YPfMoAk6h+3iN8MDRQC004iSNHY=" VIEW2="4xILSZQnuO1UKubXHkYUsvBRPu8=" VIEW3="C1Azf+gGPMmxrUg/WQINP6eV9Y0=" +MINDEPTH=1 +MAXDEPTH=3 ############################################################################### # Key properties # @@ -179,7 +181,7 @@ get_keyids() { _zone=$2 _regex="K${_zone}.+*+*.key" - find "${_dir}" -mindepth 1 -maxdepth 3 -name "${_regex}" | sed "s,.*/K${_zone}.+\([0-9]\{3\}\)+\([0-9]\{5\}\).key,\2," + find "${_dir}" -mindepth $MINDEPTH -maxdepth $MAXDEPTH -name "${_regex}" | sed "s,.*/K${_zone}.+\([0-9]\{3\}\)+\([0-9]\{5\}\).key,\2," } # By default log errors and don't quit immediately. diff --git a/bin/tests/system/kasp/tests.sh b/bin/tests/system/kasp/tests.sh index 3c2484cc4d..c95c607a5f 100644 --- a/bin/tests/system/kasp/tests.sh +++ b/bin/tests/system/kasp/tests.sh @@ -142,7 +142,11 @@ key_clear "KEY4" $KEYGEN -G -k "$POLICY" "$ZONE" >"keygen.out.$POLICY.test$n" 2>/dev/null || ret=1 lines=$(wc -l <"keygen.out.$POLICY.test$n") test "$lines" -eq $NUM_KEYS || log_error "wrong number of keys created for policy default: $lines" +# Temporarily adjust max search depth for this test +MAXDEPTH=1 ids=$(get_keyids "$DIR" "$ZONE") +MAXDEPTH=3 +echo_i "found in dir $DIR for zone $ZONE the following keytags: $ids" for id in $ids; do check_key "KEY1" "$id" test "$ret" -eq 0 && key_save KEY1