[CRIU] [PATCH 2/3] zdtm: Use "post-dump" script for "-d" option

Andrew Vagin avagin at parallels.com
Mon Jul 15 09:01:44 EDT 2013


On Mon, Jul 15, 2013 at 11:53:03AM +0400, Cyrill Gorcunov wrote:
> 
> https://bugzilla.openvz.org/show_bug.cgi?id=2583
> 
> Note -s option remains internally for easier parsing if
> --script was used.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  test/post-dump.sh | 9 +++++++++
>  test/zdtm.sh      | 3 ++-
>  2 files changed, 11 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..8cc6fed
> --- /dev/null
> +++ b/test/post-dump.sh
> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +
> +[ $CRTOOLS_SCRIPT_ACTION == post-dump ] && {
> +	#
> +	# Special code to inform CRIU that
> +	# it should turn off repair mode
> +	# on sockets.
> +        exit 32
> +}
> 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"

I don't know why do we need -s in this case. And we need to do the same
for non-last snapshot.

>  		shift
>  		continue
>  	fi



More information about the CRIU mailing list