diff options
author | Daniel Rosenberg <drosen@google.com> | 2023-05-05 18:31:31 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-05-06 16:42:57 -0700 |
commit | 1ce33b6c846fbe0439eeee477b767de4bc3ad35f (patch) | |
tree | 0b66939dd85f8f957a44b522838a8c0897fb6425 /tools/testing/selftests/bpf/prog_tests/dynptr.c | |
parent | 3bda08b63670c39be390fcb00e7718775508e673 (diff) |
selftests/bpf: Test allowing NULL buffer in dynptr slice
bpf_dynptr_slice(_rw) no longer requires a buffer for verification. If the
buffer is needed, but not present, the function will return NULL.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Link: https://lore.kernel.org/r/20230506013134.2492210-3-drosen@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/dynptr.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/dynptr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/dynptr.c b/tools/testing/selftests/bpf/prog_tests/dynptr.c index 0478916aff37..13d4b9ab16e7 100644 --- a/tools/testing/selftests/bpf/prog_tests/dynptr.c +++ b/tools/testing/selftests/bpf/prog_tests/dynptr.c @@ -26,6 +26,7 @@ static struct { {"test_dynptr_is_null", SETUP_SYSCALL_SLEEP}, {"test_dynptr_is_rdonly", SETUP_SKB_PROG}, {"test_dynptr_clone", SETUP_SKB_PROG}, + {"test_dynptr_skb_no_buff", SETUP_SKB_PROG}, }; static void verify_success(const char *prog_name, enum test_setup_type setup_type) |