Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selftests/bpf: Add test cases for hash map with dynptr key
Add three positive test cases to test the basic operations on the dynptr-keyed hash map. The basic operations include lookup, update, delete and get_next_key. These operations are exercised both through bpf syscall and bpf program. These three test cases use different map keys. The first test case uses both bpf_dynptr and a struct with only bpf_dynptr as map key, the second one uses a struct with an integer and a bpf_dynptr as map key, and the last one use a struct with bpf_dynptr being nested in another struct as map key. Also add multiple negative test cases for dynptr-keyed hash map. These test cases mainly check whether the layout of dynptr and non-dynptr in the stack is matched with the definition of map->key_record. Signed-off-by: Hou Tao <[email protected]>
- Loading branch information