On Mon, 07 Sep 2026 04:52:46 +0000, Chaithanya Lagisetty wrote:
> demand_paging_test parses the -d option with strtoul() and then asserts
> that the result is not negative:
> 
>       p.uffd_delay = strtoul(optarg, NULL, 0);
>       TEST_ASSERT(p.uffd_delay >= 0, "A negative UFFD delay is not 
> supported.");
> 
> p.uffd_delay is a useconds_t, which is an unsigned type, so the comparison
> is always true and the assertion can never fire. GCC points this out with
> -Wtype-limits, which is enabled by -Wextra.
> 
> [...]

Applied to kvm-x86 selftests, thanks!

[1/1] KVM: selftests: Fix the never-true negative UFFD delay check
      https://github.com/kvm-x86/linux/commit/25158cac2d15

--
https://github.com/kvm-x86/linux/tree/next

Reply via email to