From 4b2911a45adf8a1b89e1ea409a386421f0274f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 21 Nov 2019 14:45:41 +0800 Subject: [PATCH] Reduce the minimal numbers of days in jitter test to 5 --- bin/tests/system/autosign/tests.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh index 9a654f2716..84a2f902fb 100755 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -72,12 +72,16 @@ checkjitter () { _expiretimes=$(freq "$_file" | awk '{print $1}') _count=0 - # Check if we have at least 8 days + # Check if we have at least 5 days + # This number has been tuned for `sig-validity-interval 10 2`, as + # 1. 1. signature expiration dates should be spread out across at most 8 (10-2) days + # 2. we remove first and last day to remove frequency outlier, we are left with 6 (8-2) days + # 3. we substract one more day to allow test pass on day boundaries, etc. leaving us with 5 (6-1) days for _num in $_expiretimes do _count=$((_count+1)) done - if [ "$_count" -lt 8 ]; then + if [ "$_count" -lt 5 ]; then echo_i "error: not enough categories" return 1 fi