[CRIU] [PATCH] zdtm/bridge: wait when the tentative flas is disappeared

Dmitry Safonov 0x7f454c46 at gmail.com
Mon Apr 30 14:30:40 MSK 2018


> diff --git a/test/zdtm/static/bridge.c b/test/zdtm/static/bridge.c
> index 983c262af..0c26c0b0f 100644
> --- a/test/zdtm/static/bridge.c
> +++ b/test/zdtm/static/bridge.c
> @@ -84,6 +84,10 @@ int main(int argc, char **argv)
>          * (I got this race with zdtm.py, but not with zdtm.sh; not quite sure
>          * what the environment difference is/was.)
>          */
> +       while (1) {
> +               if (system("ip addr list dev " BRIDGE_NAME " | grep tentative"))
> +                       break;
> +       }

`grep -v tentative`, I guess.

As travis failed anyway, maybe it makes sense for v2 to add nanosleep() here?
Just not to busyloop the system pointlessly with fork()s and all that.
Maybe it doesn't make sense, not sure.
But say the dad is slow by some reason - this version will punch the
test system.
A perfect solution would be to read netlink messages for intf.. But
that's a zdtm
test, not sure if it's worth to bother so much.

-- 
             Dmitry


More information about the CRIU mailing list