From 9e8c698ae84d7fa70bb404c6e8deda6a47e88ac7 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Fri, 8 Jul 2022 16:46:53 +0200 Subject: [PATCH] Tests: Remove the RDTSC kernel crash test We will remove the RDTSC instruction restriction to allow QEMU to read an accurate time, so this will no longer crash and therefore fail the test. --- Tests/Kernel/crash.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Tests/Kernel/crash.cpp b/Tests/Kernel/crash.cpp index d245e44a4e..ad1759f978 100644 --- a/Tests/Kernel/crash.cpp +++ b/Tests/Kernel/crash.cpp @@ -46,7 +46,6 @@ int main(int argc, char** argv) bool do_execute_non_executable_memory = false; bool do_trigger_user_mode_instruction_prevention = false; bool do_use_io_instruction = false; - bool do_read_cpu_counter = false; bool do_pledge_violation = false; bool do_failing_assertion = false; bool do_deref_null_refptr = false; @@ -72,7 +71,6 @@ int main(int argc, char** argv) args_parser.add_option(do_execute_non_executable_memory, "Attempt to execute non-executable memory (not mapped with PROT_EXEC)", nullptr, 'X'); args_parser.add_option(do_trigger_user_mode_instruction_prevention, "Attempt to trigger an x86 User Mode Instruction Prevention fault. WARNING: This test runs only when invoked manually, see #10042.", nullptr, 'U'); args_parser.add_option(do_use_io_instruction, "Use an x86 I/O instruction in userspace", nullptr, 'I'); - args_parser.add_option(do_read_cpu_counter, "Read the x86 TSC (Time Stamp Counter) directly", nullptr, 'c'); args_parser.add_option(do_pledge_violation, "Violate pledge()'d promises", nullptr, 'p'); args_parser.add_option(do_failing_assertion, "Perform a failing assertion", nullptr, 'n'); args_parser.add_option(do_deref_null_refptr, "Dereference a null RefPtr", nullptr, 'R'); @@ -274,13 +272,6 @@ int main(int argc, char** argv) }).run(run_type); } - if (do_read_cpu_counter || do_all_crash_types) { - any_failures |= !Crash("Read the CPU timestamp counter", [] { - asm volatile("rdtsc"); - return Crash::Failure::DidNotCrash; - }).run(run_type); - } - if (do_pledge_violation || do_all_crash_types) { any_failures |= !Crash("Violate pledge()'d promises", [] { if (pledge("", nullptr) < 0) {