diff options
| author | Tom Yu <tlyu@mit.edu> | 2012-07-12 14:26:15 -0400 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2012-07-12 14:49:02 -0400 |
| commit | 18a378eb43a7a5a5e14a7e6c3b6504fe32804781 (patch) | |
| tree | a5c2ce7fd48298b223c97e9ce84d909632fab96e /src/plugins/kdb/db2/libdb2 | |
| parent | 666be8d6bd1063774c4260e2119ba4aed8fbfa9f (diff) | |
| download | krb5-18a378eb43a7a5a5e14a7e6c3b6504fe32804781.tar.gz krb5-18a378eb43a7a5a5e14a7e6c3b6504fe32804781.tar.xz krb5-18a378eb43a7a5a5e14a7e6c3b6504fe32804781.zip | |
Handle huge /bin directories in libdb2 test
The test suite for libdb2 uses /bin as a source of filenames and
contents for insertion into databases. Fedora 17 (and possibly other
OSes) have /bin symlinked to /usr/bin, which can vastly increase the
number of files found, exceeding some limits of the test databases.
Truncate this list of files at 100 to prevent this problem.
ticket: 7201 (new)
status: pullup
target_version: 1.10.3
Diffstat (limited to 'src/plugins/kdb/db2/libdb2')
| -rw-r--r-- | src/plugins/kdb/db2/libdb2/test/run.test | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/kdb/db2/libdb2/test/run.test b/src/plugins/kdb/db2/libdb2/test/run.test index d2d54e94b..7d9f0feb7 100644 --- a/src/plugins/kdb/db2/libdb2/test/run.test +++ b/src/plugins/kdb/db2/libdb2/test/run.test @@ -11,6 +11,7 @@ main() TMP1=${TMPDIR-.}/t1 TMP2=${TMPDIR-.}/t2 TMP3=${TMPDIR-.}/t3 + BINFILES=${TMPDIR-.}/binfiles if [ \! -z "$WORDLIST" -a -f "$WORDLIST" ]; then DICT=$WORDLIST @@ -32,6 +33,7 @@ main() dictsize=`wc -l < $DICT` bindir=/bin/. + find $bindir -type f -exec test -r {} \; -print | head -100 > $BINFILES if [ $# -eq 0 ]; then for t in 1 2 3 4 5 6 7 8 9 10 11 12 13 20 40 41; do @@ -64,7 +66,7 @@ main() shift done fi - rm -f $TMP1 $TMP2 $TMP3 + rm -f $TMP1 $TMP2 $TMP3 $BINFILES exit 0 } @@ -154,10 +156,10 @@ test3() { echo "Test 3: hash: small key, big data pairs" rm -f $TMP1 - (find $bindir -type f -exec test -r {} \; -print | xargs cat) > $TMP1 + xargs cat < $BINFILES > $TMP1 for type in hash; do rm -f $TMP2 $TMP3 - for i in `find $bindir -type f -exec test -r {} \; -print`; do + for i in `cat $BINFILES`; do echo p echo k$i echo D$i @@ -176,7 +178,7 @@ test3() echo " page size $psize" for type in btree; do rm -f $TMP2 $TMP3 - for i in `find $bindir -type f -exec test -r {} \; -print`; do + for i in `cat $BINFILES`; do echo p echo k$i echo D$i @@ -193,11 +195,10 @@ test3() done echo "Test 3: recno: big data pairs" rm -f $TMP2 $TMP3 - find $bindir -type f -exec test -r {} \; -print | awk '{ ++i; printf("p\nk%d\nD%s\ng\nk%d\n", i, $0, i); - }' > $TMP2 + }' < $BINFILES > $TMP2 for psize in 512 16384 65536; do echo " page size $psize" $PROG -i psize=$psize -o $TMP3 recno $TMP2 |
