Unverified Commit 0ade28c2 by 2xsec Committed by Christian Brauner

tests: cleanup createtest.c

Signed-off-by: 's avatar2xsec <dh48.jeong@samsung.com>
parent 6ad802b2
...@@ -48,8 +48,10 @@ int main(int argc, char *argv[]) ...@@ -48,8 +48,10 @@ int main(int argc, char *argv[])
fprintf(stderr, "%d: failed to set network type\n", __LINE__); fprintf(stderr, "%d: failed to set network type\n", __LINE__);
goto out; goto out;
} }
c->set_config_item(c, "lxc.net.0.link", "lxcbr0"); c->set_config_item(c, "lxc.net.0.link", "lxcbr0");
c->set_config_item(c, "lxc.net.0.flags", "up"); c->set_config_item(c, "lxc.net.0.flags", "up");
if (!c->createl(c, "busybox", NULL, NULL, 0, NULL)) { if (!c->createl(c, "busybox", NULL, NULL, 0, NULL)) {
fprintf(stderr, "%d: failed to create a trusty container\n", __LINE__); fprintf(stderr, "%d: failed to create a trusty container\n", __LINE__);
goto out; goto out;
...@@ -63,6 +65,7 @@ int main(int argc, char *argv[]) ...@@ -63,6 +65,7 @@ int main(int argc, char *argv[])
c->clear_config(c); c->clear_config(c);
c->load_config(c, NULL); c->load_config(c, NULL);
c->want_daemonize(c, true); c->want_daemonize(c, true);
if (!c->startl(c, 0, NULL)) { if (!c->startl(c, 0, NULL)) {
fprintf(stderr, "%d: failed to start %s\n", __LINE__, MYNAME); fprintf(stderr, "%d: failed to start %s\n", __LINE__, MYNAME);
goto out; goto out;
...@@ -85,6 +88,7 @@ int main(int argc, char *argv[]) ...@@ -85,6 +88,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "all lxc_container tests passed for %s\n", c->name); fprintf(stderr, "all lxc_container tests passed for %s\n", c->name);
ret = 0; ret = 0;
out: out:
lxc_container_put(c); lxc_container_put(c);
exit(ret); exit(ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment