tools/bpf: add int128 raw test in test_btf
authorYonghong Song <yhs@fb.com>
Wed, 16 Jan 2019 01:07:48 +0000 (17:07 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 16 Jan 2019 21:53:44 +0000 (22:53 +0100)
commita80eba20ed596198f0a179466f2944612bcab320
tree99078c54f2f6df195429b7568db64feecd25d2cc
parentb1e8818cabf407a5a2cec696411b0bdfd7fd12f0
tools/bpf: add int128 raw test in test_btf

Several int128 raw type tests are added to test_btf.
Currently these tests are enabled only for x64 and arm64
for which kernel has CONFIG_ARCH_SUPPORTS_INT128 set.

  $ test_btf
  ......
  BTF raw test[106] (128-bit int): OK
  BTF raw test[107] (struct, 128-bit int member): OK
  BTF raw test[108] (struct, 120-bit int member bitfield): OK
  BTF raw test[109] (struct, kind_flag, 128-bit int member): OK
  BTF raw test[110] (struct, kind_flag, 120-bit int member bitfield): OK
  ......

Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_btf.c