fix wrong bpf path
(also note the program in p/m/C netd.C is not optional or kernel version dependent)
Bug: 237030932
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia984f6a1ce0ab14a204fe47ec295db1363879b7b
diff --git a/staticlibs/native/tcutils/tests/tcutils_test.cpp b/staticlibs/native/tcutils/tests/tcutils_test.cpp
index 32736d6..8129286 100644
--- a/staticlibs/native/tcutils/tests/tcutils_test.cpp
+++ b/staticlibs/native/tcutils/tests/tcutils_test.cpp
@@ -113,12 +113,9 @@
TEST(LibTcUtilsTest, AddAndDeleteIngressPoliceFilter) {
// TODO: this should use bpf_shared.h rather than hardcoding the path
static constexpr char bpfProgPath[] =
- "/sys/fs/bpf/prog_netd_schedact_ingress_account";
+ "/sys/fs/bpf/netd_shared/prog_netd_schedact_ingress_account";
int fd = bpf::retrieveProgram(bpfProgPath);
- if (fd == -1) {
- // ingress policing is not supported.
- return;
- }
+ ASSERT_LE(3, fd);
close(fd);
const int errNOENT = isAtLeastKernelVersion(4, 19, 0) ? ENOENT : EINVAL;