]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests: fix order in sys_mixed
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 17 Aug 2021 10:14:53 +0000 (12:14 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 17 Aug 2021 11:51:27 +0000 (13:51 +0200)
We need to set the config item after we loaded the config obviously.

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

index b8f21f5a3a29f5535825069a608bc7ea8d6d9499..785f6e8678609aa7fb1c24a383a78ee2ee076b96 100644 (file)
@@ -106,16 +106,16 @@ int main(int argc, char *argv[])
 
        c->clear_config(c);
 
-       if (!c->set_config_item(c, "lxc.mount.auto", "sys:mixed")) {
-               lxc_error("%s\n", "Failed to set config item \"lxc.mount.auto=sys:mixed\"");
-               goto on_error_put;
-       }
-
        if (!c->load_config(c, NULL)) {
                lxc_error("%s\n", "Failed to load config for container \"sys-mixed\"");
                goto on_error_stop;
        }
 
+       if (!c->set_config_item(c, "lxc.mount.auto", "sys:mixed")) {
+               lxc_error("%s\n", "Failed to set config item \"lxc.mount.auto=sys:mixed\"");
+               goto on_error_put;
+       }
+
        if (!c->want_daemonize(c, true)) {
                lxc_error("%s\n", "Failed to mark container \"sys-mixed\" daemonized");
                goto on_error_stop;