linux-stable/tools/testing/selftests
Yonghong Song e43207fa2e 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: 9d5f9f701b ("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>
2019-01-11 10:40:54 +01:00
..
android selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
bpf tools/bpf: test btf bitfield with >=256 struct member offset 2019-01-11 10:40:54 +01:00
breakpoints
capabilities
cgroup Add tests for memory.oom.group 2018-09-07 16:36:01 -06:00
cpu-hotplug
cpufreq
drivers selftests: mlxsw: Add a test case for VLAN addition error flow 2019-01-08 16:53:54 -05:00
efivarfs selftests/efivarfs: add required kernel configs 2018-09-05 10:58:07 -06:00
exec
filesystems
firmware selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config 2018-11-27 14:20:36 -07:00
ftrace Tracing changes for v4.21: 2018-12-31 11:46:59 -08:00
futex selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
gpio selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
ia64
ima selftests/ima: kexec_load syscall test 2018-12-11 07:19:47 -05:00
intel_pstate
ipc
ir media: rc: self test for IR encoders and decoders 2018-11-06 09:27:17 -07:00
kcmp
kmod
kvm kvm: selftests: ucall: fix exit mmio address guessing 2018-12-21 13:58:46 +01:00
lib
locking
media_tests
membarrier
memfd
memory-hotplug selftests: memory-hotplug: add required configs 2018-09-05 10:58:31 -06:00
mount
mqueue
net selftests: forwarding: Add a test for VLAN deletion 2019-01-08 16:53:54 -05:00
netfilter selftests: add script to stress-test nft packet path vs. control plane 2018-11-12 16:13:35 +01:00
networking/timestamping Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-12-27 13:04:52 -08:00
nsfs
ntb
powerpc selftests/powerpc: Add checks for transactional sigreturn 2018-12-21 14:46:50 +11:00
prctl
proc proc: fixup map_files test on arm 2018-11-30 14:56:14 -08:00
pstore
ptp
ptrace
rcutorture Merge branches 'bug.2018.11.12a', 'consolidate.2018.12.01a', 'doc.2018.11.12a', 'fixes.2018.11.12a', 'initrd.2018.11.08b', 'sil.2018.11.12a' and 'srcu.2018.11.27a' into HEAD 2018-12-01 12:43:16 -08:00
rseq rseq/selftests: fix parametrized test with -fpie 2018-09-27 12:59:19 -06:00
rtc
seccomp Merge branch 'next-seccomp' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-01-02 09:48:13 -08:00
sigaltstack
size
sparc64
splice
static_keys
sync
sysctl
tc-testing Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-12-27 13:04:52 -08:00
timers
uevent
user
vDSO
vm selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
watchdog selftests: watchdog: fix spelling mistake "experies" -> "expires" 2018-12-13 13:03:19 -07:00
x86 x86/vdso: Fix vDSO syscall fallback asm constraint regression 2018-10-04 08:17:50 +02:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest.h selftests: kselftest: Remove outdated comment 2018-08-27 14:07:46 -06:00
kselftest_harness.h selftests: do not macro-expand failed assertion expressions 2018-12-10 10:55:52 -07:00
kselftest_install.sh
lib.mk selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
Makefile Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-01-02 09:43:14 -08:00