[CRIU] Re: [PATCH 2/3] zdtm: Don't wait for dump forever
Kir Kolyshkin
kir at openvz.org
Sat Jun 2 03:31:51 EDT 2012
On 06/01/2012 08:38 PM, Cyrill Gorcunov wrote:
> In case if something goes wrong with
> dumping better to exit rather than
> stuck forever.
>
> Signed-off-by: Cyrill Gorcunov<gorcunov at openvz.org>
> ---
> test/zdtm.sh | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index b2da0ab..230292c 100644
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -116,7 +116,7 @@ run_test()
> diff_fds $ddump/dump.fd $ddump/dump.fd.after || return 1
> killall -CONT $tname
> else
> - while :; do
> + for i in `seq 50`; do
> killall -9 $tname&> /dev/null || break
> echo Waiting for $tname complete dumping...
I would add iteration counter here, like
local maxwait=50
...
for I in in $(seq $maxwait); do
echo "[$i/$maxwait] Waiting for $tname to complete dumping.."
> sleep 1
More information about the CRIU
mailing list