Commit 156b1b81 authored by Yicheng Qin's avatar Yicheng Qin Committed by Pavel Emelyanov

test: create env.sh for environment setting

Currently, env.sh only contains the location of criu executable.
Signed-off-by: 's avatarYicheng Qin <yichengq@google.com>
Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f1684be8
#!/bin/bash
source ../../../functions.sh || exit 1
criu="../../../../criu"
source ../../../env.sh || exit 1
cleanup_class() {
rm -f ./*.class
......
#!/usr/bin/expect
source ../../env.sh || exit 1
exec rm -rf ./dump
exec mkdir ./dump
......@@ -21,7 +23,7 @@ switch $current {
puts "FAIL: Timed out on ready"
exit -1
}
system ../../../criu dump -v4 -D ./dump -o dump.log -j -t $pid
system $criu dump -v4 -D ./dump -o dump.log -j -t $pid
system echo "$pid" > ./dump/pid.pid
exit 0
}
......@@ -37,7 +39,7 @@ switch $current {
exit -1
}
spawn ../../../criu restore -v4 -D ./dump -o restore.log -j
spawn $criu restore -v4 -D ./dump -o restore.log -j
#
# spawn doesn't wait for restore to complete, so
# add some sleep here. Still better would be to
......
#!/bin/bash
source ../../env.sh || exit 1
[ -z "$CR_IP_TOOL" ] && CR_IP_TOOL=ip
cd `dirname $0`
criu="../../../criu"
name=$1
[ -z "$name" ] && { cat <<EOF
Usage: $0 NAME [PID]"
......
#!/bin/bash
source ../../functions.sh || exit 1
criu="../../../criu"
source ../../env.sh || exit 1
cleanup_wd() {
rm -f "ref-*"
......
#!/bin/bash
source ../../functions.sh || exit 1
criu="../../../criu"
source ../../env.sh || exit 1
set -x
......
#!/bin/bash
source ../../functions.sh || exit 1
source ../../env.sh || exit 1
criu="../../../criu"
DEPTH=3
SPAN=5
archref="arch-ref.tar.bz2"
......
set -m
source ../../functions.sh || exit 1
criu="../../../criu"
source ../../env.sh || exit 1
mkdir data
......
#!/bin/sh
CRIU=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../criu)
criu=$CRIU
#!/bin/bash
source ../env.sh || exit 1
function fail {
echo "$@"
exit 1
}
set -x
CRIU="../../criu"
IMGDIR="dump/"
rm -rf "$IMGDIR"
......
#!/bin/bash
source ../env.sh || exit 1
USEPS=0
if [ "$1" = "-s" ]; then
......@@ -18,7 +20,6 @@ function fail {
}
set -x
CRIU="../../criu"
IMGDIR="dump/"
rm -rf "$IMGDIR"
......
#!/bin/bash
source ../env.sh || exit 1
USEPS=0
if [ "$1" = "-s" ]; then
......@@ -18,7 +20,6 @@ function fail {
}
set -x
CRIU="../../criu"
IMGDIR="dump/"
rm -rf "$IMGDIR"
......
#!/bin/bash
source ../env.sh || exit 1
set -x
PORT=12345
......@@ -7,7 +9,6 @@ CLN_PIPE="./clnt_pipe"
SRV_LOG="./srv.log"
CLN_LOG="./cln.log"
DDIR="dump"
CRIU="../../criu"
TEXT=$(hexdump -C /dev/urandom | head -n 1)
......
......@@ -137,7 +137,8 @@ fanotify00
sk-netlink
"
CRIU=$(readlink -f `dirname $0`/../criu)
source $(readlink -f `dirname $0`/env.sh) || exit 1
CRIU_CPT=$CRIU
TMP_TREE=""
SCRIPTDIR=`dirname $CRIU`/test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment