1*133306f0Sniklas# $OpenBSD: README,v 1.3 2001/01/29 02:05:40 niklas Exp $ 2bec2d00aSderaadt# $NetBSD: README,v 1.5 1996/05/03 21:54:19 cgd Exp $ 3bec2d00aSderaadt# @(#)README 8.8 (Berkeley) 7/31/94 4df930be7Sderaadt 5df930be7SderaadtTo run the tests, enter "make regress". 6df930be7Sderaadt 7df930be7SderaadtFairly large files (the command files) are built in this directory during 8df930be7Sderaadtthe test runs, and even larger files (the database files) are created in 9df930be7Sderaadt"/var/tmp". If the latter directory doesn't exist, set the environmental 10df930be7Sderaadtvariable TMPDIR to a directory where the files can be built. 11df930be7Sderaadt 12df930be7Sderaadt=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 13bec2d00aSderaadtThe script file consists of lines with an initial character which is 14bec2d00aSderaadtthe command for that line, or an initial character indicating a key 15bec2d00aSderaadtor data entry for a previous command. 16bec2d00aSderaadt 17bec2d00aSderaadtLegal command characters are as follows: 18df930be7Sderaadt 19df930be7Sderaadtc: compare a record 20df930be7Sderaadt + must be followed by [kK][dD]; the data value in the database 21df930be7Sderaadt associated with the specified key is compared to the specified 22df930be7Sderaadt data value. 23df930be7Sderaadte: echo a string 24df930be7Sderaadt + writes out the rest of the line into the output file; if the 25df930be7Sderaadt last character is not a carriage-return, a newline is appended. 26bec2d00aSderaadtf: set the flags for the next command 27bec2d00aSderaadt + no value zero's the flags 28df930be7Sderaadtg: do a get command 29df930be7Sderaadt + must be followed by [kK] 30df930be7Sderaadt + writes out the retrieved data DBT. 31bec2d00aSderaadto [r]: dump [reverse] 32bec2d00aSderaadt + dump the database out, if 'r' is set, in reverse order. 33df930be7Sderaadtp: do a put command 34df930be7Sderaadt + must be followed by [kK][dD] 35df930be7Sderaadtr: do a del command 36bec2d00aSderaadt + must be followed by [kK] unless R_CURSOR flag set. 37bec2d00aSderaadtS: sync the database 38df930be7Sderaadts: do a seq command 39bec2d00aSderaadt + must be followed by [kK] if R_CURSOR flag set. 40df930be7Sderaadt + writes out the retrieved data DBT. 41bec2d00aSderaadt 42bec2d00aSderaadtLegal key/data characters are as follows: 43bec2d00aSderaadt 44df930be7SderaadtD [file]: data file 45df930be7Sderaadt + set the current data value to the contents of the file 46df930be7Sderaadtd [data]: 47df930be7Sderaadt + set the current key value to the contents of the line. 48df930be7SderaadtK [file]: key file 49df930be7Sderaadt + set the current key value to the contents of the file 50df930be7Sderaadtk [data]: 51df930be7Sderaadt + set the current key value to the contents of the line. 52bec2d00aSderaadt 53bec2d00aSderaadtBlank lines, lines with leading white space, and lines with leading 54bec2d00aSderaadthash marks (#) are ignored. 55df930be7Sderaadt 56df930be7SderaadtOptions to dbtest are as follows: 57df930be7Sderaadt 58bec2d00aSderaadt -d: Set the DB_LOCK flag. 59df930be7Sderaadt -f: Use the file argument as the database file. 60df930be7Sderaadt -i: Use the rest of the argument to set elements in the info 61df930be7Sderaadt structure. If the type is btree, then "-i cachesize=10240" 62df930be7Sderaadt will set BTREEINFO.cachesize to 10240. 63df930be7Sderaadt -o: The rest of the argument is the output file instead of 64df930be7Sderaadt using stdout. 65bec2d00aSderaadt -s: Don't delete the database file before opening it, i.e. 66bec2d00aSderaadt use the database file from a previous run. 67df930be7Sderaadt 68bec2d00aSderaadtDbtest requires two arguments, the type of access "hash", "recno" 69bec2d00aSderaadtor "btree", and the script name or "-" to indicate stdin. 70