From 47a03c576465a89d927c50ebd24b9ad455006325 Mon Sep 17 00:00:00 2001 From: Harish Sadineni Date: Thu, 24 Apr 2025 15:21:51 +0530 Subject: bcc: Fix for test bpf stack_id table The test for bpf_stack_id was failing due to the system being unable to locate libc.so.6. Upon investigation using strace, the following error was observed: newfstatat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", 0x7ffdcd475420, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/lib64/libc.so.6", 0x7ffdcd475420, 0) = -1 ENOENT (No such file or directory) This issue occurs because libc.so.6 was not found in the expected locations. To resolve this, the location of libc.so.6 in image has been added . It is now accessible at: /lib/libc.so.6 Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5292] Signed-off-by: Harish Sadineni --- .../meta-python/recipes-devtools/bcc/bcc/bpf_stack_id.patch | 13 +++++++++++++ .../meta-python/recipes-devtools/bcc/bcc_0.33.0.bb | 1 + 2 files changed, 14 insertions(+) create mode 100644 dynamic-layers/meta-python/recipes-devtools/bcc/bcc/bpf_stack_id.patch diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/bpf_stack_id.patch b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/bpf_stack_id.patch new file mode 100644 index 0000000..18221be --- /dev/null +++ b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/bpf_stack_id.patch @@ -0,0 +1,13 @@ +Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5292] +Signed-off-by: Harish Sadineni + +--- a/tests/cc/test_bpf_table.cc ++++ b/tests/cc/test_bpf_table.cc +@@ -260,6 +260,7 @@ + /* libc locations on different distributions are added below*/ + bpf.add_module("/lib/x86_64-linux-gnu/libc.so.6"); //Location of libc in ubuntu + bpf.add_module("/lib64/libc.so.6"); //Location of libc fedora machine ++ bpf.add_module("/lib/libc.so.6");//location of libc in image + + int stack_id = id[0]; + REQUIRE(stack_id >= 0); diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.33.0.bb b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.33.0.bb index 2839d69..3285020 100644 --- a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.33.0.bb +++ b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.33.0.bb @@ -24,6 +24,7 @@ SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https \ file://0001-CMakeLists.txt-don-t-modify-.gitconfig-on-build-host.patch \ file://run-ptest \ file://ptest_wrapper.sh \ + file://bpf_stack_id.patch \ " SRCREV = "92e32ff8a06616779f3a3191b75da6881d59fd17" -- cgit v1.2.3-54-g00ecf