diff --git a/bin/tests/system/masterformat/clean.sh b/bin/tests/system/masterformat/clean.sh index 80289e9267..82502fc430 100755 --- a/bin/tests/system/masterformat/clean.sh +++ b/bin/tests/system/masterformat/clean.sh @@ -26,7 +26,7 @@ rm -f ./ns2/formerly-text.db rm -f ./ns2/db-* rm -f ./ns2/large.bk rm -f ./ns3/example.db.map ./ns3/dynamic.db.map -rm -f ./baseline.txt ./text.1 ./text.2 ./raw.1 ./raw.2 ./map.1 ./map.2 ./map.5 ./text.5 ./badmap +rm -f ./baseline.txt ./text.* ./raw.* ./map.* ./badmap rm -f ./ns1/Ksigned.* ./ns1/dsset-signed. ./ns1/signed.db.signed rm -f ./rndc.out rm -f ./ns*/named.lock diff --git a/bin/tests/system/masterformat/tests.sh b/bin/tests/system/masterformat/tests.sh index 0f569fd059..364a0d266d 100755 --- a/bin/tests/system/masterformat/tests.sh +++ b/bin/tests/system/masterformat/tests.sh @@ -331,5 +331,25 @@ n=$((n+1)) [ $ret -eq 0 ] || echo_i "failed" status=$((status+ret)) +# The following test is disabled by default because it is very slow. +# It fails on Windows, because a single read() call (specifically +# the one in isc_file_mmap()) cannot process more than INT_MAX (2^31) +# bytes of data. +if [ -n "${TEST_LARGE_MAP}" ]; then + echo_i "checking map file size > 2GB can be loaded ($n)" + ret=0 + $PERL ../../startperf/mkzonefile.pl test 9000000 > text.$n + # convert to map + $CHECKZONE -D -f text -F map -o map.$n test text.$n > /dev/null || ret=1 + # check map file size is over 2GB to ensure the test is valid + size=$(ls -l map.$n | awk '{print $5}') + [ "$size" -gt 2147483648 ] || ret=1 + # convert back to text + $CHECKZONE -f map test map.$n > /dev/null || ret=1 + n=$((n+1)) + [ $ret -eq 0 ] || echo_i "failed" + status=$((status+ret)) +fi + echo_i "exit status: $status" [ $status -eq 0 ] || exit 1