Sat Dec 10 17:50:19 2011 UTC ()
Give my slow, old hardware more time to complete bsize_ffactor.


(skrll)
diff -r1.2 -r1.3 src/tests/lib/libc/db/t_db.sh

cvs diff -r1.2 -r1.3 src/tests/lib/libc/db/t_db.sh (expand / switch to unified diff)

--- src/tests/lib/libc/db/t_db.sh 2011/01/08 05:33:34 1.2
+++ src/tests/lib/libc/db/t_db.sh 2011/12/10 17:50:19 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: t_db.sh,v 1.2 2011/01/08 05:33:34 pgoyette Exp $ 1# $NetBSD: t_db.sh,v 1.3 2011/12/10 17:50:19 skrll Exp $
2# 2#
3# Copyright (c) 2008 The NetBSD Foundation, Inc. 3# Copyright (c) 2008 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# Redistribution and use in source and binary forms, with or without 6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions 7# modification, are permitted provided that the following conditions
8# are met: 8# are met:
9# 1. Redistributions of source code must retain the above copyright 9# 1. Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer. 10# notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright 11# 2. Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the 12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution. 13# documentation and/or other materials provided with the distribution.
14# 14#
@@ -791,26 +791,27 @@ byte_orders_hash_body() @@ -791,26 +791,27 @@ byte_orders_hash_body()
791h_bsize_ffactor() 791h_bsize_ffactor()
792{ 792{
793 bsize=$1 793 bsize=$1
794 ffactor=$2 794 ffactor=$2
795 795
796 echo "bucketsize $bsize, fill factor $ffactor" 796 echo "bucketsize $bsize, fill factor $ffactor"
797 atf_check -o file:exp "$(prog)" "-ibsize=$bsize,\ 797 atf_check -o file:exp "$(prog)" "-ibsize=$bsize,\
798ffactor=$ffactor,nelem=25000,cachesize=65536" hash in 798ffactor=$ffactor,nelem=25000,cachesize=65536" hash in
799} 799}
800 800
801atf_test_case bsize_ffactor 801atf_test_case bsize_ffactor
802bsize_ffactor_head() 802bsize_ffactor_head()
803{ 803{
 804 atf_set "timeout" "360"
804 atf_set "descr" "Checks hash database with various" \ 805 atf_set "descr" "Checks hash database with various" \
805 "bucketsizes and fill factors" 806 "bucketsizes and fill factors"
806} 807}
807bsize_ffactor_body() 808bsize_ffactor_body()
808{ 809{
809 TMPDIR="$(pwd)/db_dir"; export TMPDIR 810 TMPDIR="$(pwd)/db_dir"; export TMPDIR
810 mkdir ${TMPDIR} 811 mkdir ${TMPDIR}
811 812
812 echo $SEVEN_SEVEN | 813 echo $SEVEN_SEVEN |
813 awk '{ 814 awk '{
814 for (i = 1; i <= 10000; ++i) { 815 for (i = 1; i <= 10000; ++i) {
815 if (i % 34) 816 if (i % 34)
816 s = substr($0, 1, i % 34); 817 s = substr($0, 1, i % 34);