Tests: Remove i686 support

This commit is contained in:
Liav A 2022-10-04 02:57:21 +03:00 committed by Andreas Kling
parent b49c4eb94f
commit 32270dcd20
Notes: sideshowbarker 2024-07-17 07:19:27 +09:00
2 changed files with 5 additions and 11 deletions

View file

@ -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)

View file

@ -8,7 +8,7 @@
#include <AK/Assertions.h>
#include <AK/DeprecatedString.h>
#include <AK/Function.h>
#if ARCH(I386) || ARCH(X86_64)
#if ARCH(X86_64)
# include <Kernel/Arch/x86/IO.h>
#endif
#include <LibCore/ArgsParser.h>
@ -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);