* WT-2554 Add initial C test framework.
With a few sample applications. Need to do further work to cleanup
the same applications and share as much code/style as possible.
* WT-2554 Fixup build errors.
* Fix compiler warning.
* Cleanup
* Ensure each test runs in a different directory.
* Update C test suite names and add copyright.
* Move test code into subdirectories.
* Replace test_util.i with a real utility library now that we have one.
Nothing needs to be an inline function.
Mostly cherry picked from 7c18420.
* Use WiredTiger getopt in C test suite for platform portability.
* Add a header comment to each test case.
* Add a C test suite entry auto generator
* Style, KNF
* Implement review feedback.
* Build test/utility library on Windows
* Add comment to script. Fix a printf.
Don't clean up reconciliation structures before they've been initialized.
Fix two paths where scratch buffers could be allocated and fail to be
released.
Don't queue threads for checkpoint operations, just skip the scheduled
checkpoint operation if a checkpoint is already in progress.
Don't wait for backups to complete if scheduled to do a named checkpoint,
do an unnamed checkpoint instead.
Fix a bug: we were scheduling named checkpoints 80% of the time instead
of the documented 20%; change that number to 5%, named checkpoints aren't
worth testing that heavily.
Don't bother avoiding scheduling two named checkpoints in a row, it's
not worth the effort.
Clean up test program #includes and add generic handling to memory allocation failures.
Now the test programs include <wt_internal.h>, the local includes
aren't necessary, and it makes lint sad.
Rework format configuration to use config_single() more, that way we
discard allocated memory when in-memory configurations turn off previous
configurations.
Create a new routine that frees all allocated configuration memory at
the end of the run, separate from the function that clears temporary
settings before each new run.
Changes to allow running in-memory mode format, automatically; 1 in 20
randomly selected runs are in-memory.
Use 2x the initial load's data size as the minimum cache size. That
appears to always be enough for the column-store initial load, and is
usually enough for the row-store initial load. When not enough, we reset
the number of keys to the number we were able to load, and also set the
insert percentage to a low value and the delete percentage to a higher
value, in order to give ourselves some room in the cache so the run can
reasonably continue.
There is another major change: previous versions of this code used 6-8
times the initial load's data size worth of cache, because we were
creating a relatively large number of huge keys (those are roughly 80K
byte keys). The reason for that was we only generate 1000 random key
lengths (and then select among those lengths), and with a million keys
selecting from 1000 key lengths, we were creating huge keys too often.
This code no longer does that, and both keys and values now select huge
key/value sizes only once in every 2500 key/value pairs.
Change the backup code to use the new __wt_copy_and_sync() code instead
of shell commands, get better testing on that code.
Rename "BACKUP2" to "BACKUP_COPY".
The "stop threads" condition was never being reset, so we only did
backups, compaction and a long-running transaction on the first chunk
of work, not on any subsequent chunks.
When we switched cursor semantics to insert/update by default, we more
exactly match Berkeley DB's semantics, simplify some code, not-found is
no longer an expected return.
Rework underlying operation routines to return WT_NOTFOUND, allows the
caller to make better decisions about the cursor's position. In
general, don't rollback the transaction unless we get a rollback return
and we're actually in a transaction, continue in the current transaction
in the WT_NOTFOUND case.