[CRIU] [PATCH] test/zdtm.py: ignore UNIX sockets during report creation

Pavel Emelyanov xemul at virtuozzo.com
Mon Aug 7 15:43:58 MSK 2017


On 07/05/2017 08:23 PM, Mike Rapoport wrote:
> When files are added to the report shutil.copytree is unhappy with
> lazy-pages.socket. Tell shutil.copytree that it should ignore *.socket.
> 
> Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>

Acked-by: Pavel Emelyanov <xemul at virtuozzo.com>

> ---
>  test/zdtm.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/test/zdtm.py b/test/zdtm.py
> index 7af0018..37d245a 100755
> --- a/test/zdtm.py
> +++ b/test/zdtm.py
> @@ -90,8 +90,9 @@ def add_to_report(path, tgt_name):
>  			tgt_path = os.path.join(report_dir, tgt_name + ".%d" % att)
>  			att += 1
>  
> +		ignore = shutil.ignore_patterns('*.socket')
>  		if os.path.isdir(path):
> -			shutil.copytree(path, tgt_path)
> +			shutil.copytree(path, tgt_path, ignore = ignore)
>  		else:
>  			if not os.path.exists(os.path.dirname(tgt_path)):
>  				os.mkdir(os.path.dirname(tgt_path))
> 



More information about the CRIU mailing list