[kvm-unit-tests 4/4] x86/svm: Deflake svm_tsc_scale_test

Yosry Ahmed posted 4 patches 1 month, 2 weeks ago
[kvm-unit-tests 4/4] x86/svm: Deflake svm_tsc_scale_test
Posted by Yosry Ahmed 1 month, 2 weeks ago
On an AMT Turin (EPYC Zen 5), svm_tsc_scale_test flakes on the last test
case with 0.0001 TSC scaling ratio, even with the 24-bit shift for
stability. On failure, the actual value is 49 instead of the expected
50.

Use a higher scaling ratio, 0.001, which makes the test pass
consistently.

Signed-off-by: Yosry Ahmed <yosry.ahmed@linux.dev>
---
 x86/svm_tests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index 8d309860e76e5..29c899762b7a4 100644
--- a/x86/svm_tests.c
+++ b/x86/svm_tests.c
@@ -1002,7 +1002,7 @@ static void svm_tsc_scale_test(void)
 	}
 
 	svm_tsc_scale_run_testcase(50, 255, rdrand());
-	svm_tsc_scale_run_testcase(50, 0.0001, rdrand());
+	svm_tsc_scale_run_testcase(50, 0.001, rdrand());
 }
 
 static void latency_prepare(struct svm_test *test)
-- 
2.51.2.1026.g39e6a42477-goog