Spdk/test/lib
Jim Harris 372df452a4 test: flesh out test_env implementation for mempools
Some modules rely on accurate memory buffer counts.
For example, bdev checks that all of its buffer pools
are back to original capacity during spdk_bdev_finish().

So flesh out the mempool implementation in test_env.c
to keep accurate counts of the number of buffers "available"
in the test mempool.  Note that test_env is only designed
for unit tests, so this functionality is not multi-thread
safe.

Still allow for NULL mempool pointers and just default
to old behavior in that case - some unit tests such as
the blobfs cache tree tests still rely on that behavior.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1d0ab49e16741c92d777d76f35e60271e4ad943a

Reviewed-on: https://review.gerrithub.io/377969
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-20 19:27:06 -04:00
..
bdev bdev: remove bdev_opened_for_write restriction 2017-09-20 14:43:32 -04:00
blobfs blobfs: Make the behaviour of "delete file" as unlink. 2017-09-15 17:13:14 -04:00
env env: Remove old translation reference counting 2017-09-01 15:25:24 -04:00
event test: move subsystem_ut to unit test directory 2017-09-12 21:00:07 -04:00
ioat test: move IOAT library unit test to test/unit 2017-06-21 18:57:35 -04:00
json test: move JSON library unit tests to test/unit 2017-06-20 13:46:07 -04:00
nvme test/overhead: print error and exit if no device found 2017-08-16 16:13:29 -04:00
Makefile test: move iSCSI unit tests to test/unit 2017-06-28 13:10:27 -04:00
test_env.c test: flesh out test_env implementation for mempools 2017-09-20 19:27:06 -04:00