Commit Graph

30 Commits

Author SHA1 Message Date
Alex Gorrod
9768c2db0b WT-2554 Add initial C test framework. (#2655)
* 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.
2016-05-23 13:13:54 -04:00
Keith Bostic
b59476e03d WT-2600: clean up test program includes (#2708)
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.
2016-05-02 16:05:08 +10:00
Keith Bostic
344a714c3d Upgrade copyright notices from 2015 to 2016. 2016-01-01 16:37:39 -05:00
David Hows
38a7aa843d More CR Cleanup 2015-05-13 09:49:20 +10:00
David Hows
21148870aa Change to __wt_exists 2015-05-12 13:41:33 +10:00
Keith Bostic
39a120eb03 test/checkpoint is using __wt_random_init/__wt_random, test programs are
using other __wt_XXX functions (for example, __wt_thread_id), several
include wt_internal.h.

Back out chunks of the last commit, instead, change the test programs
to use the WiredTiger library RNG functions, remove RNG functions from
test_util.i.
2015-05-08 13:58:49 -04:00
David Hows
29477b0ac5 Add testutils to all tests 2015-05-05 14:51:23 +10:00
Keith Bostic
30b61e8abd Make the die() function look like all the other test programs,
support variadic arguments.
2015-04-14 08:41:52 -04:00
Alex Gorrod
127cd8a275 Add a new statistic to track sweep evictions.
Add functionality to test/thread to vary the number of operations
on different tables. Hopfully it'll let us construct workloads where
tables are closed by sweep.
2015-04-13 07:45:25 +00:00
Keith Bostic
1f9098871a Copyright notices: add MongoDB, update to 2015. 2015-01-04 14:07:56 -05:00
Keith Bostic
8731249f41 The type returned from pthread_self() is opaque, we can't cast it to a
(void *) and print it, use the underlying WiredTiger helper routine.
2014-10-22 15:55:56 -04:00
Keith Bostic
c2cb2d418a Simplify gcc.h, don't repeat the GCC atomic builtins, just use one version.
Break hardware.h up into gcc.h and lint.h (hardware.h is still there,
but it's mostly empty).
Remove need for gcc.h from various benchmarking/test programs.
2014-10-04 12:10:17 -04:00
Keith Bostic
176dccefc2 Add a -F option to thread, to create a separate file for every thread.
With this option, the command line combination "-FS -R 0 -W 10" will
trigger the checkpoint problem where closing a file fails because there
is an update for the file we can't write.

Reference #844, #957.
2014-05-20 10:47:54 -04:00
Keith Bostic
5b509b7220 Update copyright notices for 2014.
Move lang/java and lang/python into the public domain.
2014-01-07 10:30:12 -05:00
Keith Bostic
9be66e1d26 Rework WT_UNUSED/WT_UNUSED_RET slightly: move GNUC macros out of misc.h
into their own include file "gcc.h", change the test programs to include
and use the definitions from that file.
2013-11-06 09:18:50 -05:00
Alex Gorrod
1e9c8b91d1 Fix compiler warnings with GCC 4.7.2 on Ubuntu. 2013-11-01 16:18:48 +11:00
Susan LoVerso
fc0207419d Add log_print support to test/thread. 2013-06-05 15:38:28 -04:00
Keith Bostic
963d37a4e6 Update copyright notice to 2013. 2013-01-01 09:45:50 +00:00
Keith Bostic
45c1e2a5a3 Move test program software into the public domain, if anyone wants to
cut-and-paste from it, that's fine with us.
2012-10-26 13:22:45 +00:00
Keith Bostic
ca408b3b2d Split test/thread into two parts, test/thread and test/fops. 2012-05-28 10:59:45 +00:00
Keith Bostic
33c8736b59 lint 2012-05-03 22:14:42 +00:00
Keith Bostic
2de95257d2 lint 2012-05-03 22:08:54 +00:00
Keith Bostic
f94b7ea1e3 Add support for file operations to the test/thread program. 2012-05-03 21:57:43 +00:00
Keith Bostic
e5a7c5a757 lint 2012-03-15 17:59:31 +00:00
Keith Bostic
27c0f27a80 Add the -S option to the test/thread program, that uses a new session
handle on every operation.  This tests issue #178.
2012-03-10 11:58:54 -05:00
Keith Bostic
4879e63e5b More copyright cleanup. 2012-02-01 15:32:36 +00:00
Michael Cahill
3f87e3d087 Fix uninitialized warnings with GCC 4.2. 2012-01-31 10:38:15 +11:00
Michael Cahill
70cf4f359c Use gettimeofday when initializing the random number generator for portability. 2011-08-05 17:49:10 +10:00
Keith Bostic
ee0eb8705f pthread_t on FreeBSD is a pointer, use %p in the printf.
pid_t is an unknown signed type, cast it large.
2011-08-01 10:03:44 -04:00
Keith Bostic
23b20d4de1 Add a small thread-test program. 2011-07-31 11:11:15 -04:00