2
0
mirror of git://github.com/lxc/lxc synced 2025-08-30 17:39:34 +00:00

tests: fix two false negatives in parse_config_file()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner
2021-03-29 12:33:33 +02:00
parent f0383b96e0
commit cea88c47ac

View File

@@ -877,15 +877,13 @@ int main(int argc, char *argv[])
goto non_test_error;
}
ret = set_get_compare_clear_save_load(c, "lxc.hook.version", "2", tmpf, true);
if (ret == 0) {
lxc_error("%s\n", "lxc.hook.version");
if (c->set_config_item(c, "lxc.hook.version", "2")) {
lxc_error("%s\n", "Managed to set to set invalid config item \"lxc.hook.version\" to \"2\"");
goto non_test_error;
}
ret = set_get_compare_clear_save_load(c, "lxc.monitor.signal.pdeath", "SIGKILL", tmpf, true);
if (ret == 0) {
lxc_error("%s\n", "lxc.hook.version");
if (!c->set_config_item(c, "lxc.monitor.signal.pdeath", "SIGKILL")) {
lxc_error("%s\n", "Failed to set to set invalid config item \"lxc.monitor.signal.pdeath\" to \"SIGKILL\"");
goto non_test_error;
}