mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
selftests/bpf: Reduce test_xdp_adjust_frags_tail_grow logs
For selftest xdp_adjust_tail/xdp_adjust_frags_tail_grow, if tested failure,
I see a long list of log output like
...
test_xdp_adjust_frags_tail_grow:PASS:9Kb+10b-untouched 0 nsec
test_xdp_adjust_frags_tail_grow:PASS:9Kb+10b-untouched 0 nsec
test_xdp_adjust_frags_tail_grow:PASS:9Kb+10b-untouched 0 nsec
test_xdp_adjust_frags_tail_grow:PASS:9Kb+10b-untouched 0 nsec
...
There are total 7374 lines of the above which is too much. Let us
only issue such logs when it is an assert failure.
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20250607013610.1551399-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
64a064ce33
commit
ae8824037a
|
|
@ -246,14 +246,20 @@ static void test_xdp_adjust_frags_tail_grow(void)
|
|||
ASSERT_EQ(topts.retval, XDP_TX, "9Kb+10b retval");
|
||||
ASSERT_EQ(topts.data_size_out, exp_size, "9Kb+10b size");
|
||||
|
||||
for (i = 0; i < 9000; i++)
|
||||
ASSERT_EQ(buf[i], 1, "9Kb+10b-old");
|
||||
for (i = 0; i < 9000; i++) {
|
||||
if (buf[i] != 1)
|
||||
ASSERT_EQ(buf[i], 1, "9Kb+10b-old");
|
||||
}
|
||||
|
||||
for (i = 9000; i < 9010; i++)
|
||||
ASSERT_EQ(buf[i], 0, "9Kb+10b-new");
|
||||
for (i = 9000; i < 9010; i++) {
|
||||
if (buf[i] != 0)
|
||||
ASSERT_EQ(buf[i], 0, "9Kb+10b-new");
|
||||
}
|
||||
|
||||
for (i = 9010; i < 16384; i++)
|
||||
ASSERT_EQ(buf[i], 1, "9Kb+10b-untouched");
|
||||
for (i = 9010; i < 16384; i++) {
|
||||
if (buf[i] != 1)
|
||||
ASSERT_EQ(buf[i], 1, "9Kb+10b-untouched");
|
||||
}
|
||||
|
||||
/* Test a too large grow */
|
||||
memset(buf, 1, 16384);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user