mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:17:34 +00:00
Tests: Build all tests on x86_64
This builds some previously-disabled tests for x86_64.
This commit is contained in:
parent
3fce0e58e5
commit
75ba74a216
3 changed files with 4 additions and 13 deletions
|
@ -1,8 +1,6 @@
|
||||||
add_subdirectory(AK)
|
add_subdirectory(AK)
|
||||||
if ("${SERENITY_ARCH}" STREQUAL "i686")
|
add_subdirectory(Kernel)
|
||||||
add_subdirectory(Kernel)
|
add_subdirectory(LibC)
|
||||||
add_subdirectory(LibC)
|
|
||||||
endif()
|
|
||||||
add_subdirectory(LibCompress)
|
add_subdirectory(LibCompress)
|
||||||
add_subdirectory(LibCore)
|
add_subdirectory(LibCore)
|
||||||
add_subdirectory(LibCpp)
|
add_subdirectory(LibCpp)
|
||||||
|
|
|
@ -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.
|
// The largest SC_*_params struct is SC_mmap_params with 9 size_ts (36 bytes on x86, 72 on x86_64).
|
||||||
static_assert(sizeof(size_t) == 4, "Cannot handle size_t != 4 bytes");
|
static constexpr size_t fake_params_count = sizeof(Syscall::SC_mmap_params) / sizeof(size_t);
|
||||||
static constexpr size_t fake_params_count = 36 / 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)
|
static void do_weird_call(size_t attempt, int syscall_fn, size_t arg1, size_t arg2, size_t arg3, size_t* fake_params)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.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_ERROR[] = "\x1b[01;35m";
|
||||||
static constexpr char TEXT_WRONG[] = "\x1b[01;31m";
|
static constexpr char TEXT_WRONG[] = "\x1b[01;31m";
|
||||||
static constexpr char TEXT_OFBY1[] = "\x1b[01;97m";
|
static constexpr char TEXT_OFBY1[] = "\x1b[01;97m";
|
||||||
|
@ -328,10 +326,6 @@ static long long hex_to_ll(const char* hex)
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
if (sizeof(size_t) != 4) {
|
|
||||||
printf("lolwut?!\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
printf("Running %lu testcases...\n", NUM_TESTCASES);
|
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");
|
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");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue