[lxc-devel] [PATCH] tests: Fix lxc-test-saveconfig cleanup

Serge Hallyn serge.hallyn at ubuntu.com
Fri Jan 24 05:47:33 UTC 2014


Quoting Stéphane Graber (stgraber at ubuntu.com):
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

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

> ---
>  src/tests/saveconfig.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/tests/saveconfig.c b/src/tests/saveconfig.c
> index a455294..e87c74d 100644
> --- a/src/tests/saveconfig.c
> +++ b/src/tests/saveconfig.c
> @@ -98,6 +98,16 @@ int main(int argc, char *argv[])
>  		goto out;
>  	}
>  
> +	if (!c->destroy(c)) {
> +		fprintf(stderr, "%d: error deleting %s\n", __LINE__, MYNAME);
> +		goto out;
> +	}
> +
> +	if (c->is_defined(c)) {
> +		fprintf(stderr, "%d: %s thought it was defined\n", __LINE__, MYNAME);
> +		goto out;
> +	}
> +
>  	fprintf(stderr, "all lxc_container tests passed for %s\n", c->name);
>  	ret = 0;
>  out:
> -- 
> 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