Module Name: src
Committed By: martin
Date: Thu Mar 12 14:10:59 UTC 2020
Modified Files:
src/tests/lib/libc/db: t_db.sh
Log Message:
bsize_torture: skip bigger page size tests if space in the database
directory is limited (numbers pulled out of thin air).
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/db/t_db.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/db/t_db.sh
diff -u src/tests/lib/libc/db/t_db.sh:1.8 src/tests/lib/libc/db/t_db.sh:1.9
--- src/tests/lib/libc/db/t_db.sh:1.8 Thu Mar 12 14:03:42 2020
+++ src/tests/lib/libc/db/t_db.sh Thu Mar 12 14:10:59 2020
@@ -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 @@ bsize_torture_body()
{
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