[CRIU] [PATCH 1/1] zdtm: skip 'tcp-close' tests if restore is skipped

Pavel Emelyanov xemul at virtuozzo.com
Wed Jun 28 13:52:07 MSK 2017


On 06/28/2017 03:41 AM, silence wrote:
> From: Pavel Begunkov <asml.silence at gmail.com>
> 
> 'tcp-close' is a option that replaces connected tcp-sockets with
> 'closed' ones during restoring, therefore it have no sense without
> restore stage. Thus let's skip related tests if the 'norst' flag was
> specified.

Andrey, I leave it up to you, but methinks, that we'd better tune up the
zdtm lib to let test know whether it was C/R-ed or not, so that after the
wakeup it can perform different checks on its state.

-- Pavel

> Signed-off-by: Pavel Begunkov <asml.silence at gmail.com>
> ---
>  test/zdtm.py                            | 4 ++++
>  test/zdtm/static/socket-tcp-close0.desc | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/test/zdtm.py b/test/zdtm.py
> index 088572db3..14263a626 100755
> --- a/test/zdtm.py
> +++ b/test/zdtm.py
> @@ -1771,6 +1771,10 @@ def run_tests(opts):
>  				l.skip(t, "arch %s" % tdesc['arch'])
>  				continue
>  
> +			if test_flag(tdesc, 'reqrst') and opts['norst']:
> +				l.skip(t, "restore stage is required")
> +				continue
> +
>  			if run_all and test_flag(tdesc, 'noauto'):
>  				l.skip(t, "manual run only")
>  				continue
> diff --git a/test/zdtm/static/socket-tcp-close0.desc b/test/zdtm/static/socket-tcp-close0.desc
> index e85de0e66..75ce8a5a0 100644
> --- a/test/zdtm/static/socket-tcp-close0.desc
> +++ b/test/zdtm/static/socket-tcp-close0.desc
> @@ -1 +1 @@
> -{'dopts': '--tcp-established', 'ropts': '--tcp-close'}
> +{'dopts': '--tcp-established', 'ropts': '--tcp-close', 'flags': 'reqrst '}
> 



More information about the CRIU mailing list