1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

tests: drop use_lvmetad from unit test

This commit is contained in:
Zdenek Kabelac 2018-11-29 22:52:46 +01:00 committed by David Teigland
parent e5ae9b0d2f
commit 1781344b6b

View File

@ -129,20 +129,19 @@ static void _test_parse_line(void *fixture)
for (i = 0; i< DM_ARRAY_SIZE(_tests); i++) { for (i = 0; i< DM_ARRAY_SIZE(_tests); i++) {
bool r; bool r;
struct config cfg; struct config cfg = {
.sysinit_needed = true
};
struct pl_test *t = _tests + i; struct pl_test *t = _tests + i;
cfg.use_lvmetad = false;
cfg.sysinit_needed = true;
r = _parse_line(t->input, &cfg); r = _parse_line(t->input, &cfg);
if (t->success) { if (t->success) {
if (!r) if (!r)
test_fail("_parse_line('%s') failed", t->input); test_fail("_parse_line('%s') failed", t->input);
if (cfg.use_lvmetad != t->use_lvmetad) //if (cfg.use_lvmetad != t->use_lvmetad)
test_fail("_parse_line('%s') -> use_lvmetad='%s'", // test_fail("_parse_line('%s') -> use_lvmetad='%s'",
t->input, _bool(cfg.use_lvmetad)); // t->input, _bool(cfg.use_lvmetad));
if (cfg.sysinit_needed != t->sysinit_needed) if (cfg.sysinit_needed != t->sysinit_needed)
test_fail("_parse_line('%s') -> sysinit_needed='%s'", test_fail("_parse_line('%s') -> sysinit_needed='%s'",
@ -207,14 +206,13 @@ static void _test_get_config(void *fixture)
bool r; bool r;
unsigned i; unsigned i;
struct config cfg;
const char *path; const char *path;
for (i = 0; i < DM_ARRAY_SIZE(_tests); i++) { for (i = 0; i < DM_ARRAY_SIZE(_tests); i++) {
struct gc_test *t = _tests + i; struct gc_test *t = _tests + i;
struct config cfg = {
cfg.use_lvmetad = false; .sysinit_needed = true
cfg.sysinit_needed = true; };
path = _fake_lvmconfig(t->output); path = _fake_lvmconfig(t->output);
if (!path) if (!path)
@ -225,9 +223,9 @@ static void _test_get_config(void *fixture)
if (!r) if (!r)
test_fail("_get_config() <- '%s' failed", t->output); test_fail("_get_config() <- '%s' failed", t->output);
if (t->use_lvmetad != cfg.use_lvmetad) //if (t->use_lvmetad != cfg.use_lvmetad)
test_fail("_get_config() <- '%s', use_lvmetad = %s", // test_fail("_get_config() <- '%s', use_lvmetad = %s",
t->output, _bool(cfg.use_lvmetad)); // t->output, _bool(cfg.use_lvmetad));
if (t->sysinit_needed != cfg.sysinit_needed) if (t->sysinit_needed != cfg.sysinit_needed)
test_fail("_get_config() <- '%s', sysinit = %s", test_fail("_get_config() <- '%s', sysinit = %s",