]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
wait 15 seconds instead of forever and produce debug logs for further analyze
authorS.Çağlar Onur <caglar@10ur.org>
Thu, 6 Mar 2014 22:48:10 +0000 (17:48 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 6 Mar 2014 23:09:26 +0000 (17:09 -0600)
Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/tests/concurrent.c

index 2d3159bedab5a10df4d90dd6f293b96c6e61579a..c4d2ad507947f899ff050486ccf51a24bc706647 100644 (file)
@@ -91,11 +91,15 @@ static void do_function(void *arguments)
     } else if(strcmp(args->mode, "start") == 0) {
         if (c->is_defined(c) && !c->is_running(c)) {
             c->want_daemonize(c, true);
+            if (!quiet) {
+                c->set_config_item(c, "lxc.loglevel", "DEBUG");
+                c->set_config_item(c, "lxc.logfile", name);
+            }
             if (!c->start(c, false, NULL)) {
                 fprintf(stderr, "Starting the container (%s) failed...\n", name);
                 goto out;
             }
-            if (!c->wait(c, "RUNNING", -1)) {
+            if (!c->wait(c, "RUNNING", 15)) {
                 fprintf(stderr, "Waiting the container (%s) to start failed...\n", name);
                 goto out;
             }
@@ -107,7 +111,7 @@ static void do_function(void *arguments)
                 fprintf(stderr, "Stopping the container (%s) failed...\n", name);
                 goto out;
             }
-            if (!c->wait(c, "STOPPED", -1)) {
+            if (!c->wait(c, "STOPPED", 15)) {
                 fprintf(stderr, "Waiting the container (%s) to stop failed...\n", name);
                 goto out;
             }