summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2026-10-10 11:14:11 +0000
committerMarco Elver <elver@google.com>2026-10-10 13:03:13 +0000
commitbd3cc16d1d7d584911f856adc458f242b1c7e85f (patch)
tree72c1c4589f7fecd437f08b5edd5ee809de983822 /tools/perf/scripts/python
parent99b6fcce87037cfb6b5e177848342e97f5141205 (diff)
downloadlinux-next-bd3cc16d1d7d584911f856adc458f242b1c7e85f.tar.gz
linux-next-bd3cc16d1d7d584911f856adc458f242b1c7e85f.zip
kcsan: test: Do not count report printing time against test duration
Since commit d3539347022a ("serial: 8250: Switch to nbcon console, take 2"), several KCSAN tests fail with CONFIG_KCSAN_VERBOSE=y when using the 8250 console. With CONFIG_KCSAN_VERBOSE=y, the report prints the racing tasks' IRQ trace events via print_irqtrace_events(), which marks its output as a printk emergency section. Within an emergency section, printk() flushes all pending messages to nbcon consoles synchronously. With a slow console, the reporting thread can therefore stall for over a second while holding report_lock, i.e. before the remaining lines of the report are stored. The test, however, stops checking for reports after a fixed deadline, which is easily exceeded by a single slow report: | [ 5.360278] BUG: KCSAN: data-race in test_kernel_read / test_kernel_write | [ 5.360303] write to 0xffffffffab95a478 of 8 bytes by task 237 on cpu 7: | ... | [ 5.360411] irq event stamp: 23 | [ 6.059836] # test_basic: EXPECTATION FAILED at kernel/kcsan/kcsan_test.c:735 | ... | [ 6.616416] read to 0xffffffffab95a478 of 8 bytes by task 238 on cpu 9: Waiting for in-progress reports to complete is insufficient: a slow report that does not match the expected report still uses up the time to observe the expected report. Fix it by pausing the test's time budget while a test-related report is being printed, bounded by an upper limit to avoid stalling the test forever. Once a report completes, always check it at least once. Assisted-by: Antigravity Signed-off-by: Marco Elver <elver@google.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions