Commit eead13d
committed
KVM: selftests: Assert that __vm_get_stat() actually finds a stat
Fail the test if it attempts to read a stat that doesn't exist, e.g. due
to a typo (hooray, strings), or because the test tried to get a stat for
the wrong scope. As is, there's no indiciation of failure and @DaTa is
left untouched, e.g. holds '0' or random stack data in most cases.
Fixes: 8448ec5 ("KVM: selftests: Add NX huge pages test")
Link: https://lore.kernel.org/r/20250111005049.1247555-4-seanjc@google.com
[sean: fixup spelling mistake, courtesy of Colin Ian King]
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent f7f232a commit eead13d
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2238 | 2238 | | |
2239 | 2239 | | |
2240 | 2240 | | |
2241 | | - | |
2242 | | - | |
| 2241 | + | |
2243 | 2242 | | |
| 2243 | + | |
| 2244 | + | |
2244 | 2245 | | |
2245 | 2246 | | |
2246 | 2247 | | |
| |||
0 commit comments