]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
selftests/bpf: Fix btf_dump padding test case
authorAndrii Nakryiko <andriin@fb.com>
Tue, 8 Oct 2019 23:10:08 +0000 (16:10 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 9 Oct 2019 22:38:36 +0000 (15:38 -0700)
Existing padding test case for btf_dump has a good test that was
supposed to test padding generation at the end of a struct, but its
expected output was specified incorrectly. Fix this.

Fixes: 2d2a3ad872f8 ("selftests/bpf: add btf_dump BTF-to-C conversion tests")
Reported-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20191008231009.2991130-4-andriin@fb.com
tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c

index 3a62119c74986c4405d6026a59c7daf2c09bd982..35c512818a56b8928a4337208ae3ac28ea962d2d 100644 (file)
@@ -62,6 +62,10 @@ struct padded_a_lot {
  *     long: 64;
  *     long: 64;
  *     int b;
+ *     long: 32;
+ *     long: 64;
+ *     long: 64;
+ *     long: 64;
  *};
  *
  */
@@ -95,7 +99,6 @@ struct zone_padding {
 struct zone {
        int a;
        short b;
-       short: 16;
        struct zone_padding __pad__;
 };