bpf: fix div64 overflow tests to properly detect errors
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Wed, 12 Jun 2019 18:51:39 +0000 (00:21 +0530)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 13 Jun 2019 21:07:00 +0000 (23:07 +0200)
commit3e0682695199bad51dd898fe064d1564637ff77a
treea63884494c3ac859560d7056cb1def9095b1c4fa
parent0e265747491cb182429adfbef7d002164566f25c
bpf: fix div64 overflow tests to properly detect errors

If the result of the division is LLONG_MIN, current tests do not detect
the error since the return value is truncated to a 32-bit value and ends
up being 0.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/verifier/div_overflow.c