]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests: add another test for garbage config key
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 29 Mar 2021 10:34:33 +0000 (12:34 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 29 Mar 2021 10:34:33 +0000 (12:34 +0200)
where a valid key has trailing garbage at the end before the "=".

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/tests/parse_config_file.c

index 3442f118b8208a70a8f5623a0eeb1f5f94da30bf..8b5b1b0d295079f636067b8cb0d40554c65f218b 100644 (file)
@@ -902,6 +902,11 @@ int main(int argc, char *argv[])
                return -1;
        }
 
+       if (c->set_config_item(c, "lxc.hook.versionasdfsadfsadf", "1")) {
+               lxc_error("%s\n", "Managed to set to set invalid config item \"lxc.hook.versionasdfsadfsadf\" to \"2\"");
+               goto non_test_error;
+       }
+
        fret = EXIT_SUCCESS;
 
 non_test_error: