mirror_zfs/module/splat
Brian Behlendorf b7dc313837 Add Thread Specific Data (TSD) Regression Test
To validate the correct behavior of the TSD interfaces it's
important that we add a regression test.  This test is designed
to minimally exercise the fundamental TSD behavior, it does not
attempt to validate all potential corner cases.

The test will first create 32 keys via tsd_create() and register
a common destructor.  Next 16 wait threads will be created each
of which set/verify a random value for all 32 keys, then block
waiting to be released by the control thread.  Meanwhile the
control thread verifies that none of the destructors have been
run prematurely.

The next phase of the test is to create 16 exit threads which
set/verify a random value for all 32 keys.  They then immediately
exit.  This is is designed to verify tsd_exit() which will be
called via thread_exit().  This must result in all registered
destructors being run and the memory for the tsd being free'd.

After this tsd_destroy() is verified by destroying all 32 keys.
Once again we must see the expected number of destructors run
and the tsd memory free'd.  At this point the blocked threads
are released and they exit calling tsd_exit() which should do
very little since all the tsd has already been destroyed.

If this all goes off without a hitch the test passes.  To ensure
no memory has been leaked, I have manually verified that after
spl module unload no memory is reported leaked.
2010-12-07 10:02:44 -08:00
..
.gitignore sun-misc-gitignore 2010-01-08 09:37:54 -08:00
Makefile.in Support custom build directories 2010-09-05 21:49:05 -07:00
splat-atomic.c Split <sys/debug.h> header 2010-07-20 13:29:35 -07:00
splat-condvar.c Public Release Prep 2010-05-17 15:18:00 -07:00
splat-cred.c Public Release Prep 2010-05-17 15:18:00 -07:00
splat-ctl.c Linux 2.6.36 compat, use fops->unlocked_ioctl() 2010-11-10 13:16:12 -08:00
splat-generic.c Add __divdi3(), remove __udivdi3() kernel dependency 2010-07-13 16:44:02 -07:00
splat-internal.h Split <sys/debug.h> header 2010-07-20 13:29:35 -07:00
splat-kmem.c Use KM_NODEBUG macro in preference to __GFP_NOWARN. 2010-05-20 14:16:59 -07:00
splat-kobj.c Public Release Prep 2010-05-17 15:18:00 -07:00
splat-list.c Public Release Prep 2010-05-17 15:18:00 -07:00
splat-mutex.c Treat mutex->owner as volatile 2010-06-28 16:02:57 -07:00
splat-random.c Public Release Prep 2010-05-17 15:18:00 -07:00
splat-rwlock.c Fix incorrect krw_type_t type 2010-11-09 10:18:01 -08:00
splat-taskq.c Fix taskq code to not drop tasks when TQ_SLEEP is used. 2010-08-02 11:20:31 -07:00
splat-thread.c Add Thread Specific Data (TSD) Regression Test 2010-12-07 10:02:44 -08:00
splat-time.c Public Release Prep 2010-05-17 15:18:00 -07:00
splat-vnode.c Public Release Prep 2010-05-17 15:18:00 -07:00