Skip to content

Commit

Permalink
Temporarily use BPF_LINK_TYPE_UNSPEC
Browse files Browse the repository at this point in the history
  • Loading branch information
lmb committed Dec 17, 2024
1 parent ebf8acb commit c138ae6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/unit/libbpf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2165,7 +2165,7 @@ TEST_CASE("enumerate link IDs", "[libbpf]")
REQUIRE(errno == ENOENT);
}

TEST_CASE("enumerate link IDs with bpf", "[libbpf]")
TEST_CASE("enumerate link IDs with bpf", "[libbpf][bpf]")
{
_test_helper_end_to_end test_helper;
test_helper.initialize();
Expand Down Expand Up @@ -2262,15 +2262,17 @@ TEST_CASE("enumerate link IDs with bpf", "[libbpf]")
attr.info.info_len = sizeof(info);
REQUIRE(bpf(BPF_OBJ_GET_INFO_BY_FD, &attr, sizeof(attr)) == 0);
REQUIRE(info.id == id1);

// Get info on the second link.
memset(&attr, 0, sizeof(attr));
info = {};
attr.info.bpf_fd = fd2;
attr.info.info = (uintptr_t)&info;
attr.info.info_len = sizeof(info);
REQUIRE(bpf(BPF_OBJ_GET_INFO_BY_FD, &attr, sizeof(attr)) == 0);
REQUIRE(info.type == BPF_LINK_TYPE_PLAIN);
// TODO: Should this be BPF_LINK_TYPE_PLAIN?
// See https://github.com/microsoft/ebpf-for-windows/issues/4096
REQUIRE(info.type == BPF_LINK_TYPE_UNSPEC);
REQUIRE(info.id == id2);
REQUIRE(info.prog_id != 0);

Expand Down

0 comments on commit c138ae6

Please sign in to comment.