]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests: cleanup createtest.c
author2xsec <dh48.jeong@samsung.com>
Tue, 3 Jul 2018 09:14:52 +0000 (18:14 +0900)
committer2xsec <dh48.jeong@samsung.com>
Tue, 3 Jul 2018 09:14:52 +0000 (18:14 +0900)
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
src/tests/createtest.c

index 4051f3c2b465bf360ea7c2812abd07c4288e4253..53db119be453935389d6e5bbe14ff184bdac3630 100644 (file)
@@ -48,8 +48,10 @@ int main(int argc, char *argv[])
                fprintf(stderr, "%d: failed to set network type\n", __LINE__);
                goto out;
        }
+
        c->set_config_item(c, "lxc.net.0.link", "lxcbr0");
        c->set_config_item(c, "lxc.net.0.flags", "up");
+
        if (!c->createl(c, "busybox", NULL, NULL, 0, NULL)) {
                fprintf(stderr, "%d: failed to create a trusty container\n", __LINE__);
                goto out;
@@ -63,6 +65,7 @@ int main(int argc, char *argv[])
        c->clear_config(c);
        c->load_config(c, NULL);
        c->want_daemonize(c, true);
+
        if (!c->startl(c, 0, NULL)) {
                fprintf(stderr, "%d: failed to start %s\n", __LINE__, MYNAME);
                goto out;
@@ -85,6 +88,7 @@ int main(int argc, char *argv[])
 
        fprintf(stderr, "all lxc_container tests passed for %s\n", c->name);
        ret = 0;
+
 out:
        lxc_container_put(c);
        exit(ret);