]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc: tests: use busybox template rather than ubuntu
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 12 Mar 2014 23:48:15 +0000 (18:48 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 13 Mar 2014 00:16:11 +0000 (20:16 -0400)
to speed up tests where it doesn't matter

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/tests/clonetest.c
src/tests/createtest.c
src/tests/destroytest.c
src/tests/get_item.c
src/tests/saveconfig.c
src/tests/shutdowntest.c
src/tests/startone.c

index efd673eb1b556550b7bc3d4ab8a4a4fb5ca3ab8c..814706d27785c57dff35f5f74abb19a267a2fac1 100644 (file)
@@ -53,7 +53,7 @@ int main(int argc, char *argv[])
                goto out;
        }
        c->save_config(c, NULL);
-       if (!c->createl(c, "ubuntu", NULL, NULL, 0, NULL)) {
+       if (!c->createl(c, "busybox", NULL, NULL, 0, NULL)) {
                fprintf(stderr, "%d: failed to create a container\n", __LINE__);
                goto out;
        }
index 597dff5ab079abdbb3f9f2d0cbef12f0b22dd8f6..955a85134a4f5220fd39d285d68cf0c3435503e8 100644 (file)
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
        }
        c->set_config_item(c, "lxc.network.link", "lxcbr0");
        c->set_config_item(c, "lxc.network.flags", "up");
-       if (!c->createl(c, "ubuntu", NULL, NULL, 0, "-r", "trusty", NULL)) {
+       if (!c->createl(c, "busybox", NULL, NULL, 0, NULL)) {
                fprintf(stderr, "%d: failed to create a trusty container\n", __LINE__);
                goto out;
        }
index 4d051192cbf62cdb6f283b1e6051534b89e6df1c..4bb6aaead850e0dae6262836ff214cb799bcb4e1 100644 (file)
@@ -28,7 +28,7 @@
 
 #define MYNAME "lxctest1"
 
-static int create_ubuntu(void)
+static int create_container(void)
 {
        int status, ret;
        pid_t pid = fork();
@@ -38,7 +38,7 @@ static int create_ubuntu(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-n", MYNAME, NULL);
+               ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
                // Should not return
                perror("execl");
                exit(1);
@@ -76,8 +76,8 @@ int main(int argc, char *argv[])
                goto out;
        }
 
-       if (create_ubuntu()) {
-               fprintf(stderr, "%d: failed to create a ubuntu container\n", __LINE__);
+       if (create_container()) {
+               fprintf(stderr, "%d: failed to create a container\n", __LINE__);
                goto out;
        }
 
index 518dbd19c79423c983ac71334d0c9e85f9b7816c..d9c5aef57b3d01005dd30dd2663b9bcbd27cbaf8 100644 (file)
@@ -171,7 +171,7 @@ int main(int argc, char *argv[])
                ret = 1;
                goto out;
        }
-       if (!c->createl(c, "ubuntu", NULL, NULL, 0, "-r", "trusty", NULL)) {
+       if (!c->createl(c, "busybox", NULL, NULL, 0, NULL)) {
                fprintf(stderr, "%d: failed to create a trusty container\n", __LINE__);
                ret = 1;
                goto out;
index e87c74d97c4762525c6f415c8d83cdcd26e565f6..de2fa82b6d32cafc4c0c6e2522a9195e1bb43c86 100644 (file)
@@ -28,7 +28,7 @@
 
 #define MYNAME "lxctest1"
 
-static int create_ubuntu(void)
+static int create_container(void)
 {
        int status, ret;
        pid_t pid = fork();
@@ -38,7 +38,7 @@ static int create_ubuntu(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-n", MYNAME, NULL);
+               ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
                // Should not return
                perror("execl");
                exit(1);
@@ -76,8 +76,8 @@ int main(int argc, char *argv[])
                goto out;
        }
 
-       if (create_ubuntu()) {
-               fprintf(stderr, "%d: failed to create a ubuntu container\n", __LINE__);
+       if (create_container()) {
+               fprintf(stderr, "%d: failed to create a container\n", __LINE__);
                goto out;
        }
 
index 53fe8c6e6e82428b361abe073a4a668b5e1e248f..2450221ffff554be72b4e97c018fe9d65c4c60c1 100644 (file)
@@ -51,8 +51,8 @@ int main(int argc, char *argv[])
        }
        c->set_config_item(c, "lxc.network.link", "lxcbr0");
        c->set_config_item(c, "lxc.network.flags", "up");
-       if (!c->createl(c, "ubuntu", NULL, NULL, 0, "-r", "trusty", NULL)) {
-               fprintf(stderr, "%d: failed to create a trusty container\n", __LINE__);
+       if (!c->createl(c, "busybox", NULL, NULL, 0, NULL)) {
+               fprintf(stderr, "%d: failed to create a container\n", __LINE__);
                goto out;
        }
 
index b46fc982894f9d9d67a1dac730e5209067271064..d2879f6244b6d47907fe4f8fffc2ae7ac8c310eb 100644 (file)
@@ -29,7 +29,7 @@
 
 #define MYNAME "lxctest1"
 
-static int destroy_ubuntu(void)
+static int destroy_container(void)
 {
        int status, ret;
        pid_t pid = fork();
@@ -61,7 +61,7 @@ again:
        return WEXITSTATUS(status);
 }
 
-static int create_ubuntu(void)
+static int create_container(void)
 {
        int status, ret;
        pid_t pid = fork();
@@ -71,7 +71,7 @@ static int create_ubuntu(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-create", "lxc-create", "-t", "ubuntu", "-n", MYNAME, NULL);
+               ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
                // Should not return
                perror("execl");
                exit(1);
@@ -116,9 +116,9 @@ int main(int argc, char *argv[])
                goto out;
        }
 
-       ret = create_ubuntu();
+       ret = create_container();
        if (ret) {
-               fprintf(stderr, "%d: failed to create a ubuntu container\n", __LINE__);
+               fprintf(stderr, "%d: failed to create a container\n", __LINE__);
                goto out;
        }
 
@@ -251,7 +251,7 @@ ok:
 out:
        if (c) {
                c->stop(c);
-               destroy_ubuntu();
+               destroy_container();
        }
        lxc_container_put(c);
        exit(ret);