* [PATCH bpf-next] selftest/bpf: fix btf_dump test under new clang
@ 2021-10-08 17:31 Yucong Sun
2021-10-08 18:15 ` Andrii Nakryiko
2021-10-08 18:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Yucong Sun @ 2021-10-08 17:31 UTC (permalink / raw)
To: bpf; +Cc: andrii, sunyucong
From: Yucong Sun <sunyucong@gmail.com>
New clang version changed type name in dwarf from "long int" to "long",
this is causing btf_dump tests to fail.
Signed-off-by: Yucong Sun <sunyucong@gmail.com>
---
.../selftests/bpf/progs/btf_dump_test_case_bitfields.c | 10 +++++-----
.../selftests/bpf/progs/btf_dump_test_case_packing.c | 4 ++--
.../selftests/bpf/progs/btf_dump_test_case_padding.c | 2 +-
.../selftests/bpf/progs/btf_dump_test_case_syntax.c | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs/btf_dump_test_case_bitfields.c b/tools/testing/selftests/bpf/progs/btf_dump_test_case_bitfields.c
index 8f44767a75fa..e5560a656030 100644
--- a/tools/testing/selftests/bpf/progs/btf_dump_test_case_bitfields.c
+++ b/tools/testing/selftests/bpf/progs/btf_dump_test_case_bitfields.c
@@ -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,
@@ -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 */
@@ -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;
*};
@@ -71,7 +71,7 @@ struct bitfield_mixed_with_others {
*struct bitfield_flushed {
* int a: 4;
* long: 60;
- * long int b: 16;
+ * long b: 16;
*};
*
*/
diff --git a/tools/testing/selftests/bpf/progs/btf_dump_test_case_packing.c b/tools/testing/selftests/bpf/progs/btf_dump_test_case_packing.c
index 1cef3bec1dc7..e304b6204bd9 100644
--- a/tools/testing/selftests/bpf/progs/btf_dump_test_case_packing.c
+++ b/tools/testing/selftests/bpf/progs/btf_dump_test_case_packing.c
@@ -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;
@@ -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;
diff --git a/tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c b/tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c
index 35c512818a56..f2661c8d2d90 100644
--- a/tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c
+++ b/tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c
@@ -9,7 +9,7 @@
/* ----- START-EXPECTED-OUTPUT ----- */
struct padded_implicitly {
int a;
- long int b;
+ long b;
char c;
};
diff --git a/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c b/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
index 8aaa24a00322..1c7105fcae3c 100644
--- a/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
+++ b/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
@@ -189,7 +189,7 @@ struct struct_with_embedded_stuff {
const char *d;
} e;
union {
- volatile long int f;
+ volatile long f;
void * restrict g;
};
};
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] selftest/bpf: fix btf_dump test under new clang
2021-10-08 17:31 [PATCH bpf-next] selftest/bpf: fix btf_dump test under new clang Yucong Sun
@ 2021-10-08 18:15 ` Andrii Nakryiko
2021-10-08 18:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andrii Nakryiko @ 2021-10-08 18:15 UTC (permalink / raw)
To: Yucong Sun; +Cc: bpf, Andrii Nakryiko, Yucong Sun
On Fri, Oct 8, 2021 at 10:31 AM Yucong Sun <fallentree@fb.com> wrote:
>
> From: Yucong Sun <sunyucong@gmail.com>
>
> New clang version changed type name in dwarf from "long int" to "long",
> this is causing btf_dump tests to fail.
>
> Signed-off-by: Yucong Sun <sunyucong@gmail.com>
> ---
Fixed the prefix to "selftests/bpf: ", applied to bpf-next. Thanks for
a quick fix!
Also added the reference to the "offending" LLVM change you've sent me offline:
https://github.com/llvm/llvm-project/commit/f6a561c4d6754b13165a49990e8365d819f64c86
> .../selftests/bpf/progs/btf_dump_test_case_bitfields.c | 10 +++++-----
> .../selftests/bpf/progs/btf_dump_test_case_packing.c | 4 ++--
> .../selftests/bpf/progs/btf_dump_test_case_padding.c | 2 +-
> .../selftests/bpf/progs/btf_dump_test_case_syntax.c | 2 +-
> 4 files changed, 9 insertions(+), 9 deletions(-)
>
[...]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] selftest/bpf: fix btf_dump test under new clang
2021-10-08 17:31 [PATCH bpf-next] selftest/bpf: fix btf_dump test under new clang Yucong Sun
2021-10-08 18:15 ` Andrii Nakryiko
@ 2021-10-08 18:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-08 18:20 UTC (permalink / raw)
To: Yucong Sun; +Cc: bpf, andrii, sunyucong
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Fri, 8 Oct 2021 10:31:39 -0700 you wrote:
> From: Yucong Sun <sunyucong@gmail.com>
>
> New clang version changed type name in dwarf from "long int" to "long",
> this is causing btf_dump tests to fail.
>
> Signed-off-by: Yucong Sun <sunyucong@gmail.com>
>
> [...]
Here is the summary with links:
- [bpf-next] selftest/bpf: fix btf_dump test under new clang
https://git.kernel.org/bpf/bpf-next/c/7e3cbd3405cb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-08 18:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 17:31 [PATCH bpf-next] selftest/bpf: fix btf_dump test under new clang Yucong Sun
2021-10-08 18:15 ` Andrii Nakryiko
2021-10-08 18:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).