From 32270dcd20344ae2cd753232634cdcd4f0a4300e Mon Sep 17 00:00:00 2001 From: Liav A Date: Tue, 4 Oct 2022 02:57:21 +0300 Subject: [PATCH] Tests: Remove i686 support --- Tests/CMakeLists.txt | 3 --- Tests/Kernel/crash.cpp | 13 +++++-------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5133ec1b0b5..abb04d311ab 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -25,9 +25,6 @@ add_subdirectory(LibVideo) add_subdirectory(LibWasm) add_subdirectory(LibWeb) add_subdirectory(LibXML) -if (${SERENITY_ARCH} STREQUAL "i686") - add_subdirectory(UserspaceEmulator) -endif() add_subdirectory(LibCrypto) add_subdirectory(LibTLS) add_subdirectory(Spreadsheet) diff --git a/Tests/Kernel/crash.cpp b/Tests/Kernel/crash.cpp index 737fae88650..43b17f8936c 100644 --- a/Tests/Kernel/crash.cpp +++ b/Tests/Kernel/crash.cpp @@ -8,7 +8,7 @@ #include #include #include -#if ARCH(I386) || ARCH(X86_64) +#if ARCH(X86_64) # include #endif #include @@ -47,7 +47,7 @@ int main(int argc, char** argv) bool do_legitimate_syscall = false; bool do_execute_non_executable_memory = false; bool do_trigger_user_mode_instruction_prevention = false; -#if ARCH(I386) || ARCH(X86_64) +#if ARCH(X86_64) bool do_use_io_instruction = false; #endif bool do_pledge_violation = false; @@ -74,7 +74,7 @@ int main(int argc, char** argv) args_parser.add_option(do_legitimate_syscall, "Make a syscall from legitimate memory (but outside syscall-code mapped region)", nullptr, 'y'); 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'); -#if ARCH(I386) || ARCH(X86_64) +#if ARCH(X86_64) args_parser.add_option(do_use_io_instruction, "Use an x86 I/O instruction in userspace", nullptr, 'I'); #endif args_parser.add_option(do_pledge_violation, "Violate pledge()'d promises", nullptr, 'p'); @@ -236,10 +236,7 @@ int main(int argc, char** argv) return Crash::Failure::UnexpectedError; u8* bad_esp = bad_stack + 2048; -#if ARCH(I386) - asm volatile("mov %%eax, %%esp" ::"a"(bad_esp)); - asm volatile("pushl $0"); -#elif ARCH(X86_64) +#if ARCH(X86_64) asm volatile("movq %%rax, %%rsp" ::"a"(bad_esp)); asm volatile("pushq $0"); #elif ARCH(AARCH64) @@ -295,7 +292,7 @@ int main(int argc, char** argv) }).run(run_type); } -#if ARCH(I386) || ARCH(X86_64) +#if ARCH(X86_64) if (do_use_io_instruction || do_all_crash_types) { any_failures |= !Crash("Attempt to use an I/O instruction", [] { u8 keyboard_status = IO::in8(0x64);