summaryrefslogtreecommitdiff
path: root/fs/bad_inode.c
diff options
context:
space:
mode:
authorHou Tao <houtao1@huawei.com>2024-12-06 19:06:22 +0800
committerAlexei Starovoitov <ast@kernel.org>2024-12-06 09:14:26 -0800
commit04d4ce91b0bed4120e0c5fadc5291cebaa9c2a06 (patch)
treeaab25f0bd52114d66dd7f1a46aa71b3e2f49c287 /fs/bad_inode.c
parent3e18f5f1e5a152a51dbb6c234e2a0421aec11e31 (diff)
selftests/bpf: Add more test cases for LPM trie
Add more test cases for LPM trie in test_maps: 1) test_lpm_trie_update_flags It constructs various use cases for BPF_EXIST and BPF_NOEXIST and check whether the return value of update operation is expected. 2) test_lpm_trie_update_full_maps It tests the update operations on a full LPM trie map. Adding new node will fail and overwriting the value of existed node will succeed. 3) test_lpm_trie_iterate_strs and test_lpm_trie_iterate_ints There two test cases test whether the iteration through get_next_key is sorted and expected. These two test cases delete the minimal key after each iteration and check whether next iteration returns the second minimal key. The only difference between these two test cases is the former one saves strings in the LPM trie and the latter saves integers. Without the fix of get_next_key, these two cases will fail as shown below: test_lpm_trie_iterate_strs(1091):FAIL:iterate #2 got abc exp abS test_lpm_trie_iterate_ints(1142):FAIL:iterate #1 got 0x2 exp 0x1 Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20241206110622.1161752-10-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'fs/bad_inode.c')
0 files changed, 0 insertions, 0 deletions