Testing across more test environments showed that the link tests will fail
in containers.
To not throw away the other tests in those environments via e.g. a
restriction to only run in VMs I decided to just skip the link tests in
this case. Here is the patch that would go on top of the others I already
reported.

-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
From a7166325c8c34a8ae45480e93513a900f0c474ee Mon Sep 17 00:00:00 2001
From: Christian Ehrhardt <christian.ehrha...@canonical.com>
Date: Tue, 14 Jul 2020 07:52:10 +0200
Subject: [PATCH] d/t/test-build: link tests fail in containers

Signed-off-by: Christian Ehrhardt <christian.ehrha...@canonical.com>
---
 debian/tests/test-build | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/debian/tests/test-build b/debian/tests/test-build
index 20b4115..0360b5f 100644
--- a/debian/tests/test-build
+++ b/debian/tests/test-build
@@ -44,10 +44,14 @@ cmp                    io_uring-cp            io_uring-cp.copy
 ./io_uring-cp-static   io_uring-cp-static     io_uring-cp-static.copy
 cmp                    io_uring-cp-static     io_uring-cp-static.copy
 
-./link-cp              link-cp                link-cp.link
-cmp                    link-cp                link-cp.link
-./link-cp-static       link-cp-static         link-cp-static.link
-cmp                    link-cp-static         link-cp-static.link
+# known to fail in containers
+if ! systemd-detect-virt --container -q; then
+    ./link-cp              link-cp                link-cp.link
+    cmp                    link-cp                link-cp.link
+
+    ./link-cp-static       link-cp-static         link-cp-static.link
+    cmp                    link-cp-static         link-cp-static.link
+fi
 
 ./ucontext-cp          ucontext-cp            ucontext-cp.copy
 cmp                    ucontext-cp            ucontext-cp.copy
-- 
2.27.0

Reply via email to