Skip to contentSkip to conversation

KVM: selftests: Reword the NX hugepage test's skip message to be more helpful

PATCH In review Sean Christopherson 1 participant 2 messages Nov 29, 2023 – Jan 31, 2024

Subsystems (2)
lore
Share & tools
lore

Sean Christopherson

author reviewer
#0 lore raw

PATCH 1/1 KVM: selftests: Reword the NX hugepage test's skip message to be more helpful

Rework the NX hugepage test's skip message regarding the magic token to provide all of the necessary magic, and to very explicitly recommended using the wrapper shell script.

Opportunistically remove an overzealous newline; splitting the recommendation message across two lines of ~45 characters makes it much harder to read than running out a single line to 98 characters.

---
 tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.c +3 -3
index 83e25bccc139..17bbb96fc4df 100644
@@ -257,9 +257,9 @@ int main(int argc, char **argv)
 	TEST_REQUIRE(kvm_has_cap(KVM_CAP_VM_DISABLE_NX_HUGE_PAGES));
 
 	__TEST_REQUIRE(token == MAGIC_TOKEN,
-		       "This test must be run with the magic token %d.\n"
-		       "This is done by nx_huge_pages_test.sh, which\n"
-		       "also handles environment setup for the test.", MAGIC_TOKEN);
+		       "This test must be run with the magic token via '-t %d'.\n"
+		       "Running via nx_huge_pages_test.sh, which also handles "
+		       "environment setup, is strongly recommended.", MAGIC_TOKEN);
 
 	run_test(reclaim_period_ms, false, reboot_permissions);
 	run_test(reclaim_period_ms, true, reboot_permissions);

base-commit: 6803fb00772cc50cd59a66bd8caaee5c84b13fcf

Signature · 1 line
2.43.0.rc1.413.gea7ed67945-goog
author reviewer
#1 lore raw
Quoted 9 lines · Sean Christopherson

Rework the NX hugepage test's skip message regarding the magic token to provide all of the necessary magic, and to very explicitly recommended using the wrapper shell script.

Opportunistically remove an overzealous newline; splitting the recommendation message across two lines of ~45 characters makes it much harder to read than running out a single line to 98 characters.

[...]

Applied to kvm-x86 selftests, thanks!

[1/1] KVM: selftests: Reword the NX hugepage test's skip message to be more helpful

      https://github.com/kvm-x86/linux/commit/02add85a9eef

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