bpf_strchrnul
BTF_ID_FLAGS(func, bpf_strchrnul);
SEC("syscall") __retval(USER_PTR_ERR)int test_strchrnul_null(void *ctx) { return bpf_strchrnul(NULL, 'a'); }
SEC("syscall") __retval(USER_PTR_ERR) int test_strchrnul_user_ptr(void *ctx) { return bpf_strchrnul(user_ptr, 'a'); }
SEC("syscall") __retval(-EFAULT) int test_strchrnul_pagefault(void *ctx) { return bpf_strchrnul(invalid_kern_ptr, 'a'); }
SEC("syscall") int test_strchrnul_too_long(void *ctx) { return bpf_strchrnul(long_str, 'b'); }
__test(1) int test_strchrnul_found(void *ctx) { return bpf_strchrnul(str, 'e'); }
__test(11) int test_strchrnul_notfound(void *ctx) { return bpf_strchrnul(str, 'x'); }