summaryrefslogtreecommitdiffstats
path: root/tools/bpf
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2019-01-10 11:14:01 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2019-01-11 10:40:54 +0100
commite43207fa2e6130e39e3aca4c55e2ee21cfb46828 (patch)
tree33a4fd9cd763264e83a4e4079ce40bbca1def04b /tools/bpf
parent17e3ac812541f73224299d8958ddb420c2d5bbd8 (diff)
downloadblackbird-op-linux-e43207fa2e6130e39e3aca4c55e2ee21cfb46828.tar.gz
blackbird-op-linux-e43207fa2e6130e39e3aca4c55e2ee21cfb46828.zip
tools/bpf: test btf bitfield with >=256 struct member offset
This patch modified test_btf pretty print test to cover the bitfield with struct member equal to or greater 256. Without the previous kernel patch fix, the modified test will fail: $ test_btf -p ...... BTF pretty print array(#1)......unexpected pprint output expected: 0: {0,0,0,0x3,0x0,0x3,{0|[0,0,0,0,0,0,0,0]},ENUM_ZERO,4,0x1} read: 0: {0,0,0,0x3,0x0,0x3,{0|[0,0,0,0,0,0,0,0]},ENUM_ZERO,4,0x0} BTF pretty print array(#2)......unexpected pprint output expected: 0: {0,0,0,0x3,0x0,0x3,{0|[0,0,0,0,0,0,0,0]},ENUM_ZERO,4,0x1} read: 0: {0,0,0,0x3,0x0,0x3,{0|[0,0,0,0,0,0,0,0]},ENUM_ZERO,4,0x0} PASS:6 SKIP:0 FAIL:2 With the kernel fix, the modified test will succeed: $ test_btf -p ...... BTF pretty print array(#1)......OK BTF pretty print array(#2)......OK PASS:8 SKIP:0 FAIL:0 Fixes: 9d5f9f701b18 ("bpf: btf: fix struct/union/fwd types with kind_flag") Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud