Skip to content

Commit

Permalink
selftests/bpf: Fix btf_dump test under new clang
Browse files Browse the repository at this point in the history
New clang version changed ([0]) type name in dwarf from "long int" to "long",
this is causing btf_dump tests to fail.

  [0] llvm/llvm-project@f6a561c

Signed-off-by: Yucong Sun <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
thefallentree authored and anakryiko committed Oct 8, 2021
1 parent dd65acf commit 7e3cbd3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions tools/testing/selftests/bpf/progs/btf_dump_test_case_bitfields.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/*
*struct bitfields_only_mixed_types {
* int a: 3;
* long int b: 2;
* long b: 2;
* _Bool c: 1;
* enum {
* A = 0,
Expand All @@ -27,7 +27,7 @@

struct bitfields_only_mixed_types {
int a: 3;
long int b: 2;
long b: 2;
bool c: 1; /* it's really a _Bool type */
enum {
A, /* A = 0, dumper is very explicit */
Expand All @@ -44,8 +44,8 @@ struct bitfields_only_mixed_types {
* char: 4;
* int a: 4;
* short b;
* long int c;
* long int d: 8;
* long c;
* long d: 8;
* int e;
* int f;
*};
Expand All @@ -71,7 +71,7 @@ struct bitfield_mixed_with_others {
*struct bitfield_flushed {
* int a: 4;
* long: 60;
* long int b: 16;
* long b: 16;
*};
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct non_packed_fields {
struct nested_packed {
char: 4;
int a: 4;
long int b;
long b;
struct {
char c;
int d;
Expand All @@ -44,7 +44,7 @@ union union_is_never_packed {

union union_does_not_need_packing {
struct {
long int a;
long a;
int b;
} __attribute__((packed));
int c;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/* ----- START-EXPECTED-OUTPUT ----- */
struct padded_implicitly {
int a;
long int b;
long b;
char c;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ struct struct_with_embedded_stuff {
const char *d;
} e;
union {
volatile long int f;
volatile long f;
void * restrict g;
};
};
Expand Down

0 comments on commit 7e3cbd3

Please sign in to comment.