Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/db bsize_torture: skip bigger page size tests...



details:   https://anonhg.NetBSD.org/src/rev/8304acab82b7
branches:  trunk
changeset: 1008127:8304acab82b7
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Mar 12 14:10:59 2020 +0000

description:
bsize_torture: skip bigger page size tests if space in the database
directory is limited (numbers pulled out of thin air).

diffstat:

 tests/lib/libc/db/t_db.sh |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 8099e18e40f1 -r 8304acab82b7 tests/lib/libc/db/t_db.sh
--- a/tests/lib/libc/db/t_db.sh Thu Mar 12 14:03:42 2020 +0000
+++ b/tests/lib/libc/db/t_db.sh Thu Mar 12 14:10:59 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_db.sh,v 1.8 2020/03/12 14:03:42 martin Exp $
+# $NetBSD: t_db.sh,v 1.9 2020/03/12 14:10:59 martin Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -919,7 +919,15 @@
 {
        TMPDIR="$(pwd)/db_dir"; export TMPDIR
        mkdir ${TMPDIR}
-       for i in 2048 4096 8192 16384 32768 65536
+       AVAIL=$( df -m ${TMPDIR} | awk '{if (int($4) > 0) print $4}' )
+       LIST="2048 4096 8192 16384"
+       if [ $AVAIL -gt 30 ]; then
+               LIST="$LIST 32768"
+       fi
+       if [ $AVAIL -gt 60 ]; then
+               LIST="$LIST 65536"
+       fi
+       for i in $LIST
        do
                atf_check "$(prog_lfsr)" $i
        done



Home | Main Index | Thread Index | Old Index