diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:25:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:25:51 +0000 |
commit | ac8399db6ce846597966360732ce6d39a247bdd2 (patch) | |
tree | 046a28d2cbd02afa147291e8f69e9bb5dc29f1aa /debian/patches/test-bpf-skip-test-when-run-inside-containers.patch | |
parent | Adding upstream version 241. (diff) | |
download | systemd-ac8399db6ce846597966360732ce6d39a247bdd2.tar.xz systemd-ac8399db6ce846597966360732ce6d39a247bdd2.zip |
Adding debian version 241-7~deb10u8.debian/241-7_deb10u8debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/test-bpf-skip-test-when-run-inside-containers.patch')
-rw-r--r-- | debian/patches/test-bpf-skip-test-when-run-inside-containers.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/debian/patches/test-bpf-skip-test-when-run-inside-containers.patch b/debian/patches/test-bpf-skip-test-when-run-inside-containers.patch new file mode 100644 index 0000000..874daa2 --- /dev/null +++ b/debian/patches/test-bpf-skip-test-when-run-inside-containers.patch @@ -0,0 +1,41 @@ +From: Michael Biebl <biebl@debian.org> +Date: Sun, 19 May 2019 20:57:07 +0200 +Subject: test-bpf: skip test when run inside containers + +The test reliably fails inside LXC and Docker when run on a new enough +kernel. It's unclear whether this is a kernel, LXC/Docker or systemd +issue and apparently there is no real interest to get this fixed, so +let's skip this test. +As this also covers Travis CI, there is no need for this additional +check anymore. + +See https://github.com/systemd/systemd/issues/9666 + +(cherry picked from commit 98a3c188a1511caae422b2c891f3cc016824eb81) +--- + src/test/test-bpf.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/test/test-bpf.c b/src/test/test-bpf.c +index cd8d68f..eb1d8d7 100644 +--- a/src/test/test-bpf.c ++++ b/src/test/test-bpf.c +@@ -14,6 +14,7 @@ + #include "test-helper.h" + #include "tests.h" + #include "unit.h" ++#include "virt.h" + + /* We use the same limit here that PID 1 bumps RLIMIT_MEMLOCK to if it can */ + #define CAN_MEMLOCK_SIZE (64U*1024U*1024U) +@@ -56,8 +57,8 @@ int main(int argc, char *argv[]) { + + test_setup_logging(LOG_DEBUG); + +- if (is_run_on_travis_ci()) +- return log_tests_skipped("test-bpf fails on Travis CI: https://github.com/systemd/systemd/issues/9666"); ++ if (detect_container()) ++ return log_tests_skipped("test-bpf fails inside LXC and Docker containers: https://github.com/systemd/systemd/issues/9666"); + + assert_se(getrlimit(RLIMIT_MEMLOCK, &rl) >= 0); + rl.rlim_cur = rl.rlim_max = MAX3(rl.rlim_cur, rl.rlim_max, CAN_MEMLOCK_SIZE); |