b7dc313837
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. |
||
---|---|---|
cmd | ||
config | ||
include | ||
lib | ||
module | ||
patches | ||
scripts | ||
.gitignore | ||
AUTHORS | ||
COPYING | ||
ChangeLog | ||
DISCLAIMER | ||
INSTALL | ||
META | ||
Makefile.am | ||
Makefile.in | ||
README.markdown | ||
autogen.sh | ||
configure | ||
configure.ac | ||
spl-modules.spec.in | ||
spl.spec.in | ||
spl_config.h.in |
README.markdown
The Solaris Porting Layer (SPL) is a Linux kernel module which provides many of the Solaris kernel APIs. This shim layer makes it possible to run Solaris kernel code in the Linux kernel with relatively minimal modification. This can be particularly useful when you want to track upstream Solaris development closely and don’t want the overhead of maintaining a large patch which converts Solaris primitives to Linux primitives.
To build packages for your distribution:
$ ./configure
$ make pkg
Full documentation for building, configuring, and using the SPL can be found at: http://zfsonlinux.org