[CRIU] [PATCH 2/2] p.haul: zdtm: use p.haul-ssh

Ruslan Kuprieiev kupruser at gmail.com
Wed Nov 19 15:32:51 PST 2014


Lets use p.haul-ssh to start p.haul-service
for us.

Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 test/zdtm/run.sh | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/test/zdtm/run.sh b/test/zdtm/run.sh
index d6b1792..430809a 100755
--- a/test/zdtm/run.sh
+++ b/test/zdtm/run.sh
@@ -3,6 +3,8 @@ set -x
 CRIU_PATH="../../../criu/"
 CRIU_TESTS="${CRIU_PATH}/test/zdtm/"
 WDIR="$(pwd)/wdir"
+PH=$(realpath ../../p.haul)
+PHS=$(realpath ../../p.haul-service)
 
 rm -rf "$WDIR"
 mkdir "$WDIR"
@@ -19,15 +21,10 @@ echo "Tests started at ${PID}"
 export PATH="${PATH}:${CRIU_PATH}"
 which criu
 
-echo "Start phaul service"
-../../p.haul-service > "${WDIR}/ph-srv.log" 2>&1 &
-PHSPID=$!
-
 echo "Migrating"
-if ! ../../p.haul pid ${PID} "127.0.0.1" -v=4 --keep-images --dst-rpid "${WDIR}/init2.pid" --img-path "${WDIR}"; then
+if ! ../../p.haul-ssh --ssh-ph-exec ${PH} --ssh-phs-exec ${PHS} pid ${PID} "127.0.0.1" -v=4 --keep-images --dst-rpid "${WDIR}/init2.pid" --img-path "${WDIR}"; then
 	echo "Migration failed"
 	kill -TERM ${PID}
-	kill -TERM ${PHSPID}
 	exit 1
 fi
 
@@ -41,7 +38,6 @@ while kill -0 ${PID}; do
 	sleep ".${WTM}"
 	[ $WTM -lt 9 ] && ((WTM++))
 done
-kill -TERM ${PHSPID}
 
 if tail -n1 "${WDIR}/ct.log" | fgrep PASS; then
 	rm -rf "${WDIR}"
-- 
1.9.3



More information about the CRIU mailing list