Skip to content

Commit

Permalink
Tests: Build all tests on x86_64
Browse files Browse the repository at this point in the history
This builds some previously-disabled tests for x86_64.
  • Loading branch information
gunnarbeutner authored and awesomekling committed Jul 7, 2021
1 parent 3fce0e5 commit 75ba74a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
6 changes: 2 additions & 4 deletions Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
add_subdirectory(AK)
if ("${SERENITY_ARCH}" STREQUAL "i686")
add_subdirectory(Kernel)
add_subdirectory(LibC)
endif()
add_subdirectory(Kernel)
add_subdirectory(LibC)
add_subdirectory(LibCompress)
add_subdirectory(LibCore)
add_subdirectory(LibCpp)
Expand Down
5 changes: 2 additions & 3 deletions Tests/Kernel/fuzz-syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ static void randomize_from(size_t* buffer, size_t len, const Vector<size_t>& val
}
}

// The largest SC_*_params struct is SC_mmap_params with 36 bytes.
static_assert(sizeof(size_t) == 4, "Cannot handle size_t != 4 bytes");
static constexpr size_t fake_params_count = 36 / sizeof(size_t);
// The largest SC_*_params struct is SC_mmap_params with 9 size_ts (36 bytes on x86, 72 on x86_64).
static constexpr size_t fake_params_count = sizeof(Syscall::SC_mmap_params) / sizeof(size_t);

static void do_weird_call(size_t attempt, int syscall_fn, size_t arg1, size_t arg2, size_t arg3, size_t* fake_params)
{
Expand Down
6 changes: 0 additions & 6 deletions Tests/LibC/accuracy-strtod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#include <time.h>
#include <unistd.h>

typedef char assert_size_t_is_int[sizeof(size_t) == 4 ? 1 : -1];

static constexpr char TEXT_ERROR[] = "\x1b[01;35m";
static constexpr char TEXT_WRONG[] = "\x1b[01;31m";
static constexpr char TEXT_OFBY1[] = "\x1b[01;97m";
Expand Down Expand Up @@ -328,10 +326,6 @@ static long long hex_to_ll(const char* hex)

int main()
{
if (sizeof(size_t) != 4) {
printf("lolwut?!\n");
return 1;
}
printf("Running %lu testcases...\n", NUM_TESTCASES);
printf("%3s(%-5s): %16s(%2s) %16s(%2s) %16s(%2s) %16s(%2s) – %s\n", "num", "name", "correct", "cs", "builtin", "cs", "old_strtod", "cs", "new_strtod", "cs", "teststring");

Expand Down

0 comments on commit 75ba74a

Please sign in to comment.