mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Revert "Rewrite ZipOS"
This reverts commit b01282e23e
. Some tests
are broken. It's not clear how it'll impact metal yet. Let's revisit the
memory optimization benefits of this change again sometime soon.
This commit is contained in:
parent
ee8a861635
commit
ff250a0c10
21 changed files with 420 additions and 407 deletions
|
@ -52,7 +52,7 @@ void *Worker(void *arg) {
|
|||
}
|
||||
|
||||
TEST(zipos, test) {
|
||||
int i, n = 20;
|
||||
int i, n = 16;
|
||||
pthread_t *t = gc(malloc(sizeof(pthread_t) * n));
|
||||
for (i = 0; i < n; ++i) {
|
||||
ASSERT_SYS(0, 0, pthread_create(t + i, 0, Worker, 0));
|
||||
|
@ -86,14 +86,6 @@ TEST(zipos, readPastEof) {
|
|||
EXPECT_SYS(0, 0, close(3));
|
||||
}
|
||||
|
||||
TEST(zipos, simple) {
|
||||
char buf[31] = {0};
|
||||
ASSERT_SYS(0, 3, open("/zip/libc/testlib/hyperion.txt", O_RDONLY));
|
||||
ASSERT_SYS(0, 30, read(3, buf, 30));
|
||||
ASSERT_STREQ("The fall of Hyperion - a Dream", buf);
|
||||
ASSERT_SYS(0, 0, close(3));
|
||||
}
|
||||
|
||||
TEST(zipos_O_DIRECTORY, blocksOpeningOfNormalFiles) {
|
||||
ASSERT_SYS(ENOTDIR, -1,
|
||||
open("/zip/libc/testlib/hyperion.txt", O_RDONLY | O_DIRECTORY));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue