tests: skip test-bpf only when we're 100% sure it's run in containers
authorEvgeny Vereshchagin <evvers@ya.ru>
Thu, 30 May 2019 01:29:50 +0000 (03:29 +0200)
committerMichael Biebl <biebl@debian.org>
Fri, 29 Jan 2021 14:16:06 +0000 (14:16 +0000)
This is just a follow-up to https://github.com/systemd/systemd/pull/12617.

(cherry picked from commit 6bd1457afe396864cc4b9884157a6126027ed85e)

Gbp-Pq: Name tests-skip-test-bpf-only-when-we-re-100-sure-it-s-run-in-.patch

src/test/test-bpf.c

index eb1d8d713e69771579a89d1a81c232b6e0a268e3..9252c60ee9dd3a1279a41ee9d8c8d3a47a58ba2e 100644 (file)
@@ -57,7 +57,7 @@ int main(int argc, char *argv[]) {
 
         test_setup_logging(LOG_DEBUG);
 
-        if (detect_container())
+        if (detect_container() > 0)
                 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);