]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests: fix two false negatives in parse_config_file()
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 29 Mar 2021 10:33:33 +0000 (12:33 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 29 Mar 2021 10:33:33 +0000 (12:33 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/tests/parse_config_file.c

index 0fa129500f851477365494c50b81a2207054594f..3442f118b8208a70a8f5623a0eeb1f5f94da30bf 100644 (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;
        }