bpf/tests: Minor restructuring of ALU tests
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Fri, 1 Oct 2021 13:03:44 +0000 (15:03 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 1 Oct 2021 15:04:26 +0000 (17:04 +0200)
commite42fc3c2c40e0fb9d371c146dc8c0a70bee88a3c
treeae5cc361f1ff1a2a9ceed61a7e4e110abc9c7fa1
parente2f9797b3c7396065ca3bc9f223225ca63c1e2bd
bpf/tests: Minor restructuring of ALU tests

This patch moves the ALU LSH/RSH/ARSH reference computations into the
common reference value function. Also fix typo in constants so they
now have the intended values.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211001130348.3670534-7-johan.almbladh@anyfinetworks.com
lib/test_bpf.c