1
0
Fork 0

Adding debian version 1.9.14-2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-05 13:10:41 +01:00
parent 49fcf7364a
commit 10d5974907
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
26 changed files with 956 additions and 0 deletions

9
debian/tests/check-service vendored Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
if ! systemctl is-active haveged; then
echo "haveged service is not active"
systemctl status haveged
exit 1
fi
exit 0

9
debian/tests/control vendored Normal file
View file

@ -0,0 +1,9 @@
Tests: check-service
Tests: run-tests
Restrictions: rw-build-tree, allow-stderr
Depends: @builddeps@, @
Tests: dieharder
Restrictions: skippable, allow-stderr
Depends: @, grep, dieharder

40
debian/tests/dieharder vendored Executable file
View file

@ -0,0 +1,40 @@
#!/bin/sh
if dpkg-architecture -i s390x; then
echo "dieharder tests are broken on s390x, skipping tests"
return 77
fi
set -e
# Limit which tests are run, some aren't reliable and some take too long
TESTS="0 1 2 3 4 8 9 10 11 12 13 15 16 100 101 202 203 204 205 206 207 208 209"
# Notes on tests we don't run:
# 5, 6, 7: marked as "Suspect" in dieharder -l
# 14: marked as "Do Not Use" in dieharder -l
# 102: buggy test that prints no output
# 200: always fails with "Error: Can only test distribution of positive ntuples."
# 201: always fails
DATA=$(mktemp)
RESULTS=$(mktemp)
cleanup()
{
rm -f $RESULTS
rm -f $DATA
}
trap cleanup EXIT
# Generate 4G of random data
haveged -n 0 | dd of=$DATA bs=1k count=4096k
for d in $TESTS; do
echo "Running test #$d"
echo "Test started at: $(date)"
dieharder -d $d -g 201 -f $DATA | tee $RESULTS
echo "Test ended at: $(date)"
echo ""
(! grep -w -q 'FAILED' $RESULTS)
done

20
debian/tests/run-tests vendored Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
set -ex
# rebuild, enabling the nist tests
dh_auto_clean
dh_autoreconf_clean
dh_autoreconf
dh_auto_configure -- --enable-nistest=yes
# test installed haveged, not built one
rm -f src/haveged
# we unfortunately can't use a symlink to also test apparmor confinement,
# because our apparmor profile doesn't let us rw to *any* files, and by
# default haveged writes its random data to './sample'; so just copy
# the installed file into the build tree, for the ent/nist tests to use
cp /usr/sbin/haveged src/haveged
make -C ent check
make -C nist check