Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Officeyutong committed Nov 16, 2024
1 parent 92fb175 commit 5662149
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion runtime/unit-test/maps/test_map_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,18 @@ TEST_CASE("Test map handler")
REQUIRE(map.get_value_size() ==
expected_value_size);
}
int32_t key = 233;
int32_t key = 0;
uint64_t value = 666;
REQUIRE(map.map_update_elem(&key, &value, 0, false) ==
0);
key = 1;
REQUIRE(map.map_update_elem(&key, &value, 0, false) ==
0);
int32_t next_key = 0;
int32_t test_key = 21000;

REQUIRE(map.bpf_map_get_next_key(nullptr, &next_key) ==
0);
if (map_type.is_per_cpu) {
auto valueptr = (uint64_t *)map.map_lookup_elem(
&key, true);
Expand Down

0 comments on commit 5662149

Please sign in to comment.