File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
tools/testing/selftests/bpf Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1394,11 +1394,11 @@ static void test_map_rdonly(void)
1394
1394
1395
1395
key = 1 ;
1396
1396
value = 1234 ;
1397
- /* Insert key=1 element. */
1397
+ /* Try to insert key=1 element. */
1398
1398
assert (bpf_map_update_elem (fd , & key , & value , BPF_ANY ) == -1 &&
1399
1399
errno == EPERM );
1400
1400
1401
- /* Check that key=2 is not found. */
1401
+ /* Check that key=1 is not found. */
1402
1402
assert (bpf_map_lookup_elem (fd , & key , & value ) == -1 && errno == ENOENT );
1403
1403
assert (bpf_map_get_next_key (fd , & key , & value ) == -1 && errno == ENOENT );
1404
1404
@@ -1422,7 +1422,7 @@ static void test_map_wronly(void)
1422
1422
/* Insert key=1 element. */
1423
1423
assert (bpf_map_update_elem (fd , & key , & value , BPF_ANY ) == 0 );
1424
1424
1425
- /* Check that key=2 is not found . */
1425
+ /* Check that reading elements and keys from the map is not allowed . */
1426
1426
assert (bpf_map_lookup_elem (fd , & key , & value ) == -1 && errno == EPERM );
1427
1427
assert (bpf_map_get_next_key (fd , & key , & value ) == -1 && errno == EPERM );
1428
1428
You can’t perform that action at this time.
0 commit comments