[lxc-devel] [PATCH] lxc-test-unpriv: test lxc-clone -s

Stéphane Graber stgraber at ubuntu.com
Sat Aug 16 01:02:19 UTC 2014


On Thu, Aug 14, 2014 at 09:36:01PM +0000, Serge Hallyn wrote:
> This would have caught a regression in Ubuntu's 3.16 kernel.
> 
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
>  src/tests/lxc-test-unpriv | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/src/tests/lxc-test-unpriv b/src/tests/lxc-test-unpriv
> index f5ab535..6242c5f 100755
> --- a/src/tests/lxc-test-unpriv
> +++ b/src/tests/lxc-test-unpriv
> @@ -33,7 +33,8 @@ DONE=0
>  cleanup() {
>  	cd /
>  
> -	run_cmd lxc-stop -n c1 -k
> +	run_cmd lxc-stop -n c2 -k || true
> +	run_cmd lxc-stop -n c1 -k || true
>  	pkill -u $(id -u $TUSER) -9
>  
>  	sed -i '/lxcunpriv/d' /run/lxc/nics /etc/lxc/lxc-usernet
> @@ -122,4 +123,12 @@ p1=$(run_cmd lxc-info -n c1 -p -H)
>  run_cmd lxc-info -n c1
>  run_cmd lxc-attach -n c1 -- /bin/true
>  
> +run_cmd lxc-stop -n c1
> +run_cmd lxc-clone -s -o c1 -n c2
> +run_cmd lxc-start -n c2 -d
> +p1=$(run_cmd lxc-info -n c2 -p -H)
> +[ "$p1" != "-1" ] || { echo "Failed to start container c2"; false; }
> +
> +run_cmd lxc-stop -n c2
> +
>  DONE=1
> -- 
> 2.1.0.rc1
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140815/6cc03ece/attachment-0001.sig>


More information about the lxc-devel mailing list