selftests/bpf: Rewrite two infinite loops in bound check cases
authorXu Kuohai <xukuohai@huawei.com>
Wed, 29 Mar 2023 01:10:48 +0000 (21:10 -0400)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 30 Mar 2023 00:26:09 +0000 (17:26 -0700)
commit4ca13d1002f37c10038ff4ed3cfdc70dbe049d60
tree1c92420cfb04f0eab3e611ed06c929713b594425
parent8a9abe0293294fee279750058a509bbfab0c57a3
selftests/bpf: Rewrite two infinite loops in bound check cases

The two infinite loops in bound check cases added by commit
1a3148fc171f ("selftests/bpf: Check when bounds are not in the 32-bit range")
increased the execution time of test_verifier from about 6 seconds to
about 9 seconds. Rewrite these two infinite loops to finite loops to get
rid of this extra time cost.

Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/r/20230329011048.1721937-1-xukuohai@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/bounds.c