[lxc-devel] [PATCH] wait 15 seconds instead of forever and produce debug logs for further analyze

Serge Hallyn serge.hallyn at ubuntu.com
Thu Mar 6 23:07:38 UTC 2014


Quoting S.Çağlar Onur (caglar at 10ur.org):
> Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>

Thanks!

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/tests/concurrent.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/tests/concurrent.c b/src/tests/concurrent.c
> index 2d3159b..c4d2ad5 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;
>              }
> -- 
> 1.8.3.2
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list