156038Sbostic#!/bin/sh - 256038Sbostic# 356038Sbostic# Copyright (c) 1992 The Regents of the University of California. 456038Sbostic# All rights reserved. 556038Sbostic# 656038Sbostic# %sccs.include.redist.sh% 756038Sbostic# 8*56999Sbostic# @(#)run.test 5.11 (Berkeley) 12/04/92 956038Sbostic# 1056038Sbostic 1156038Sbostic# db regression tests 1256038Sbostic 1356038Sbosticmain() 1456038Sbostic{ 1556038Sbostic DICT=/usr/share/dict/words 1656058Sbostic PROG=obj/dbtest 1756038Sbostic TMP1=t1 1856038Sbostic TMP2=t2 1956038Sbostic TMP3=t3 2056038Sbostic 2156038Sbostic test1 2256038Sbostic test2 2356038Sbostic test3 2456038Sbostic test4 2556050Sbostic test5 2656050Sbostic test6 2756058Sbostic test7 2856085Sbostic test8 2956765Sbostic test10 30*56999Sbostic test11 31*56999Sbostic test20 3256038Sbostic rm -f $TMP1 $TMP2 $TMP3 33*56999Sbostic exit 0 3456038Sbostic} 3556038Sbostic 3656038Sbostic# Take the first hundred entries in the dictionary, and make them 3756038Sbostic# be key/data pairs. 3856038Sbostictest1() 3956038Sbostic{ 4056050Sbostic printf "Test 1: btree, hash: small key, small data pairs\n" 4156085Sbostic sed 200q $DICT > $TMP1 4256038Sbostic for type in btree hash; do 4356038Sbostic rm -f $TMP2 $TMP3 4456038Sbostic for i in `sed 200q $DICT`; do 4556038Sbostic printf "p\nk%s\nd%s\ng\nk%s\n" $i $i $i 4656038Sbostic done > $TMP2 4756058Sbostic $PROG -o $TMP3 $type $TMP2 4856038Sbostic if (cmp -s $TMP1 $TMP3) ; then 4956038Sbostic else 5056038Sbostic printf "test1: type %s: failed\n" $type 5156038Sbostic exit 1 5256038Sbostic fi 5356038Sbostic done 5456050Sbostic printf "Test 1: recno: small key, small data pairs\n" 5556038Sbostic rm -f $TMP2 $TMP3 5656038Sbostic sed 200q $DICT | 5756058Sbostic awk '{ 5856058Sbostic ++i; 5956058Sbostic printf("p\nk%d\nd%s\ng\nk%d\n", i, $0, i); 6056058Sbostic }' > $TMP2 6156058Sbostic $PROG -o $TMP3 recno $TMP2 6256038Sbostic if (cmp -s $TMP1 $TMP3) ; then 6356038Sbostic else 6456038Sbostic printf "test1: type recno: failed\n" 6556038Sbostic exit 1 6656038Sbostic fi 6756038Sbostic} 6856038Sbostic 6956038Sbostic# Take the first hundred entries in the dictionary, and give them 7056038Sbostic# each a medium size data entry. 7156038Sbostictest2() 7256038Sbostic{ 7356050Sbostic printf "Test 2: btree, hash: small key, medium data pairs\n" 7456038Sbostic mdata=abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz 7556038Sbostic echo $mdata | 7656058Sbostic awk '{ for (i = 1; i < 201; ++i) print $0 }' > $TMP1 7756038Sbostic for type in hash btree; do 7856038Sbostic rm -f $TMP2 $TMP3 7956038Sbostic for i in `sed 200q $DICT`; do 8056038Sbostic printf "p\nk%s\nd%s\ng\nk%s\n" $i $mdata $i 8156038Sbostic done > $TMP2 8256058Sbostic $PROG -o $TMP3 $type $TMP2 8356038Sbostic if (cmp -s $TMP1 $TMP3) ; then 8456038Sbostic else 8556038Sbostic printf "test2: type %s: failed\n" $type 8656038Sbostic exit 1 8756038Sbostic fi 8856038Sbostic done 8956050Sbostic printf "Test 2: recno: small key, medium data pairs\n" 9056038Sbostic rm -f $TMP2 $TMP3 9156038Sbostic echo $mdata | 9256058Sbostic awk '{ for (i = 1; i < 201; ++i) 9356058Sbostic printf("p\nk%d\nd%s\ng\nk%d\n", i, $0, i); 9456058Sbostic }' > $TMP2 9556058Sbostic $PROG -o $TMP3 recno $TMP2 9656038Sbostic if (cmp -s $TMP1 $TMP3) ; then 9756038Sbostic else 9856038Sbostic printf "test2: type recno: failed\n" 9956038Sbostic exit 1 10056038Sbostic fi 10156038Sbostic} 10256038Sbostic 10356038Sbostic# Insert the programs in /bin with their paths as their keys. 10456038Sbostictest3() 10556038Sbostic{ 10656050Sbostic printf "Test 3: btree, hash: small key, big data pairs\n" 10756038Sbostic rm -f $TMP1 10856038Sbostic (find /bin -type f -print | xargs cat) > $TMP1 10956038Sbostic for type in hash btree; do 11056038Sbostic rm -f $TMP2 $TMP3 11156038Sbostic for i in `find /bin -type f -print`; do 11256038Sbostic printf "p\nk%s\nD%s\ng\nk%s\n" $i $i $i 11356038Sbostic done > $TMP2 11456058Sbostic $PROG -o $TMP3 $type $TMP2 11556038Sbostic if (cmp -s $TMP1 $TMP3) ; then 11656038Sbostic else 11756385Sbostic printf "test3: type %s: failed\n" $type 11856038Sbostic exit 1 11956038Sbostic fi 12056038Sbostic done 12156050Sbostic printf "Test 3: recno: big data pairs\n" 12256038Sbostic rm -f $TMP2 $TMP3 12356038Sbostic find /bin -type f -print | 12456058Sbostic awk '{ 12556058Sbostic ++i; 12656058Sbostic printf("p\nk%d\nD%s\ng\nk%d\n", i, $0, i); 12756058Sbostic }' > $TMP2 12856058Sbostic $PROG -o $TMP3 recno $TMP2 12956038Sbostic if (cmp -s $TMP1 $TMP3) ; then 13056038Sbostic else 13156038Sbostic printf "test3: type recno: failed\n" 13256038Sbostic exit 1 13356038Sbostic fi 13456038Sbostic} 13556038Sbostic 13656038Sbostic# Do random recno entries. 13756038Sbostictest4() 13856038Sbostic{ 13956050Sbostic printf "Test 4: recno: random entries\n" 14056050Sbostic echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" | 14156058Sbostic awk '{ 14256058Sbostic for (i = 37; i <= 37 + 88 * 17; i += 17) 14356058Sbostic printf("input key %d: %.*s\n", i, i % 41, $0); 14456058Sbostic for (i = 1; i <= 15; ++i) 14556058Sbostic printf("input key %d: %.*s\n", i, i % 41, $0); 14656058Sbostic for (i = 19234; i <= 19234 + 61 * 27; i += 27) 14756058Sbostic printf("input key %d: %.*s\n", i, i % 41, $0); 14856058Sbostic exit 14956058Sbostic }' > $TMP1 15056058Sbostic rm -f TMP2 $TMP3 15156058Sbostic cat $TMP1 | 15256058Sbostic awk 'BEGIN { 15356058Sbostic i = 37; 15456058Sbostic incr = 17; 15556058Sbostic } 15656058Sbostic { 15756058Sbostic printf("p\nk%d\nd%s\n", i, $0); 15856058Sbostic if (i == 19234 + 61 * 27) 15956058Sbostic exit; 16056058Sbostic if (i == 37 + 88 * 17) { 16156058Sbostic i = 1; 16256058Sbostic incr = 1; 16356058Sbostic } else if (i == 15) { 16456058Sbostic i = 19234; 16556058Sbostic incr = 27; 16656058Sbostic } else 16756058Sbostic i += incr; 16856058Sbostic } 16956058Sbostic END { 17056038Sbostic for (i = 37; i <= 37 + 88 * 17; i += 17) 17156058Sbostic printf("g\nk%d\n", i); 17256038Sbostic for (i = 1; i <= 15; ++i) 17356058Sbostic printf("g\nk%d\n", i); 17456038Sbostic for (i = 19234; i <= 19234 + 61 * 27; i += 27) 17556058Sbostic printf("g\nk%d\n", i); 17656058Sbostic }' > $TMP2 17756058Sbostic $PROG -o $TMP3 recno $TMP2 17856038Sbostic if (cmp -s $TMP1 $TMP3) ; then 17956038Sbostic else 18056038Sbostic printf "test4: type recno: failed\n" 18156038Sbostic exit 1 18256038Sbostic fi 18356038Sbostic} 18456050Sbostic 18556050Sbostic# Do reverse order recno entries. 18656050Sbostictest5() 18756050Sbostic{ 18856050Sbostic printf "Test 5: recno: reverse order entries\n" 18956050Sbostic echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" | 19056058Sbostic awk ' { 19156058Sbostic for (i = 1500; i; --i) 19256058Sbostic printf("input key %d: %.*s\n", i, i % 34, $0); 19356058Sbostic exit; 19456058Sbostic }' > $TMP1 19556050Sbostic rm -f TMP2 $TMP3 19656058Sbostic cat $TMP1 | 19756058Sbostic awk 'BEGIN { 19856058Sbostic i = 1500; 19956058Sbostic } 20056058Sbostic { 20156058Sbostic printf("p\nk%d\nd%s\n", i, $0); 20256058Sbostic --i; 20356058Sbostic } 20456058Sbostic END { 20556058Sbostic for (i = 1500; i; --i) 20656058Sbostic printf("g\nk%d\n", i); 20756058Sbostic }' > $TMP2 20856058Sbostic $PROG -o $TMP3 recno $TMP2 20956050Sbostic if (cmp -s $TMP1 $TMP3) ; then 21056050Sbostic else 21156050Sbostic printf "test5: type recno: failed\n" 21256050Sbostic exit 1 21356050Sbostic fi 21456050Sbostic} 21556038Sbostic 21656050Sbostic# Do alternating order recno entries. 21756050Sbostictest6() 21856050Sbostic{ 21956050Sbostic printf "Test 6: recno: alternating order entries\n" 22056050Sbostic echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" | 22156058Sbostic awk ' { 22256058Sbostic for (i = 1; i < 1200; i += 2) 22356058Sbostic printf("input key %d: %.*s\n", i, i % 34, $0); 22456058Sbostic for (i = 2; i < 1200; i += 2) 22556058Sbostic printf("input key %d: %.*s\n", i, i % 34, $0); 22656058Sbostic exit; 22756058Sbostic }' > $TMP1 22856050Sbostic rm -f TMP2 $TMP3 22956058Sbostic cat $TMP1 | 23056058Sbostic awk 'BEGIN { 23156058Sbostic i = 1; 23256058Sbostic even = 0; 23356058Sbostic } 23456058Sbostic { 23556058Sbostic printf("p\nk%d\nd%s\n", i, $0); 23656058Sbostic i += 2; 23756058Sbostic if (i >= 1200) { 23856058Sbostic if (even == 1) 23956058Sbostic exit; 24056058Sbostic even = 1; 24156058Sbostic i = 2; 24256050Sbostic } 24356058Sbostic } 24456058Sbostic END { 24556058Sbostic for (i = 1; i < 1200; ++i) 24656058Sbostic printf("g\nk%d\n", i); 24756058Sbostic }' > $TMP2 24856058Sbostic $PROG -o $TMP3 recno $TMP2 24956050Sbostic sort -o $TMP1 $TMP1 25056050Sbostic sort -o $TMP3 $TMP3 25156050Sbostic if (cmp -s $TMP1 $TMP3) ; then 25256050Sbostic else 25356050Sbostic printf "test6: type recno: failed\n" 25456050Sbostic exit 1 25556050Sbostic fi 25656050Sbostic} 25756050Sbostic 25856058Sbostic# Delete cursor record 25956058Sbostictest7() 26056058Sbostic{ 26156058Sbostic printf "Test 7: btree, recno: delete cursor record\n" 26256058Sbostic echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" | 26356058Sbostic awk '{ 26456058Sbostic for (i = 1; i <= 120; ++i) 26556058Sbostic printf("%05d: input key %d: %s\n", i, i, $0); 26656058Sbostic printf("%05d: input key %d: %s\n", 120, 120, $0); 26756058Sbostic printf("get failed, no such key\n"); 26856058Sbostic printf("%05d: input key %d: %s\n", 1, 1, $0); 26956058Sbostic printf("%05d: input key %d: %s\n", 2, 2, $0); 27056058Sbostic exit; 27156058Sbostic }' > $TMP1 27256058Sbostic rm -f TMP2 $TMP3 27356763Sbostic 27456058Sbostic for type in btree recno; do 27556058Sbostic cat $TMP1 | 27656058Sbostic awk '{ 27756058Sbostic if (i == 120) 27856058Sbostic exit; 27956058Sbostic printf("p\nk%d\nd%s\n", ++i, $0); 28056058Sbostic } 28156058Sbostic END { 28256058Sbostic printf("fR_NEXT\n"); 28356058Sbostic for (i = 1; i <= 120; ++i) 28456058Sbostic printf("s\n"); 28556058Sbostic printf("fR_CURSOR\ns\nk120\n"); 28656058Sbostic printf("r\nk120\n"); 28756058Sbostic printf("fR_NEXT\ns\n"); 28856058Sbostic printf("fR_CURSOR\ns\nk1\n"); 28956058Sbostic printf("r\nk1\n"); 29056058Sbostic printf("fR_FIRST\ns\n"); 29156058Sbostic }' > $TMP2 29256058Sbostic $PROG -o $TMP3 recno $TMP2 29356058Sbostic if (cmp -s $TMP1 $TMP3) ; then 29456058Sbostic else 29556058Sbostic printf "test7: type $type: failed\n" 29656058Sbostic exit 1 29756058Sbostic fi 29856058Sbostic done 29956058Sbostic} 30056058Sbostic 30156495Sbostic# Make sure that overflow pages are reused. 30256085Sbostictest8() 30356085Sbostic{ 30456495Sbostic printf "Test 8: btree, hash: repeated small key, big data pairs\n" 30556495Sbostic rm -f $TMP1 30656495Sbostic awk 'BEGIN { 30756556Sbostic for (i = 1; i <= 10; ++i) { 30856495Sbostic printf("p\nkkey1\nD/bin/sh\n"); 30956495Sbostic printf("p\nkkey2\nD/bin/csh\n"); 31056554Sbostic if (i % 8 == 0) { 31156554Sbostic printf("c\nkkey2\nD/bin/csh\n"); 31256554Sbostic printf("c\nkkey1\nD/bin/sh\n"); 31356763Sbostic printf("e\t%d of 10 (comparison)\r\n", i); 31456554Sbostic } else 31556763Sbostic printf("e\t%d of 10 \r\n", i); 31656495Sbostic printf("r\nkkey1\nr\nkkey2\n"); 31756495Sbostic } 31856556Sbostic printf("e\n"); 31956556Sbostic printf("eend of test8 run\n"); 32056495Sbostic }' > $TMP1 32156554Sbostic $PROG btree $TMP1 32256554Sbostic $PROG hash $TMP1 32356495Sbostic # No explicit test for success. 32456495Sbostic} 32556495Sbostic 326*56999Sbostic# Test use of cursor flags without initialization 327*56999Sbostictest10() 328*56999Sbostic{ 329*56999Sbostic printf "Test 10: btree, recno: test cursor flag use\n" 330*56999Sbostic echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" | 331*56999Sbostic awk '{ 332*56999Sbostic for (i = 1; i <= 20; ++i) 333*56999Sbostic printf("%05d: input key %d: %s\n", i, i, $0); 334*56999Sbostic exit; 335*56999Sbostic }' > $TMP1 336*56999Sbostic rm -f TMP2 $TMP3 337*56999Sbostic 338*56999Sbostic # Test that R_CURSOR doesn't succeed before cursor initialized 339*56999Sbostic for type in btree recno; do 340*56999Sbostic cat $TMP1 | 341*56999Sbostic awk '{ 342*56999Sbostic if (i == 10) 343*56999Sbostic exit; 344*56999Sbostic printf("p\nk%d\nd%s\n", ++i, $0); 345*56999Sbostic } 346*56999Sbostic END { 347*56999Sbostic printf("fR_CURSOR\nr\nk1\n"); 348*56999Sbostic printf("eR_CURSOR SHOULD HAVE FAILED\n"); 349*56999Sbostic }' > $TMP2 350*56999Sbostic $PROG -o $TMP3 $type $TMP2 > /dev/null 2>&1 351*56999Sbostic if [ -s $TMP3 ] ; then 352*56999Sbostic printf "Test 10: delete: R_CURSOR SHOULD HAVE FAILED\n" 353*56999Sbostic exit 1 354*56999Sbostic fi 355*56999Sbostic done 356*56999Sbostic for type in btree recno; do 357*56999Sbostic cat $TMP1 | 358*56999Sbostic awk '{ 359*56999Sbostic if (i == 10) 360*56999Sbostic exit; 361*56999Sbostic printf("p\nk%d\nd%s\n", ++i, $0); 362*56999Sbostic } 363*56999Sbostic END { 364*56999Sbostic printf("fR_CURSOR\np\nk1\ndsome data\n"); 365*56999Sbostic printf("eR_CURSOR SHOULD HAVE FAILED\n"); 366*56999Sbostic }' > $TMP2 367*56999Sbostic $PROG -o $TMP3 $type $TMP2 > /dev/null 2>&1 368*56999Sbostic if [ -s $TMP3 ] ; then 369*56999Sbostic printf "Test 10: put: R_CURSOR SHOULD HAVE FAILED\n" 370*56999Sbostic exit 1 371*56999Sbostic fi 372*56999Sbostic done 373*56999Sbostic} 374*56999Sbostic 375*56999Sbostic# Test insert in reverse order. 376*56999Sbostictest11() 377*56999Sbostic{ 378*56999Sbostic printf "Test 11: recno: reverse order insert\n" 379*56999Sbostic echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" | 380*56999Sbostic awk '{ 381*56999Sbostic for (i = 1; i <= 779; ++i) 382*56999Sbostic printf("%05d: input key %d: %s\n", i, i, $0); 383*56999Sbostic exit; 384*56999Sbostic }' > $TMP1 385*56999Sbostic rm -f TMP2 $TMP3 386*56999Sbostic 387*56999Sbostic for type in recno; do 388*56999Sbostic cat $TMP1 | 389*56999Sbostic awk '{ 390*56999Sbostic if (i == 0) { 391*56999Sbostic i = 1; 392*56999Sbostic printf("p\nk1\nd%s\n", $0); 393*56999Sbostic printf("%s\n", "fR_IBEFORE"); 394*56999Sbostic } else 395*56999Sbostic printf("p\nk1\nd%s\n", $0); 396*56999Sbostic } 397*56999Sbostic END { 398*56999Sbostic printf("or\n"); 399*56999Sbostic }' > $TMP2 400*56999Sbostic $PROG -o $TMP3 $type $TMP2 401*56999Sbostic if (cmp -s $TMP1 $TMP3) ; then 402*56999Sbostic else 403*56999Sbostic printf "test11: type $type: failed\n" 404*56999Sbostic exit 1 405*56999Sbostic fi 406*56999Sbostic done 407*56999Sbostic} 408*56999Sbostic 40956495Sbostic# Try a variety of bucketsizes and fill factors for hashing 410*56999Sbostictest20() 41156495Sbostic{ 41256085Sbostic printf\ 413*56999Sbostic "Test 20: hash: bucketsize, fill factor; nelem 25000 cachesize 65536\n" 41456085Sbostic awk 'BEGIN { 41556085Sbostic for (i = 1; i <= 10000; ++i) 41656085Sbostic printf("%.*s\n", i % 34, 41756085Sbostic "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg"); 41856085Sbostic }' > $TMP1 41956085Sbostic sed 10000q $DICT | 42056085Sbostic awk '{ 42156085Sbostic ++i; 42256085Sbostic printf("p\nk%s\nd%.*s\n", $0, i % 34, 42356085Sbostic "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg"); 42456085Sbostic }' > $TMP2 42556085Sbostic sed 10000q $DICT | 42656085Sbostic awk '{ 42756085Sbostic ++i; 42856085Sbostic printf("g\nk%s\n", $0); 42956085Sbostic }' >> $TMP2 43056085Sbostic bsize=256 43156085Sbostic for ffactor in 11 14 21; do 43256085Sbostic printf "\tbucketsize %d, fill factor %d\n" $bsize, $ffactor 43356495Sbostic $PROG -o$TMP3 \ 43456085Sbostic -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\ 43556085Sbostic hash $TMP2 43656085Sbostic if (cmp -s $TMP1 $TMP3) ; then 43756085Sbostic else 438*56999Sbostic printf "test20: type hash:\ 43956085Sbosticbsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed\n" 44056085Sbostic exit 1 44156085Sbostic fi 44256085Sbostic done 44356085Sbostic bsize=512 44456085Sbostic for ffactor in 21 28 43; do 44556085Sbostic printf "\tbucketsize %d, fill factor %d\n" $bsize, $ffactor 44656495Sbostic $PROG -o$TMP3 \ 44756085Sbostic -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\ 44856085Sbostic hash $TMP2 44956085Sbostic if (cmp -s $TMP1 $TMP3) ; then 45056085Sbostic else 451*56999Sbostic printf "test20: type hash:\ 45256085Sbosticbsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed\n" 45356085Sbostic exit 1 45456085Sbostic fi 45556085Sbostic done 45656085Sbostic bsize=1024 45756085Sbostic for ffactor in 43 57 85; do 45856085Sbostic printf "\tbucketsize %d, fill factor %d\n" $bsize, $ffactor 45956495Sbostic $PROG -o$TMP3 \ 46056085Sbostic -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\ 46156085Sbostic hash $TMP2 46256085Sbostic if (cmp -s $TMP1 $TMP3) ; then 46356085Sbostic else 464*56999Sbostic printf "test20: type hash:\ 46556085Sbosticbsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed\n" 46656085Sbostic exit 1 46756085Sbostic fi 46856085Sbostic done 46956085Sbostic bsize=2048 47056085Sbostic for ffactor in 85 114 171; do 47156085Sbostic printf "\tbucketsize %d, fill factor %d\n" $bsize, $ffactor 47256495Sbostic $PROG -o$TMP3 \ 47356085Sbostic -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\ 47456085Sbostic hash $TMP2 47556085Sbostic if (cmp -s $TMP1 $TMP3) ; then 47656085Sbostic else 477*56999Sbostic printf "test20: type hash:\ 47856085Sbosticbsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed\n" 47956085Sbostic exit 1 48056085Sbostic fi 48156085Sbostic done 48256085Sbostic bsize=4096 48356085Sbostic for ffactor in 171 228 341; do 48456085Sbostic printf "\tbucketsize %d, fill factor %d\n" $bsize, $ffactor 48556495Sbostic $PROG -o$TMP3 \ 48656085Sbostic -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\ 48756085Sbostic hash $TMP2 48856085Sbostic if (cmp -s $TMP1 $TMP3) ; then 48956085Sbostic else 490*56999Sbostic printf "test20: type hash:\ 49156085Sbosticbsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed\n" 49256085Sbostic exit 1 49356085Sbostic fi 49456085Sbostic done 49556085Sbostic bsize=8192 49656085Sbostic for ffactor in 341 455 683; do 49756085Sbostic printf "\tbucketsize %d, fill factor %d\n" $bsize, $ffactor 49856495Sbostic $PROG -o$TMP3 \ 49956085Sbostic -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\ 50056085Sbostic hash $TMP2 50156085Sbostic if (cmp -s $TMP1 $TMP3) ; then 50256085Sbostic else 503*56999Sbostic printf "test20: type hash:\ 50456085Sbosticbsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed\n" 50556085Sbostic exit 1 50656085Sbostic fi 50756085Sbostic done 50856085Sbostic} 50956085Sbostic 51056038Sbosticmain 511