Skip to content

Commit

Permalink
tests: fix two false negatives in parse_config_file()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Mar 29, 2021
1 parent f0383b9 commit cea88c4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/tests/parse_config_file.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit cea88c4

Please sign in to comment.