Skip to content

Commit

Permalink
Tests: Remove i686 support
Browse files Browse the repository at this point in the history
  • Loading branch information
supercomputer7 authored and awesomekling committed Dec 28, 2022
1 parent b49c4eb commit 32270dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
3 changes: 0 additions & 3 deletions Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
13 changes: 5 additions & 8 deletions Tests/Kernel/crash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
Expand All @@ -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');
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 32270dc

Please sign in to comment.