Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/damon/wss_estimation: deduplicate failed samples output

When the test fails, it shows whole sampled working set size measurements.
The purpose is showing the distribution of the measured values, to let
the tester know if it was just intermittent failure. Multiple same values
on the output are therefore unnecessary. It was not a big deal since the
test was failing only once in the past. But the test can now fail
multiple times with increased working set size, until it passes or the
working set size reaches a limit. Hence the noisy output can be quite
long and annoying. Print only the deduplicated distribution information.

Link: https://lkml.kernel.org/r/20260117020731.226785-6-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

SeongJae Park and committed by
Andrew Morton
6f06f86a 57525e59

+5 -1
+5 -1
tools/testing/selftests/damon/sysfs_update_schemes_tried_regions_wss_estimation.py
··· 53 53 print('the error rate is not acceptable (> %f)' % 54 54 acceptable_error_rate) 55 55 print('samples are as below') 56 - print('\n'.join(['%d' % wss for wss in wss_collected])) 56 + for idx, wss in enumerate(wss_collected): 57 + if idx < len(wss_collected) - 1 and \ 58 + wss_collected[idx + 1] == wss: 59 + continue 60 + print('%d/%d: %d' % (idx, len(wss_collected), wss)) 57 61 return False 58 62 return True 59 63