]> 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 15:06:21 +0000 (17:06 +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 a59f655a2833095929e4d2912747ad87e7385e71..7671f49bd8e0c8bb24eff9363038cb72c268dd9c 100644 (file)
@@ -887,6 +887,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: