Joe Thornber
ac18164a52
unit-test: a bunch of tests for bcache-utils
2018-05-03 20:13:13 +01:00
Joe Thornber
9fe0be871c
unit-test/matcher_t: Fixup Kabi's test
...
The matcher matches the regexes in reverse order.
2018-05-02 13:53:43 +01:00
Joe Thornber
506ab29bfd
unit-test/matcher_t: add another (failing!) test for Kabi
2018-05-02 13:31:57 +01:00
Joe Thornber
3ea862bdfc
unit-test/bcache_t: test was using too large a block size
2018-05-01 14:17:12 +01:00
Joe Thornber
de042fa13d
unit-test/bcache_t: Use a stripped down fixture for some tests
2018-05-01 12:54:57 +01:00
Joe Thornber
f564e78d98
bcache: rewrite bcache_{write,zero}_bytes
...
These are utility functions so should only use the public interface.
Also write_bytes was flushing, which will kill performance.
2018-05-01 12:07:33 +01:00
Joe Thornber
7aba7fe68b
unit-test/io_engine_t: add a little test for bcache_{read,write}_bytes
2018-05-01 10:47:40 +01:00
Joe Thornber
f6459757af
unit-test/bcache_t: fixup a test.
...
Problem found with valgrind.
2018-05-01 09:17:55 +01:00
Joe Thornber
39f24a169c
unit-test/io_engine_t: Improve the read test.
...
Now verifies what it reads.
2018-04-30 17:09:24 +01:00
Joe Thornber
ef79d639fe
unit-test/io_engine_t: use posix_memalign() rather than aligned_alloc()
...
Not present on older systems.
2018-04-30 16:55:19 +01:00
Joe Thornber
ab63923d19
unit-tests: Move to test/unit
2018-04-27 16:55:07 +01:00
Joe Thornber
ea34dad66f
[unit-test] Push the new unit test framwork.
...
See doc/unit-test.txt for details.
Some bcache tests failing. Probably due to dct changing semantics, will
fix in follow up patch.
2018-04-26 11:59:39 +01:00
Joe Thornber
dc8034f5eb
[device/bcache] more work on bcache
2018-04-20 11:12:50 -05:00
Joe Thornber
1cde30eba0
[device/bcache] More fiddling with tests
2018-04-20 11:12:50 -05:00
Joe Thornber
467adfa082
[device/bcache] More tests and some bug fixes
2018-04-20 11:12:50 -05:00
Joe Thornber
8ae3b244fc
[build] include test/unit/Makefile rather than recursive build
...
FIXME: unit tests are not currently run as part of make check.
2018-04-20 11:12:50 -05:00
Joe Thornber
b03e55a513
[device/bcache] rename a unit test
2018-04-20 11:12:50 -05:00
Joe Thornber
0d0fab3d2d
[device/bcache] another unit test
2018-04-20 11:12:50 -05:00
Joe Thornber
0f0eb04edb
[device/bcache] some more work on bcache
2018-04-20 11:12:50 -05:00
Joe Thornber
46867a45d2
[device/bcache] stub a unit test
2018-04-20 11:12:50 -05:00
Zdenek Kabelac
cefb8bcfc4
tests: unit test for percent printing
2017-06-24 17:44:42 +02:00
Zdenek Kabelac
f91ea96b4f
tests: fix compilation of unit tests
...
Rule for TARGET compiling got missing and needs to be explicitely
expressed, otherwise default unsuitable rule is applied.
2017-06-08 11:59:02 +02:00
Zdenek Kabelac
fcbef05aae
doc: change fsf address
...
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
2016-01-21 12:11:37 +01:00
Zdenek Kabelac
c717ea5fc0
tests: unit test for mirror status
2015-12-01 13:00:52 +01:00
Zdenek Kabelac
1fb8d746d6
tests: make unit testing usable again
...
Make unit tests usable/compilable with newer header files.
Add 'initial' dmlist_t for list tests.
More will come...
2015-11-27 11:22:21 +01:00
Zdenek Kabelac
9b2be901ed
makefiles: cleanup update
...
Cleanup also test dir.
Distclean unit tests.
2013-06-04 15:57:18 +02:00
Petr Rockai
ff752c60df
TEST: Avoid building unit tests with --disable-testing.
2012-10-09 20:37:34 +02:00
Zdenek Kabelac
d0a3aa04c8
Unit testing for some string libdm functions
...
TODO: more functions need to be unit tested.
2012-02-23 22:47:17 +00:00
Petr Rockai
dae0822698
The lvmetad client-side integration. Only active when use_lvmetad = 1 is set in
...
lvm.conf *and* lvmetad is running.
2012-02-23 13:11:07 +00:00
Zdenek Kabelac
511a5f3ad8
Add test for memory allocation failures
...
Replace asserts with test for failing memory allocation.
Add at least stack traces.
Index counter starts from 1 (0 reserved for error), so replacing fingerprint.
2012-02-10 13:49:29 +00:00
Zdenek Kabelac
400dede7a6
TARGETS macro has to be defined before inclusion of make.tmpl
...
Use @TESTING@ check in this case.
2012-01-27 10:55:02 +00:00
Zdenek Kabelac
599771c9b0
Build test run target only for $(TESTING)
...
Add libraries properly in LDLIBS.
2012-01-26 21:40:36 +00:00
Zdenek Kabelac
f9fb138bdd
Minor oldstyle warning update
2012-01-09 12:29:15 +00:00
Petr Rockai
90b7423846
Add a unit test for config cascade (overlay). Needs expanding though.
2011-12-18 23:56:36 +00:00
Zdenek Kabelac
c6958856f8
Cleanup test compile warning
...
Add some declaration and cast to cleanup gcc warnings.
Add missing dm_config_destroy() to cleanup pool leak report.
2011-12-13 12:08:42 +00:00
Petr Rockai
06c51c80d7
Add a unit test for dm_config_clone_node.
2011-12-11 15:45:14 +00:00
Petr Rockai
3324f8f4b8
Start a rudimentary unit test for the dm_config_* interface.
2011-12-11 15:19:41 +00:00
Petr Rockai
5da88e5ba4
Use pkg-config to look for CUnit (needed for systems where it's not on the
...
standard include path).
2011-12-11 15:15:57 +00:00
Zdenek Kabelac
4b42d7ae98
Cleanup test makefiles
...
Simplify /api makefile and use SUBDIRS target for test dir.
Properly cleanup Makefiles with distclean in /test.
Use symbolic links for shell scripts for non-srcdir compilation.
2011-11-23 12:21:41 +00:00
Zdenek Kabelac
c571aeae6f
Cleanup gcc warning
...
bitset_t.c:39: warning: 'last' may be used uninitialized in this function
Compiler is not smart enough to see the code path which avoid using
unitialized 'last'.
2011-11-21 13:15:40 +00:00
Zdenek Kabelac
d6a05ea5e6
Add some cflags to ldflags
...
Things like gcov needs the compilation flags for linker as well.
TODO: cleanup compilation flags usage
2011-11-21 13:11:03 +00:00
Petr Rockai
d4fed28523
Implement a CUnit-based runner for unit tests. Copy and adapt (actual unit)
...
tests from unit-tests/*/*_t.c (now under test/unit). The valgrind/pool test is
missing, since it's not really a unit test and probably not too valuable
either. Available via "make unit" (and if --enable-testing was passed to
configure, also executed by make check).
2011-11-20 21:43:20 +00:00