From 5662149ec7d606293caf8d83a6fb888b2aa22cad Mon Sep 17 00:00:00 2001 From: officeyutong Date: Sun, 17 Nov 2024 01:22:30 +0800 Subject: [PATCH] update --- runtime/unit-test/maps/test_map_handler.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/runtime/unit-test/maps/test_map_handler.cpp b/runtime/unit-test/maps/test_map_handler.cpp index 8c0ab289..ca24975e 100644 --- a/runtime/unit-test/maps/test_map_handler.cpp +++ b/runtime/unit-test/maps/test_map_handler.cpp @@ -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);