Re: [PATCH 1/3] KVM: selftests: Add unit to dirty_log_test

Sean Christopherson <[email protected]>
Newsgroups org.infradead.lists.kvm-riscv,org.infradead.lists.linux-riscv,org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest
Message-ID <[email protected]>
On Mon, May 11, 2026, [email protected] wrote:
> Currently dirty_log_test hardcodes usleep 1ms in each interval, which
> could be too short for guest to write and fault in enough pages, then
> there is less chance to test the write protection mechanism, especially
> in the case of (log_mode != LOG_MODE_DIRTY_RING).

But when log_mode != LOG_MODE_DIRTY_RING, the individual sleep time is largely
meaningless, because the test won't reap the bitmaps for iterations > 0.

			if (i && host_log_mode != LOG_MODE_DIRTY_RING)
				continue;

>
> Unit is introduced to replace the default 1ms if specified in command
> line. The following test can't trigger failure on my riscv vm:

Failure of what?  And does the failure really not reproduce with a higher interval?

> 
>   # ./dirty_log_test -m 21 -M clear-log
> 
> By enlarging unit, it fails every time:

"unit" is way too vague.   Even looking at the code, it's not clear to me what
you intended a "unit" to be.  I'm not entirely opposed to providing the user with
more control over the innards of the test, but the interface needs to be somewhat
intuitive.

-- 
kvm-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kvm-riscv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.