[CRIU] [PATCH] travis-ci: Enable ia32 tests

Dmitry Safonov dima at arista.com
Tue Apr 9 19:10:31 MSK 2019


Travis CI with Xenial has 4.15 kernel these days - all support for ia32
C/R should be inplace. Finally :)

Putting it into "allow_failures" to let it soak a bit (and while fixing
recent packed signal structure changes).

Signed-off-by: Dmitry Safonov <dima at arista.com>
---
 .travis.yml                 |  4 ++++
 scripts/travis/travis-tests | 24 ++++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index b69b87a3e5db..69fb63343d30 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,8 @@ services:
 env:
   - TR_ARCH=local
   - TR_ARCH=local       CLANG=1
+  - TR_ARCH=local       COMPAT_TEST=y
+  - TR_ARCH=local       CLANG=1 COMPAT_TEST=y
   - TR_ARCH=alpine
   - TR_ARCH=fedora-asan
   - TR_ARCH=x86_64
@@ -30,6 +32,8 @@ matrix:
     - env: TR_ARCH=fedora-rawhide-aarch64
     - env: TR_ARCH=s390x
     - env: TR_ARCH=local        GCOV=1
+    - env: TR_ARCH=local        COMPAT_TEST=y
+    - env: TR_ARCH=local        CLANG=1 COMPAT_TEST=y
 script:
   - sudo make CCACHE=1 -C scripts/travis $TR_ARCH
 after_success:
diff --git a/scripts/travis/travis-tests b/scripts/travis/travis-tests
index 5a8884f07bfe..01a2659f64ce 100755
--- a/scripts/travis/travis-tests
+++ b/scripts/travis/travis-tests
@@ -61,6 +61,30 @@ time make CC="$CC" -j4
 
 [ -n "$SKIP_TRAVIS_TEST" ] && return
 
+if [ "${COMPAT_TEST}x" = "yx" ] ; then
+	# Dirty hack to keep both ia32 & x86_64 shared libs on a machine:
+	# headers are probably not compatible, so apt-get doesn't allow
+	# installing both versions, while we need one for CRIU and one
+	# for 32-bit tests. A better way would involve launching docker..
+	# But it would require making zdtm.py aware of docker and launching
+	# tests inside the CT.
+	INCOMPATIBLE_LIBS="libaio-dev libcap-dev libnl-3-dev libnl-route-3-dev"
+	IA32_PKGS=""
+	REFUGE=64-refuge
+
+	mkdir "$REFUGE"
+	for i in $INCOMPATIBLE_LIBS ; do
+		for j in $(dpkg --listfiles $i | grep '\.so$') ; do
+			cp "$j" "$REFUGE/"
+		done
+		IA32_PKGS="$IA32_PKGS $i:i386"
+	done
+	apt-get remove $INCOMPATIBLE_LIBS
+	apt-get install --no-install-recommends $IA32_PKGS
+	mkdir -p /usr/lib/x86_64-linux-gnu/
+	mv "$REFUGE"/* /usr/lib/x86_64-linux-gnu/
+fi
+
 time make CC="$CC" -j4 -C test/zdtm
 
 [ -f "$CCACHE_LOGFILE" ] && cat $CCACHE_LOGFILE
-- 
2.21.0



More information about the CRIU mailing list