[CRIU] [PATCH 3/6] zdtm: Drop -m argument to readlink.

Andrew Vagin avagin at parallels.com
Thu Aug 7 01:19:26 PDT 2014


On Wed, Aug 06, 2014 at 06:02:11PM -0400, Christopher Covington wrote:
> The -m argument to readlink is not supported by Busybox v1.19.4.
> 
> Signed-off-by: Christopher Covington <cov at codeaurora.org>
> ---
>  test/zdtm.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index 55e333a..8d990d8 100755
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -518,7 +518,7 @@ EOF
>  		local cpt_args=
>  		local dump_only=
>  		local dump_cmd="dump"
> -		ddump=`readlink -fm dump/$tname/$PID/$i`
> +		ddump=`readlink -f dump/$tname/$PID/$i`

++ readlink -f dump/unlink_fstat02/1571/1
+ ddump=

# readlink -fm dump/unlink_fstat02/1571/1
/root/git/criu/dump/unlink_fstat02/1571/1

# ls /root/git/criu/dump/unlink_fstat02/1571/1
ls: cannot access /root/git/criu/dump/unlink_fstat02/1571/1: No such
file or directory


The -m option is required if a target doesn't exist.

I think we need smth like this:
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 6729b91..990ea72 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -527,10 +527,11 @@ EOF
                local cpt_args=
                local dump_only=
                local dump_cmd="dump"
-               ddump=`readlink -fm dump/$tname/$PID/$i`
+               ddump=dump/$tname/$PID/$i
+               mkdir -p $ddump
+               ddump=`readlink -f $ddump`
                DUMP_PATH=$ddump
                echo Dump $PID
-               mkdir -p $ddump
 
                [ -n "$DUMP_ONLY" ] && dump_only=1

Thanks.


>  		DUMP_PATH=$ddump
>  		echo Dump $PID
>  		mkdir -p $ddump
> -- 
> Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> hosted by the Linux Foundation.
> 


More information about the CRIU mailing list