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)
13941394
13951395 key = 1 ;
13961396 value = 1234 ;
1397- /* Insert key=1 element. */
1397+ /* Try to insert key=1 element. */
13981398 assert (bpf_map_update_elem (fd , & key , & value , BPF_ANY ) == -1 &&
13991399 errno == EPERM );
14001400
1401- /* Check that key=2 is not found. */
1401+ /* Check that key=1 is not found. */
14021402 assert (bpf_map_lookup_elem (fd , & key , & value ) == -1 && errno == ENOENT );
14031403 assert (bpf_map_get_next_key (fd , & key , & value ) == -1 && errno == ENOENT );
14041404
@@ -1422,7 +1422,7 @@ static void test_map_wronly(void)
14221422 /* Insert key=1 element. */
14231423 assert (bpf_map_update_elem (fd , & key , & value , BPF_ANY ) == 0 );
14241424
1425- /* Check that key=2 is not found . */
1425+ /* Check that reading elements and keys from the map is not allowed . */
14261426 assert (bpf_map_lookup_elem (fd , & key , & value ) == -1 && errno == EPERM );
14271427 assert (bpf_map_get_next_key (fd , & key , & value ) == -1 && errno == EPERM );
14281428
You can’t perform that action at this time.
0 commit comments