@@ -30,8 +30,12 @@ __test(2) int test_strcspn(void *ctx) { return bpf_strcspn(str, "lo"); }
3030__test (6 ) int test_strstr_found (void * ctx ) { return bpf_strstr (str , "world" ); }
3131__test (- ENOENT ) int test_strstr_notfound (void * ctx ) { return bpf_strstr (str , "hi" ); }
3232__test (0 ) int test_strstr_empty (void * ctx ) { return bpf_strstr (str , "" ); }
33- __test (0 ) int test_strnstr_found (void * ctx ) { return bpf_strnstr (str , "hello" , 6 ); }
34- __test (- ENOENT ) int test_strnstr_notfound (void * ctx ) { return bpf_strnstr (str , "hi" , 10 ); }
33+ __test (0 ) int test_strnstr_found1 (void * ctx ) { return bpf_strnstr ("" , "" , 0 ); }
34+ __test (0 ) int test_strnstr_found2 (void * ctx ) { return bpf_strnstr (str , "hello" , 5 ); }
35+ __test (0 ) int test_strnstr_found3 (void * ctx ) { return bpf_strnstr (str , "hello" , 6 ); }
36+ __test (- ENOENT ) int test_strnstr_notfound1 (void * ctx ) { return bpf_strnstr (str , "hi" , 10 ); }
37+ __test (- ENOENT ) int test_strnstr_notfound2 (void * ctx ) { return bpf_strnstr (str , "hello" , 4 ); }
38+ __test (- ENOENT ) int test_strnstr_notfound3 (void * ctx ) { return bpf_strnstr ("" , "a" , 0 ); }
3539__test (0 ) int test_strnstr_empty (void * ctx ) { return bpf_strnstr (str , "" , 1 ); }
3640
3741char _license [] SEC ("license" ) = "GPL" ;
0 commit comments