better system test entropy

- use /dev/urandom in gitlab CI
- use genrandom to get 4k of data instead of 800 bytes
- set this value as RANDOMSIZE in conf.sh
This commit is contained in:
Evan Hunt
2018-11-17 01:27:06 +00:00
parent aa2f71e3a5
commit 19aaecafeb
48 changed files with 54 additions and 46 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ stages:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
- autoreconf -fi
script:
- ./configure --enable-developer --with-libtool --disable-static --with-cmocka --with-libidn2 --prefix=$HOME/.local --without-make-clean "${EXTRA_CONFIGURE}" || cat config.log
- ./configure --enable-developer --with-randomdev=/dev/urandom --with-libtool --disable-static --with-cmocka --with-libidn2 --prefix=$HOME/.local --without-make-clean "${EXTRA_CONFIGURE}" || cat config.log
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
artifacts:
paths:
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
. ./clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -16,7 +16,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
touch empty
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+4
View File
@@ -72,6 +72,10 @@ SAMPLEUPDATE=$TOP/lib/samples/sample-update
# we don't want a KRB5_CONFIG setting breaking the tests
KRB5_CONFIG=/dev/null
# the amount of fake "entropy" to generate with GENRANDOM in
# system tests
RANDOMSIZE=4096
# The "stress" test is not run by default since it creates enough
# load on the machine to make it unusable to other users.
# The "dialup", "delzone", and "dupsigs" tests are also not run by
+4
View File
@@ -79,6 +79,10 @@ PIPEQUERIES=$TOP/Build/$VSCONF/pipequeries@EXEEXT@
# we don't want a KRB5_CONFIG setting breaking the tests
KRB5_CONFIG=NUL
# the amount of fake "entropy" to generate with GENRANDOM in
# system tests
RANDOMSIZE=4096
# The "stress" test is not run by default since it creates enough
# load on the machine to make it unusable to other users.
# The "dialup", "delzone", and "dupsigs" tests are also not run by
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
$DDNSCONFGEN -q -r $RANDFILE -z example.nil > ns1/ddns.key
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@ SYSTEMTESTTOP=..
test -f clean.sh && $SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
+1 -1
View File
@@ -12,6 +12,6 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cd ns1 && $SHELL sign.sh
+1 -1
View File
@@ -12,6 +12,6 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cd ns1 && $SHELL sign.sh
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named1.conf.in ns1/named.conf
copy_setports ns2/named1.conf.in ns2/named.conf
+1 -1
View File
@@ -12,6 +12,6 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cd ns1 && $SHELL sign.sh
+1 -1
View File
@@ -12,7 +12,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cp ns1/root.db.in ns1/root.db
rm -f ns1/root.db.signed
+1 -1
View File
@@ -18,4 +18,4 @@ copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
copy_setports ns3/named.conf.in ns3/named.conf
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
$SHELL clean.sh
+1 -1
View File
@@ -10,7 +10,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL ./clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
pzone=parent.nil
czone=child.parent.nil
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named1.conf.in ns1/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
$SHELL clean.sh
copy_setports ns1/named.conf.in ns1/named.conf
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cp ns4/tld1.db ns4/tld.db
cp ns6/to-be-removed.tld.db.in ns6/to-be-removed.tld.db
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
$SHELL ../genzone.sh 2 >ns2/nil.db
$SHELL ../genzone.sh 2 >ns2/other.db
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -70,7 +70,7 @@ for NM in '' -2 -given -disabled -passthru -no-op -nodata -nxdomain -cname -wild
done
# sign the root and a zone in ns2
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
# $1=directory, $2=domain name, $3=input zone file, $4=output file
signzone () {
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
if $BIGKEY > /dev/null 2>&1
then
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
if $KEYGEN -q -a RSAMD5 -b 1024 -n zone -r $RANDFILE foo > /dev/null 2>&1
then
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -14,4 +14,4 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
+1 -1
View File
@@ -23,6 +23,6 @@ rm -f tmp
copy_setports ns4/named.conf.in ns4/named.conf
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cd ns3 && $SHELL -e sign.sh
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=${SYSTEMTESTTOP:=..}
. $SYSTEMTESTTOP/conf.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
prog=$0
+1 -1
View File
@@ -14,6 +14,6 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cd ns1 && $SHELL setup.sh
+1 -1
View File
@@ -16,4 +16,4 @@ $SHELL clean.sh
copy_setports ns1/named.conf.in ns1/named.conf
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
+1 -1
View File
@@ -12,7 +12,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -24,7 +24,7 @@ copy_setports ns3/named.conf.in ns3/named.conf
#
# SIG(0) required cryptographic support which may not be configured.
#
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
keyname=`$KEYGEN -q -r $RANDFILE -n HOST -a RSASHA1 -b 1024 -T KEY sig0.example2 2>/dev/null | $D2U`
if test -n "$keyname"
then
+1 -1
View File
@@ -14,6 +14,6 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
(cd zones && $SHELL genzones.sh)
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
cp -f ns2/example1.db ns2/example.db
rm -f ns2/external/K*
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+1 -1
View File
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
test -r $RANDFILE || $GENRANDOM 800 $RANDFILE
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf