[CRIU] [PATCH] jenkins: add script to create a test container

Andrey Vagin avagin at openvz.org
Tue Nov 10 05:36:55 PST 2015


From: Andrew Vagin <avagin at openvz.org>

We want to execute tests in an isolated environment

Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 test/jenkins/_run_ct | 7 +++++++
 test/jenkins/run_ct  | 3 +++
 2 files changed, 10 insertions(+)
 create mode 100755 test/jenkins/_run_ct
 create mode 100755 test/jenkins/run_ct

diff --git a/test/jenkins/_run_ct b/test/jenkins/_run_ct
new file mode 100755
index 0000000..98d8805
--- /dev/null
+++ b/test/jenkins/_run_ct
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+mount --make-rprivate /
+umount -l  /proc
+mount -t proc proc /proc/
+exec "$@"
diff --git a/test/jenkins/run_ct b/test/jenkins/run_ct
new file mode 100755
index 0000000..5992b2e
--- /dev/null
+++ b/test/jenkins/run_ct
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+unshare --mount --pid --fork -- $(readlink -f `dirname $0`/_run_ct) "$@"
-- 
2.4.3



More information about the CRIU mailing list