From: S.Çağlar Onur Date: Thu, 6 Mar 2014 22:48:10 +0000 (-0500) Subject: wait 15 seconds instead of forever and produce debug logs for further analyze X-Git-Tag: lxc-1.1.0.alpha1~235 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3afbcc4600ab689dacbec7657dee1aa4b41de08e;p=thirdparty%2Flxc.git wait 15 seconds instead of forever and produce debug logs for further analyze Signed-off-by: S.Çağlar Onur Acked-by: Serge E. Hallyn Signed-off-by: Serge Hallyn --- diff --git a/src/tests/concurrent.c b/src/tests/concurrent.c index 2d3159bed..c4d2ad507 100644 --- a/src/tests/concurrent.c +++ b/src/tests/concurrent.c @@ -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; }