Age | Commit message (Collapse) | Author | Files | Lines |
|
"make gcov" is sufficient to run the tests in DEBUG mode and generate gcov
output for each .c file in lib/, to give us some idea of our coverage.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
Currently, on systems with both cmake and cmake3, we require cmake even if
cmake3 is the only cmake version available (and SPDK encodes this silly
requirement). Use and prefer "cmake3" if available.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
Trying to do our unit/functional testing with C is very tedious, and cmocka
especially is a continual pain point. This commit introduces a Python-based
testing infrastructure, and adds an initial set of functional tests for client
negotiation.
The tests work under Valgrind for leak/bad access detection of the C code, but
not under ASAN, which lacks any meaningful shared-library support.
We should be able to replace all of current C-based unit tests with this,
reverting samples/ back to demo code only.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
If we're not running ASAN, use valgrind.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
Re-order so we don't end up with an ASAN-enabled build at the end; purely for
convenience.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
Run unit tests with -fsanitize-address too.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
Also add clang to pull request build checks.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
Add a target that builds in debug and release mode and runs the tests in each.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Also rename test.c to reflect it should cover unit tests.
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Signed-off-by: John Levon <john.levon@nutanix.com>
|
|
|
|
Also remove kernel build from travis.yml
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
This allows package systems to use /usr (instead of CMake's default
/usr/local), which is the typical choice.
|
|
Remove various spurious whitespaces and empty lines. Some other
alignment issues, too.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
|
|
|