mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Make improvements
- Let OpenMP be usable via cosmocc - Let libunwind be usable via cosmocc - Make X86_HAVE(AVXVNNI) work correctly - Avoid using MAP_GROWSDOWN on qemu-aarch64 - Introduce in6addr_any and in6addr_loopback - Have thread stacks use MAP_GROWSDOWN by default - Ask OpenMP to not use filesystem to manage threads - Make NI_MAXHOST and NI_MAXSERV available w/o _GNU_SOURCE
This commit is contained in:
parent
5f8e9f14c1
commit
369aebfc48
36 changed files with 416 additions and 80 deletions
|
@ -33,7 +33,7 @@ void SetUpOnce(void) {
|
|||
}
|
||||
|
||||
TEST(__getcwd, zero) {
|
||||
if (IsQemu()) return;
|
||||
if (IsQemuUser()) return;
|
||||
ASSERT_SYS(ERANGE, -1, __getcwd(0, 0));
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ TEST(GetProramExecutableName, weirdArgv0NullEnv) {
|
|||
|
||||
TEST(GetProgramExecutableName, movedSelf) {
|
||||
if (skiptests) return;
|
||||
if (IsAarch64() && IsQemu()) {
|
||||
if (IsAarch64() && IsQemuUser()) {
|
||||
// clang-format off
|
||||
// TODO(mrdomino): fix: make -j8 m=aarch64 o/aarch64/test/libc/calls/getprogramexecutablename_test.com.ok
|
||||
// possibly related to the intersection of binfmt_misc and qemu-aarch64
|
||||
|
|
|
@ -69,8 +69,8 @@ TEST(madvise, subPages) {
|
|||
|
||||
TEST(madvise, misalign) {
|
||||
char *p;
|
||||
if (!IsLinux()) return; // most platforms don't care
|
||||
if (IsQemu()) return; // qemu claims to be linux but doesn't care
|
||||
if (!IsLinux()) return; // most platforms don't care
|
||||
if (IsQemuUser()) return; // qemu claims to be linux but doesn't care
|
||||
ASSERT_NE(MAP_FAILED, (p = mmap(0, FRAMESIZE, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)));
|
||||
ASSERT_SYS(EINVAL, -1, madvise(p + 1, FRAMESIZE - 1, MADV_WILLNEED));
|
||||
|
@ -79,7 +79,7 @@ TEST(madvise, misalign) {
|
|||
|
||||
TEST(madvise, badAdvice) {
|
||||
char *p;
|
||||
if (IsAarch64() && IsQemu()) return; // qemu doesn't validate advice
|
||||
if (IsAarch64() && IsQemuUser()) return; // qemu doesn't validate advice
|
||||
ASSERT_NE(MAP_FAILED, (p = mmap(0, FRAMESIZE, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)));
|
||||
ASSERT_SYS(EINVAL, -1, madvise(p, FRAMESIZE, 127));
|
||||
|
@ -87,8 +87,8 @@ TEST(madvise, badAdvice) {
|
|||
}
|
||||
|
||||
TEST(madvise, missingMemory) {
|
||||
if (!IsLinux()) return; // most platforms don't care
|
||||
if (IsQemu()) return; // qemu claims to be linux but doesn't care
|
||||
if (!IsLinux()) return; // most platforms don't care
|
||||
if (IsQemuUser()) return; // qemu claims to be linux but doesn't care
|
||||
ASSERT_SYS(ENOMEM, -1,
|
||||
madvise((char *)0x83483838000, FRAMESIZE, MADV_WILLNEED));
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "libc/calls/struct/siginfo.h"
|
||||
#include "libc/calls/struct/ucontext.internal.h"
|
||||
#include "libc/calls/ucontext.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/mem/gc.h"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "libc/limits.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/mem/gc.h"
|
||||
#include "libc/mem/gc.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sock/sock.h"
|
||||
|
@ -126,7 +125,7 @@ TEST(writev, empty_stillPerformsIoOperation) {
|
|||
ASSERT_NE(-1, (fd = open("file", O_RDONLY)));
|
||||
errno = 0;
|
||||
EXPECT_SYS(EBADF, -1, writev(fd, iov, ARRAYLEN(iov)));
|
||||
if (!(IsAarch64() && IsQemu())) {
|
||||
if (!(IsAarch64() && IsQemuUser())) {
|
||||
EXPECT_EQ(-1, writev(fd, NULL, 0));
|
||||
}
|
||||
EXPECT_NE(-1, close(fd));
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/ucontext.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/mem/gc.h"
|
||||
#include "libc/nt/createfile.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue