From fdd926d7cbca53ae91ae2f83ec5690eb2be2ea23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Tue, 30 Jul 2019 21:08:40 +0200 Subject: [PATCH] Make "autosign" system test work with BusyBox awk The BusyBox version of awk treats some variables which other awk implementations consider to be decimal values as octal values. This intermittently breaks key event interval calculations in the "autosign" system test, trigger false positives for it. Prevent the problem from happening by stripping leading zeros from the affected awk variables. (cherry picked from commit ad008f7dbfe1861d8b67cd223b30c8d602991f22) --- bin/tests/system/autosign/tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh index 50ea0bf2fa..8b8e5ae8a3 100755 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -1168,7 +1168,7 @@ status=`expr $status + $ret` # event scheduled is within 10 seconds of expected interval. check_interval () { awk '/next key event/ {print $2 ":" $9}' $1/named.run | - sed 's/\.//g' | + sed -e 's/\.//g' -e 's/:0\{1,4\}/:/g' | awk -F: ' { x = ($6+ $5*60000 + $4*3600000) - ($3+ $2*60000 + $1*3600000);