[lxc-devel] [PATCH] tests: Fix createtest

Serge Hallyn serge.hallyn at ubuntu.com
Fri Jan 24 05:50:30 UTC 2014


Quoting Stéphane Graber (stgraber at ubuntu.com):
> Drop 60s delay and clear config before loading it.
> 
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

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

> ---
>  src/tests/createtest.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/tests/createtest.c b/src/tests/createtest.c
> index b53c963..ba3a387 100644
> --- a/src/tests/createtest.c
> +++ b/src/tests/createtest.c
> @@ -60,14 +60,13 @@ int main(int argc, char *argv[])
>  		goto out;
>  	}
>  
> +	c->clear_config(c);
>  	c->load_config(c, NULL);
>  	c->want_daemonize(c, true);
>  	if (!c->startl(c, 0, NULL)) {
>  		fprintf(stderr, "%d: failed to start %s\n", __LINE__, MYNAME);
>  		goto out;
>  	}
> -	fprintf(stderr, "%d: %s started, you have 60 seconds to test a console\n", __LINE__, MYNAME);
> -	sleep(60);  // wait a minute to let user connect to console
>  
>  	if (!c->stop(c)) {
>  		fprintf(stderr, "%d: failed to stop %s\n", __LINE__, MYNAME);
> -- 
> 1.8.5.3
> 
> _______________________________________________
> 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