[CRIU] Re: make zdtm to not fail if time changed in fd-list

Andrew Vagin avagin at parallels.com
Fri Feb 17 10:22:01 EST 2012


Ack
On Fri, Feb 17, 2012 at 04:03:00PM +0400, Cyrill Gorcunov wrote:
> I've got wrong report on opened files
> 
> -lrwx------ 1 root root 64 Feb 17 14:52 0 -> /dev/null
> -lrwx------ 1 root root 64 Feb 17 14:52 1 -> /dev/null
> -lrwx------ 1 root root 64 Feb 17 14:52 2 -> /dev/null
> +lrwx------ 1 root root 64 Feb 17 14:53 0 -> /dev/null
> +lrwx------ 1 root root 64 Feb 17 14:53 1 -> /dev/null
> +lrwx------ 1 root root 64 Feb 17 14:53 2 -> /dev/null
> 
> as you might see it's because time is changed, so
> maybe something like below fit us?
> 
> 	Cyrill
> ---
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index 3120e41..7c1aecf 100644
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -51,7 +51,7 @@ ARGS=""
>  
>  save_fds()
>  {
> -       ls -l /proc/$1/fd | sed 's/\(-> \(pipe\|socket\)\):.*/\1/' > $2
> +       ls -l /proc/$1/fd | sed 's/\(-> \(pipe\|socket\)\):.*/\1/' | awk '{ print $9,$10,$11; }' > $2
>  }
>  
>  diff_fds()
> 


More information about the CRIU mailing list