File tree Expand file tree Collapse file tree 4 files changed +16
-40
lines changed
tools/testing/selftests/bpf Expand file tree Collapse file tree 4 files changed +16
-40
lines changed Original file line number Diff line number Diff line change @@ -20,20 +20,12 @@ struct bpf_map_def SEC("maps") btf_map = {
20
20
21
21
BPF_ANNOTATE_KV_PAIR (btf_map , int , struct ipv_counts );
22
22
23
- struct dummy_tracepoint_args {
24
- unsigned long long pad ;
25
- struct sock * sock ;
26
- };
27
-
28
23
__attribute__((noinline ))
29
- int test_long_fname_2 (struct dummy_tracepoint_args * arg )
24
+ int test_long_fname_2 (void )
30
25
{
31
26
struct ipv_counts * counts ;
32
27
int key = 0 ;
33
28
34
- if (!arg -> sock )
35
- return 0 ;
36
-
37
29
counts = bpf_map_lookup_elem (& btf_map , & key );
38
30
if (!counts )
39
31
return 0 ;
@@ -44,15 +36,15 @@ int test_long_fname_2(struct dummy_tracepoint_args *arg)
44
36
}
45
37
46
38
__attribute__((noinline ))
47
- int test_long_fname_1 (struct dummy_tracepoint_args * arg )
39
+ int test_long_fname_1 (void )
48
40
{
49
- return test_long_fname_2 (arg );
41
+ return test_long_fname_2 ();
50
42
}
51
43
52
44
SEC ("dummy_tracepoint" )
53
- int _dummy_tracepoint (struct dummy_tracepoint_args * arg )
45
+ int _dummy_tracepoint (void * arg )
54
46
{
55
- return test_long_fname_1 (arg );
47
+ return test_long_fname_1 ();
56
48
}
57
49
58
50
char _license [] SEC ("license" ) = "GPL" ;
Original file line number Diff line number Diff line change @@ -28,20 +28,12 @@ struct {
28
28
__type (value , struct ipv_counts );
29
29
} btf_map SEC (".maps" );
30
30
31
- struct dummy_tracepoint_args {
32
- unsigned long long pad ;
33
- struct sock * sock ;
34
- };
35
-
36
31
__attribute__((noinline ))
37
- int test_long_fname_2 (struct dummy_tracepoint_args * arg )
32
+ int test_long_fname_2 (void )
38
33
{
39
34
struct ipv_counts * counts ;
40
35
int key = 0 ;
41
36
42
- if (!arg -> sock )
43
- return 0 ;
44
-
45
37
counts = bpf_map_lookup_elem (& btf_map , & key );
46
38
if (!counts )
47
39
return 0 ;
@@ -57,15 +49,15 @@ int test_long_fname_2(struct dummy_tracepoint_args *arg)
57
49
}
58
50
59
51
__attribute__((noinline ))
60
- int test_long_fname_1 (struct dummy_tracepoint_args * arg )
52
+ int test_long_fname_1 (void )
61
53
{
62
- return test_long_fname_2 (arg );
54
+ return test_long_fname_2 ();
63
55
}
64
56
65
57
SEC ("dummy_tracepoint" )
66
- int _dummy_tracepoint (struct dummy_tracepoint_args * arg )
58
+ int _dummy_tracepoint (void * arg )
67
59
{
68
- return test_long_fname_1 (arg );
60
+ return test_long_fname_1 ();
69
61
}
70
62
71
63
char _license [] SEC ("license" ) = "GPL" ;
Original file line number Diff line number Diff line change @@ -17,20 +17,12 @@ struct bpf_map_def SEC("maps") btf_map = {
17
17
.max_entries = 4 ,
18
18
};
19
19
20
- struct dummy_tracepoint_args {
21
- unsigned long long pad ;
22
- struct sock * sock ;
23
- };
24
-
25
20
__attribute__((noinline ))
26
- int test_long_fname_2 (struct dummy_tracepoint_args * arg )
21
+ int test_long_fname_2 (void )
27
22
{
28
23
struct ipv_counts * counts ;
29
24
int key = 0 ;
30
25
31
- if (!arg -> sock )
32
- return 0 ;
33
-
34
26
counts = bpf_map_lookup_elem (& btf_map , & key );
35
27
if (!counts )
36
28
return 0 ;
@@ -41,15 +33,15 @@ int test_long_fname_2(struct dummy_tracepoint_args *arg)
41
33
}
42
34
43
35
__attribute__((noinline ))
44
- int test_long_fname_1 (struct dummy_tracepoint_args * arg )
36
+ int test_long_fname_1 (void )
45
37
{
46
- return test_long_fname_2 (arg );
38
+ return test_long_fname_2 ();
47
39
}
48
40
49
41
SEC ("dummy_tracepoint" )
50
- int _dummy_tracepoint (struct dummy_tracepoint_args * arg )
42
+ int _dummy_tracepoint (void * arg )
51
43
{
52
- return test_long_fname_1 (arg );
44
+ return test_long_fname_1 ();
53
45
}
54
46
55
47
char _license [] SEC ("license" ) = "GPL" ;
Original file line number Diff line number Diff line change @@ -2854,7 +2854,7 @@ static struct btf_raw_test raw_tests[] = {
2854
2854
.value_type_id = 1 ,
2855
2855
.max_entries = 4 ,
2856
2856
.btf_load_err = true,
2857
- .err_str = "vlen != 0 " ,
2857
+ .err_str = "Invalid func linkage " ,
2858
2858
},
2859
2859
2860
2860
{
You can’t perform that action at this time.
0 commit comments