Skip to content

Commit aa6c09c

Browse files
committed
libbpf-cargo: Fix C code indentation in tests
Fix the indentation of C code used for skeleton testing, which was inconsistent with the rest. This is a follow up to #1197 (comment) Signed-off-by: Daniel Müller <[email protected]>
1 parent 50e6e9d commit aa6c09c

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

libbpf-cargo/src/test.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,10 @@ fn test_skeleton_basic() {
473473
#include <bpf/bpf_helpers.h>
474474
475475
struct {
476-
__uint(type, BPF_MAP_TYPE_HASH);
477-
__uint(max_entries, 1024);
478-
__type(key, u32);
479-
__type(value, u64);
476+
__uint(type, BPF_MAP_TYPE_HASH);
477+
__uint(max_entries, 1024);
478+
__type(key, u32);
479+
__type(value, u64);
480480
} mymap SEC(".maps");
481481
482482
SEC("kprobe/foo")
@@ -706,23 +706,23 @@ fn test_skeleton_builder_basic() {
706706
}};
707707
708708
struct {{
709-
__uint(type, BPF_MAP_TYPE_HASH);
710-
__uint(max_entries, 1024);
711-
__type(key, struct unique_key);
712-
__type(value, u64);
709+
__uint(type, BPF_MAP_TYPE_HASH);
710+
__uint(max_entries, 1024);
711+
__type(key, struct unique_key);
712+
__type(value, u64);
713713
}} mymap SEC(".maps");
714714
715715
struct {{
716-
__uint(type, BPF_MAP_TYPE_HASH);
717-
__uint(max_entries, 1024);
718-
__uint(key_size, 8);
719-
__type(value, u64);
716+
__uint(type, BPF_MAP_TYPE_HASH);
717+
__uint(max_entries, 1024);
718+
__uint(key_size, 8);
719+
__type(value, u64);
720720
}} mymap2 SEC(".maps");
721721
722722
SEC("kprobe/foo")
723723
int this_is_my_prog(u64 *ctx)
724724
{{
725-
return 0;
725+
return 0;
726726
}}
727727
"#}
728728
)
@@ -1021,10 +1021,10 @@ fn test_skeleton_builder_multiple_anon() {
10211021
};
10221022
10231023
struct {
1024-
__uint(type, BPF_MAP_TYPE_HASH);
1025-
__uint(max_entries, 1024);
1026-
__type(key, struct unique_key);
1027-
__type(value, u64);
1024+
__uint(type, BPF_MAP_TYPE_HASH);
1025+
__uint(max_entries, 1024);
1026+
__type(key, struct unique_key);
1027+
__type(value, u64);
10281028
} mymap SEC(".maps");
10291029
10301030
struct Foo {

0 commit comments

Comments
 (0)