From 54904516e66a01e4817361bf5f9d0761fad44e22 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Thu, 13 May 2021 13:16:20 +1000 Subject: [PATCH] libcontainer: fix integration failure in "make test" When running inside a Docker container, systemd is not available. The new TestFdLeaksSystemd forgot to include the relevant t.Skip section. Fixes: a7feb4239534 ("libct/int: add TestFdLeaksSystemd") Signed-off-by: Aleksa Sarai --- libcontainer/integration/exec_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libcontainer/integration/exec_test.go b/libcontainer/integration/exec_test.go index c6aa394ce..26de5b64f 100644 --- a/libcontainer/integration/exec_test.go +++ b/libcontainer/integration/exec_test.go @@ -1921,6 +1921,9 @@ func TestFdLeaks(t *testing.T) { } func TestFdLeaksSystemd(t *testing.T) { + if !systemd.IsRunningSystemd() { + t.Skip("Test requires systemd.") + } testFdLeaks(t, true) }