[CRIU] [PATCH] test/*/Makefile: remove bash-isms in loops
Konstantin Khorenko
khorenko at parallels.com
Fri Jan 23 13:20:41 PST 2015
Need to make it working in Debian where "dash" is default.
Signed-off-by: Konstantin Khorenko <khorenko at parallels.com>
---
test/zdtm/live/static/Makefile | 4 +++-
test/zdtm/live/streaming/Makefile | 2 +-
test/zdtm/live/transition/Makefile | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile
index a30725b..418e138 100644
--- a/test/zdtm/live/static/Makefile
+++ b/test/zdtm/live/static/Makefile
@@ -266,9 +266,11 @@ stop: $(STATE_OUT)
WAIT_TIME=240
wait_stop:
- for ((i = 0; i < $(WAIT_TIME); i++)); do \
+ i=0; \
+ while [ $$i -lt $(WAIT_TIME) ] ; do \
kill -0 `cat *.pid 2>/dev/null` 2>/dev/null || break; \
sleep 1; \
+ i=`expr $$i + 1`; \
done
$(TST): $(LIB)
diff --git a/test/zdtm/live/streaming/Makefile b/test/zdtm/live/streaming/Makefile
index 1149dbe..5e4ee9b 100644
--- a/test/zdtm/live/streaming/Makefile
+++ b/test/zdtm/live/streaming/Makefile
@@ -56,7 +56,7 @@ stop:
WAIT_TIME=10
wait_stop:
- -for ((i = 0; i < $(WAIT_TIME); i++)); do \
+ -for i in `seq 1 $(WAIT_TIME)`; do \
kill -0 `cat *.pid 2>/dev/null` 2>/dev/null || break; \
sleep 1; \
done
diff --git a/test/zdtm/live/transition/Makefile b/test/zdtm/live/transition/Makefile
index 66b9589..b8ed177 100644
--- a/test/zdtm/live/transition/Makefile
+++ b/test/zdtm/live/transition/Makefile
@@ -54,7 +54,7 @@ stop:
WAIT_TIME=10
wait_stop:
- -for ((i = 0; i < $(WAIT_TIME); i++)); do \
+ -for i in `seq 1 $(WAIT_TIME)`; do \
kill -0 `cat *.pid 2>/dev/null` 2>/dev/null || break; \
sleep 1; \
done
--
1.8.3.1
More information about the CRIU
mailing list