* 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 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.
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".
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.
useful, but which still might be required by current readers.
When reconciling pages with updates which still might be read by existing
snapshot readers, write the updates into a lookaside table. When those
pages are read back into the cache, any still-relevant updates are read
back from the lookaside table and attached to the page.
Add a new on-disk page-header flag, WT_PAGE_LAS_UPDATE, set when a page
has records in the look-aside table.
Remove the __wt_evict_page() code, replace with calls to __wt_evict(),
and add testing in reconciliation to only write committed updates. As
part of that change, remove the WT_ISO_EVICTION transaction isolation
configuration, it's no longer used (WT_ISO_READ_UNCOMMITTED is used
instead).
Delete the WT_PAGE_MODIFY.rec_max_txn field (no longer needed after
reconciliation is changed to return EBUSY if a page wasn't marked
clean, replacing the test of WT_PAGE_MODIFY.rec_max_txn __evict_review).
Delete the test for all updates being globally visible when a page is
discarded from the cache, that's no longer true. Delete the
WT_SESSION_DISCARD_FORCE flag, used to turn off that check when forcibly
discarding a page.
of a two, 4B value array, declare the value volatile to avoid having the
compiler alter the read/write path.
Add a check if a PRNG component ever goes to zero and reset it.
Give every thread its own RNG state so there's no competition for the
cache lines.
Initialize the random-number generator early so we catch all possible
configuration uses.
Remove duplicates of WiredTiger's macros.
it the default (LZ4 block mode is now lz4-noraw, to match zlib).
This implementation mostly works, but...
It's not backward compatible because we're storing more information in
the destination buffer than before (two 4B values instead of a one 8B
value). The 2.5.3 release is the only release that had LZ4 support, so
I don't expect this to be a problem. We could be backward compatible,
but not without a fair amount of pain.
This code sizes decompression buffers incorrectly. The WiredTiger btree
code sizes the decompression buffer based on the final in-memory size
of the data, which isn't correct for data compressed with LZ4's raw
compression function which may have compressed more data than the final
in-memory size.