From: S.Çağlar Onur Date: Fri, 13 Sep 2013 18:41:48 +0000 (-0400) Subject: use busybox instead of ubuntu to test as it's much more lightweight, also wait contai... X-Git-Tag: lxc-1.0.0.alpha2~119 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b130964dd7faf19abc7afde7eebe7905a0fe8661;p=thirdparty%2Flxc.git use busybox instead of ubuntu to test as it's much more lightweight, also wait containers to enter desired state Signed-off-by: S.Çağlar Onur Signed-off-by: Serge Hallyn --- diff --git a/src/tests/concurrent.c b/src/tests/concurrent.c index 41c171b70..7faf34cb6 100644 --- a/src/tests/concurrent.c +++ b/src/tests/concurrent.c @@ -40,7 +40,7 @@ void * concurrent(void *arguments) { args->return_code = 1; if (strcmp(args->mode, "create") == 0) { if (!c->is_defined(c)) { - if (!c->create(c, "ubuntu", NULL, NULL, 1, NULL)) { + if (!c->create(c, "busybox", NULL, NULL, 1, NULL)) { fprintf(stderr, "Creating the container (%s) failed...\n", name); goto out; } @@ -52,6 +52,10 @@ void * concurrent(void *arguments) { fprintf(stderr, "Starting the container (%s) failed...\n", name); goto out; } + if (!c->wait(c, "RUNNING", -1)) { + fprintf(stderr, "Waiting the container (%s) to start failed...\n", name); + goto out; + } } } else if(strcmp(args->mode, "stop") == 0) { if (c->is_defined(c) && c->is_running(c)) { @@ -59,6 +63,10 @@ void * concurrent(void *arguments) { fprintf(stderr, "Stopping the container (%s) failed...\n", name); goto out; } + if (!c->wait(c, "STOPPED", -1)) { + fprintf(stderr, "Waiting the container (%s) to stop failed...\n", name); + goto out; + } } } else if(strcmp(args->mode, "destroy") == 0) { if (c->is_defined(c) && !c->is_running(c)) {