[CRIU] [PATCH] dump: Introduce "post-dump" script action

Andrew Vagin avagin at parallels.com
Fri Jul 12 16:13:50 EDT 2013


On Sat, Jul 13, 2013 at 12:04:42AM +0400, Cyrill Gorcunov wrote:
> On Fri, Jul 12, 2013 at 11:30:55PM +0400, Cyrill Gorcunov wrote:
> > 
> > ok
> 
> Did you mean something like below?

"bash zdtm.sh -d" should work for all test cases.

> From 3b124c3b7d29e1b9c1dd94c7da29bcab7b8e4fb5 Mon Sep 17 00:00:00 2001
> From: Cyrill Gorcunov <gorcunov at openvz.org>
> Date: Fri, 12 Jul 2013 23:46:22 +0400
> Subject: [PATCH] zdtm: Add post-dump script
> 
> Use it together with -d option
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  test/post-dump.sh | 8 ++++++++
>  test/zdtm.sh      | 3 ++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
>  create mode 100755 test/post-dump.sh
> 
> diff --git a/test/post-dump.sh b/test/post-dump.sh
> new file mode 100755
> index 0000000..bf411c6
> --- /dev/null
> +++ b/test/post-dump.sh

post-dump-rollback.sh looks better for me

> @@ -0,0 +1,8 @@
> +#!/bin/sh
> +
> +action=$1
> +shift
> +
> +[ "$action" == post-dump ] && {
> +        exit -1
	exit 1
> +}
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index 9749b90..bacdfb0 100755
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -499,7 +499,8 @@ cd `dirname $0` || exit 1
>  
>  while :; do
>  	if [ "$1" = "-d" ]; then
> -		ARGS="-s"
> +		script=`dirname $CRIU`/test/post-dump.sh
> +		ARGS="-s --action-script $script"

Why do we need -s and --action-script together?

>  		shift
>  		continue
>  	fi
> -- 
> 1.8.1.4
> 



More information about the CRIU mailing list