summaryrefslogtreecommitdiffstats
path: root/ent/test.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-11-10 15:32:30 +0100
committerDaniel Baumann <daniel@debian.org>2024-11-10 15:32:30 +0100
commit887c3b877f16e5e1b834e008306afe6677458225 (patch)
treedf0289cd7c79553a1d81310876cf48083db44239 /ent/test.sh
parentAdding upstream version 1.9.14. (diff)
downloadhaveged-887c3b877f16e5e1b834e008306afe6677458225.tar.xz
haveged-887c3b877f16e5e1b834e008306afe6677458225.zip
Adding upstream version 1.9.19.upstream/1.9.19upstream
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'ent/test.sh')
-rwxr-xr-xent/test.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/ent/test.sh b/ent/test.sh
new file mode 100755
index 0000000..59f8a82
--- /dev/null
+++ b/ent/test.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+runs=10
+for i in $(seq -w "$runs"); do
+ ./entest -vf <(../src/haveged -n 16384k -f -) > "${i}_entest.log"
+done
+
+fails=$(grep Fail ./*_entest.log | wc -l)
+
+if (( fails > 2 )); then
+ echo "Total $fails in $runs"
+ grep Fail ./*_entest.log
+ echo "Marking the whole test as failed"
+ exit 255
+else
+ echo "Test passed!"
+fi
+