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

Andrei Vagin avagin at virtuozzo.com
Tue Aug 8 04:24:34 MSK 2017


Applied, thanks!
On Wed, Jul 05, 2017 at 08:23:48PM +0300, 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>
> ---
>  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))
> -- 
> 2.7.4
> 


More information about the CRIU mailing list