1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 10:25:13 +03:00
Commit Graph

103 Commits

Author SHA1 Message Date
Joe Thornber
5fdebf9bbf [bcache] add unit test
abort-forces-read
2019-10-29 10:33:31 +00:00
Joe Thornber
2938b4dcca [bcache] add bcache_abort()
This gives us a way to cope with write failures.
2019-10-28 15:00:53 +00:00
Zdenek Kabelac
ee9d623d38 tests: indent 2018-12-23 01:07:27 +01:00
Zdenek Kabelac
6d8356d208 tests: fix unit test
Use more universal  /usr/bin/env bash
(as older systems do only have /bin/sh)
Uncommment disabled event_activation testing.
2018-12-23 01:07:27 +01:00
Zdenek Kabelac
0161ebe484 scripts: simplify including for generator
Uses included .c file as primary header includer.
2018-12-21 21:42:30 +01:00
Zdenek Kabelac
18aa541ca2 configure: avoid repeative inclusion of configure.h
Since configure.h is a generated header and it's missing traditional
ifdefs preambule - it can be included & parsed multiple times.
Normally compiler is fine when defines have same value and there is
no warning - yet we don't need to parse this several times
and by adding -include  directive we can ensure every file
in the package is rightly compile with configure.h as the
first header file.
2018-12-21 19:19:50 +01:00
David Teigland
1f1d36f6a2 unit test: use_lvmetad replaced by event_activation 2018-12-17 10:04:44 -06:00
Zdenek Kabelac
2076dda0b8 makefiles: also fix build of unit test 2018-12-17 11:51:38 +01:00
Zdenek Kabelac
94237354dd makefiles: correcting login of makefile
Fixing some ordering issue with inclusion of common make.tmpl.
Correcting dependency calculation
Simplifying inclusive makefile
2018-12-17 10:55:20 +01:00
Zdenek Kabelac
d76b4afb8e makefiles: sort 2018-12-17 10:36:52 +01:00
Zdenek Kabelac
701ecff0ff lvm: drop usage of dl library
Since lvm no longer supports any dlopen-able plugins
(which in practice was never really usable) drop linking
with -ldl.
2018-12-17 10:36:52 +01:00
Zdenek Kabelac
0b19387dae headers: use configure.h as 1st. header
Ensure configure.h is always 1st. included header.
Maybe we could eventually introduce gcc -include option, but for now
this better uses dependency tracking.

Also move _REENTRANT and _GNU_SOURCE into configure.h so it
doesn't need to be present in various source files.
This ensures consistent compilation of headers like stdio.h since
it may produce different declaration.
2018-12-14 15:09:13 +01:00
Zdenek Kabelac
250e05a965 makefiles: ensure test dir can run unit-test 2018-12-01 01:05:53 +01:00
Zdenek Kabelac
8b87ffaa8a makefiles: clean unit-test 2018-11-30 13:03:09 +01:00
Zdenek Kabelac
41afe8c5cc tests: drop use_lvmetad from unit test 2018-11-29 23:10:09 +01:00
Zdenek Kabelac
98c21e98b2 makefiles: improving cleaning rules 2018-11-29 23:05:43 +01:00
Zdenek Kabelac
f54ead831f makefiles: avoid dependency calcs for base dir
For some targets we do not want to generate dependencies.
Also add note about usage of such Makefile - it might be
possibly better to rename it to different filename to avoid
any confusion.
2018-11-29 23:05:43 +01:00
Joe Thornber
ba6d8a3195 [unit-test/radix-tree] Add a huge test case
Derived from the logs that dct gave me.
2018-09-20 14:38:34 +01:00
David Teigland
3bcc6c7e60 tests: drop lvmetad bits 2018-09-10 11:49:11 -05:00
Joe Thornber
8b05f1f230 radix-tree: Fix bug in remove_prefix()
Accidental decrement of the nr entries when a n256 didn't have the
entry in the first place.
2018-08-20 15:23:40 +01:00
Zdenek Kabelac
b98846998b build: not yet merged
status.c will get linked with VDO support.
2018-07-09 10:37:39 +02:00
Zdenek Kabelac
5f3eff8eae tests: update vdo unit test to dm prefix
Update prefix and reindent.
2018-07-09 10:30:34 +02:00
Zdenek Kabelac
4a64bb9573 build: unit test Makefile update
Update makefile to link with more libs since now whole liblvm-internal.a
is linked-in and  this library has futher dependencies.

Avoid including deps for run-unit-test.

Drop linking separate status.c as it's already linked via internal libs.
2018-07-09 10:30:34 +02:00
Zdenek Kabelac
c96400b6c7 vdo: enhance status parser
Add support for using mempool for allocations inside status parser.
Convert some string pointers to arrays.
Reindent tabs.
2018-07-02 10:25:35 +02:00
Zdenek Kabelac
52b07672f8 build: avoid rebuild deps for top-level makefiles 2018-07-02 10:21:42 +02:00
Zdenek Kabelac
c728d88e11 build: include configure.h
It's important to consistenly include  configure.h as the 1st. header.
It containts #defines influencing behavior of other included header
files.
2018-06-22 23:11:44 +02:00
Joe Thornber
40c1f7889f radix-tree: More debugging of remove
There's now a pretty printer called radix_tree_dump()

n4, n16, and n48 weren't UNSETting the last entry after
sliding values down.
2018-06-21 09:49:43 +01:00
Joe Thornber
c8cfbfa605 radix_tree: add new test case
Check that value destructors are called by radix_tree_destroy()
2018-06-21 09:49:25 +01:00
Joe Thornber
20b9746c5d radix-tree: FIx various bugs to do with removal
Add radix_tree_is_well_formed() which does some sanity checking
of the tree.

Call the above a lot in the unit tests.

Fix revealed bugs.
2018-06-21 09:49:08 +01:00
Joe Thornber
286c1ba336 device_mapper: rename libdevmapper.h -> all.h
I'm paranoid a file will include the global one in /usr/include
by accident.
2018-06-08 12:31:45 +01:00
Joe Thornber
9573ff3a3b test/unit: Rename Makefile.in -> Makefile
There's nothing being expanded.
2018-06-08 09:50:40 +01:00
Joe Thornber
60db97ae1d test/unit: activation generator unit tests 2018-06-07 16:24:42 +01:00
Joe Thornber
bd8c6cf862 scripts/lvm2_activation_generator_systemd_red_hat: rewrite to use lvmconfig
Unit tested the new code, but not run functional tests (assuming they exist).
2018-06-07 16:15:04 +01:00
Joe Thornber
232918fb86 build: libbase.a 2018-06-04 13:53:07 +01:00
Joe Thornber
dbba1e9b93 Merge branch 'master' into 2018-05-11-fork-libdm 2018-06-01 13:04:12 +01:00
Joe Thornber
06c789eda1 radix-tree: fix some bugs in remove_prefix and iterate
These weren't working if the prefix key was part of a prefix_chain.
2018-05-30 14:21:27 +01:00
Joe Thornber
1924426ad1 radix-tree: radix_tree_iterate() 2018-05-29 17:58:58 +01:00
Joe Thornber
c2a8bbed3b radix-tree: radix_tree_remove_prefix() 2018-05-29 13:25:59 +01:00
Joe Thornber
0181c77e3f Merge branch '2018-05-29-radix-tree-iterate' into 2018-05-23-radix-tree-remove 2018-05-29 11:04:32 +01:00
Joe Thornber
033df741e2 data-struct/radix-tree: pass the value dtr into create.
Rather than having to pass it into every method that removes items.
2018-05-29 11:03:10 +01:00
Joe Thornber
6cd798f556 radix_tree_t: knock out some debug 2018-05-23 12:54:02 +01:00
Joe Thornber
b7fd8ac8eb radix_tree: add remove method 2018-05-23 12:48:06 +01:00
Joe Thornber
89fdc0b588 Merge branch 'master' into 2018-05-11-fork-libdm 2018-05-16 13:43:02 +01:00
Joe Thornber
ccc35e2647 device-mapper: Fork libdm internally.
The device-mapper directory now holds a copy of libdm source.  At
the moment this code is identical to libdm.  Over time code will
migrate out to appropriate places (see doc/refactoring.txt).

The libdm directory still exists, and contains the source for the
libdevmapper shared library, which we will continue to ship (though
not neccessarily update).

All code using libdm should now use the version in device-mapper.
2018-05-16 13:00:50 +01:00
Joe Thornber
7c852c75c3 unit-tests: remove a couple of debug printfs 2018-05-16 10:25:30 +01:00
Joe Thornber
e296f784c9 Merge branch 'master' of git://sourceware.org/git/lvm2 2018-05-16 10:11:58 +01:00
Joe Thornber
df2acbbb97 bcache: nr_ios_pending wasn't being incremented
... but it was being decremented on completion.  Which meant
it wrapped, and no prefetches were ever issued after the
first completion.
2018-05-16 10:09:17 +01:00
Joe Thornber
7f97c7ea9a build: Don't generate symlinks in include/ dir
As we start refactoring the code to break dependencies (see doc/refactoring.txt),
I want us to use full paths in the includes (eg, #include "base/data-struct/list.h").
This makes it more obvious when we're breaking abstraction boundaries, eg, including a file in
metadata/ from base/
2018-05-14 10:30:20 +01:00
Zdenek Kabelac
0a5edc1f12 tests: swith to mkstemp
As mkostemp is only on newer systems, switch to more old version
which effectively does exactly the same thing for given list of
open flags.
2018-05-12 23:23:54 +02:00
Zdenek Kabelac
4c7565b65d tests: add unit-test
Allow unit-test to be run as part of standard 'make check'.
2018-05-12 18:18:23 +02:00