Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Reber <areber@redhat.com>2018-05-31 12:00:03 +0300
committerAndrei Vagin <avagin@virtuozzo.com>2018-06-19 19:59:13 +0300
commitdf9ffa10bc63e761d349766b3bdb031a1179fa87 (patch)
tree8a115d7c70bfdb8a4ea2b78923fcee0768e8842f
parentb1ac40b8dc258160f1dabd6b9bd2bc2247a05993 (diff)
test/other/rpc: resurrect the RPC test cases
In this directory there are various test cases using CRIU in RPC mode (or SWRK mode). This fixes the broken tests by moving the start of 'criu service' from run.sh to the Makefile as the test cases is running using "sudo -g '#1000' -u '#1000'" and the PID file created by CRIU can only be read by the root user. If starting the 'criu service' before run.sh the PID file still can be changed to 0666 and fixing the test script. This also adds version.py to the test cases that are executed. Signed-off-by: Adrian Reber <areber@redhat.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
-rw-r--r--test/others/rpc/Makefile4
-rwxr-xr-xtest/others/rpc/run.sh7
2 files changed, 4 insertions, 7 deletions
diff --git a/test/others/rpc/Makefile b/test/others/rpc/Makefile
index bf2a2d262..5b383cfb8 100644
--- a/test/others/rpc/Makefile
+++ b/test/others/rpc/Makefile
@@ -7,7 +7,11 @@ LDLIBS += -lprotobuf-c
run: all
mkdir -p build
chmod a+rwx build
+ @# need to start the criu daemon here to access the pidfile
+ sudo -g '#1000' -u '#1000' ./criu service -v4 -W build -o service.log --address criu_service.socket -d --pidfile pidfile
+ chmod a+rw build/pidfile
sudo -g '#1000' -u '#1000' ./run.sh
+ sudo -g '#1000' -u '#1000' ./version.py
criu: ../../../criu/criu
cp ../../../criu/criu $@
diff --git a/test/others/rpc/run.sh b/test/others/rpc/run.sh
index ed99addb2..aaf48f4ad 100755
--- a/test/others/rpc/run.sh
+++ b/test/others/rpc/run.sh
@@ -15,11 +15,6 @@ function title_print {
}
-function start_server {
- title_print "Start service server"
- ${CRIU} service -v4 -W build -o service.log --address criu_service.socket -d --pidfile pidfile
-}
-
function stop_server {
title_print "Shutdown service server"
kill -SIGTERM $(cat build/pidfile)
@@ -78,8 +73,6 @@ function test_errno {
trap 'echo "FAIL"; stop_server' EXIT
-start_server
-
test_c
test_py
test_restore_loop