selftests/bpf: Increase invalid metadata size
authorLarysa Zaremba <larysa.zaremba@intel.com>
Wed, 6 Dec 2023 20:59:18 +0000 (21:59 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 11 Dec 2023 15:09:24 +0000 (16:09 +0100)
Changed check expects passed data meta to be deemed invalid. After loosening
the requirement, the size of 36 bytes becomes valid. Therefore, increase
tested meta size to 256, so we do not get an unexpected success.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20231206205919.404415-2-larysa.zaremba@intel.com
tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c

index ab4952b9fb1d4af83af3e6030cdd782bb89da3bf..e6a783c7f5db9c818bd354027bae7393ee3c166b 100644 (file)
@@ -77,8 +77,8 @@ void test_xdp_context_test_run(void)
        test_xdp_context_error(prog_fd, opts, 4, sizeof(__u32), sizeof(data),
                               0, 0, 0);
 
-       /* Meta data must be 32 bytes or smaller */
-       test_xdp_context_error(prog_fd, opts, 0, 36, sizeof(data), 0, 0, 0);
+       /* Meta data must be 255 bytes or smaller */
+       test_xdp_context_error(prog_fd, opts, 0, 256, sizeof(data), 0, 0, 0);
 
        /* Total size of data must match data_end - data_meta */
        test_xdp_context_error(prog_fd, opts, 0, sizeof(__u32),