mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Make ZipOS and Qemu work better
This change improves the dirstream library in a lot of respects, especially for /zip/... files. Also turn off MAP_STACK on Aarch64 because Qemu seems to implement it differently than Linux and it's probably responsible for a lot of mysterious crashes.
This commit is contained in:
parent
4658ae539f
commit
110559ce6a
48 changed files with 748 additions and 500 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/calls/struct/metastat.internal.h"
|
||||
#include "libc/calls/struct/stat.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
|
@ -47,13 +48,15 @@ TEST(stat_010, testEmptyFile_sizeIsZero) {
|
|||
}
|
||||
|
||||
TEST(stat, enoent) {
|
||||
ASSERT_SYS(ENOENT, -1, stat("hi", 0));
|
||||
ASSERT_SYS(ENOENT, -1, stat("o/doesnotexist", 0));
|
||||
struct stat st;
|
||||
ASSERT_SYS(ENOENT, -1, stat("hi", &st));
|
||||
ASSERT_SYS(ENOENT, -1, stat("o/doesnotexist", &st));
|
||||
}
|
||||
|
||||
TEST(stat, enotdir) {
|
||||
struct stat st;
|
||||
ASSERT_SYS(0, 0, close(creat("yo", 0644)));
|
||||
ASSERT_SYS(ENOTDIR, -1, stat("yo/there", 0));
|
||||
ASSERT_SYS(ENOTDIR, -1, stat("yo/there", &st));
|
||||
}
|
||||
|
||||
TEST(stat, zipos) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue