[CRIU] [PATCH] test: return the iteration number to the end of the test path

Andrew Vagin avagin at parallels.com
Fri Dec 19 04:43:01 PST 2014


On Thu, Dec 18, 2014 at 02:01:56PM -0500, Christopher Covington wrote:
> Hi Andrew,
> 
> On 12/01/2014 06:56 AM, Andrew Vagin wrote:
> > When we generate a path to the previous images, we take a directory name
> > and the previous iteration number.
> > 
> > Reported-by: Mr Jenkins
> > Signed-off-by: Andrew Vagin <avagin at openvz.org>
> > ---
> >  test/zdtm.sh | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/test/zdtm.sh b/test/zdtm.sh
> > index 9ee1cf4..aacdc71 100755
> > --- a/test/zdtm.sh
> > +++ b/test/zdtm.sh
> > @@ -650,11 +650,12 @@ EOF
> >  		gen_args="$gen_args --force-irmap"
> >  	fi
> >  
> > +	ddump=`readlink -fm dump/$test_name/$PID/$i`
> 
> It looks to me that at this point $i is unset.

You are right. I will fix this. Thanks.

> 
> >  	for i in `seq $ITERATIONS`; do
> >  		local cpt_args=
> >  		local dump_only=
> >  		local dump_cmd="dump"
> > -		ddump=`readlink -fm dump/$test_name/$i/$PID`
> > +		ddump=`dirname $ddump`/$i
> 
> Is there some reason that the following wouldn't work?
> 
> 		ddump=dump/$test_name/$PID/$i

PID is changed on each iteration. I want to have all iterations in one
directory.

> 
> >  		DUMP_PATH=$ddump
> >  		echo Dump $PID
> >  		mkdir -p $ddump
> > 
> 
> Thanks,
> Chris
> 
> -- 
> Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project


More information about the CRIU mailing list