Fix the test_libbcc/test_libbcc_no_libbpf testcase failure when the kernel version...
authorw00560594 <w00560594@163.com>
Tue, 2 Feb 2021 08:16:07 +0000 (16:16 +0800)
committeryonghong-song <ys114321@gmail.com>
Wed, 3 Feb 2021 22:57:31 +0000 (14:57 -0800)
tests/cc/test_cg_storage.cc

index 141d7ff169d9bd03dc4b052518b1e6d90209a745..a18128cdc292d74b7def1b396578e2be369bd54e 100644 (file)
@@ -63,7 +63,8 @@ int test(struct bpf_sock_ops *skops)
     REQUIRE(res.code() != 0);
   }
 }
-
+#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
 TEST_CASE("test percpu cgroup storage", "[percpu_cgroup_storage]") {
   {
     const std::string BPF_PROGRAM = R"(