[CRIU] [PATCH 3/3] test: Handle parseargs for VZ7 qa envinronment

Vitaly Ostrosablin vostrosablin at virtuozzo.com
Mon Nov 28 00:51:22 PST 2016


Well, yes, it's possible to add that. But our testing lib has no mechanism to properly set env vars, so we'll have to pass them in each system() call along with make command to start tests.


________________________________
От: Pavel Emelianov
Отправлено: 25 ноября 2016 г. 18:00
Кому: Cyrill Gorcunov; crml
Копия: Vitaly Ostrosablin; Andrey Vagin
Тема: Re: [CRIU] [PATCH 3/3] test: Handle parseargs for VZ7 qa envinronment

On 11/25/2016 05:20 PM, Cyrill Gorcunov wrote:
> From: Vitaly Ostrosablin <vostrosablin at virtuozzo.com>
>
> Test seem to assume that zdtm lib directory is on PATH, but if it's not

... then it should be added there by the caller ;)

> - calling for parseargs.sh would fail (if cwd is static). Therefore,
> this patch adds a envvar, which, if set, uses old behavior, and else
> goes to ../lib/parseargs.sh
>
> Signed-off-by: Vitaly Ostrosablin <vostrosablin at virtuozzo.com>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  test/zdtm/static/conntracks  | 7 ++++++-
>  test/zdtm/static/route_rules | 7 ++++++-
>  2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/test/zdtm/static/conntracks b/test/zdtm/static/conntracks
> index 54898c76f157..9c5be1be4de7 100755
> --- a/test/zdtm/static/conntracks
> +++ b/test/zdtm/static/conntracks
> @@ -45,8 +45,13 @@ do_stop()
>        echo "PASS" > $outfile
>  }
>
> +if [ -z $VZENV ]; then
> +    parseargs=../lib/parseargs.sh
> +else
> +    parseargs=parseargs.sh
> +fi
>
> -tmpargs="$(parseargs.sh --name=$0 \
> +tmpargs="$($parseargs --name=$0 \
>                --flags-req=statefile,outfile \
>                --flags-opt="start,stop" -- "$@")" ||
>        die "can't parse command line"
> diff --git a/test/zdtm/static/route_rules b/test/zdtm/static/route_rules
> index ea44537c78b9..139fbb9e05a6 100755
> --- a/test/zdtm/static/route_rules
> +++ b/test/zdtm/static/route_rules
> @@ -60,8 +60,13 @@ do_stop()
>        echo "PASS" > $outfile
>  }
>
> +if [ -z $VZENV ]; then
> +    parseargs=../lib/parseargs.sh
> +else
> +    parseargs=parseargs.sh
> +fi
>
> -tmpargs="$(parseargs.sh --name=$0 \
> +tmpargs="$($parseargs --name=$0 \
>                --flags-req=statefile,outfile \
>                -- "$@")" ||
>        die "can't parse command line"
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20161128/936d01f7/attachment.html>


More information about the CRIU mailing list