mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 14:28:30 +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
|
@ -139,9 +139,9 @@ TEST(unveil, canBeUsedAgainAfterVfork) {
|
|||
TEST(unveil, rwc_createExecutableFile_isAllowedButCantBeRun) {
|
||||
SPAWN(fork);
|
||||
ASSERT_SYS(0, 0, mkdir("folder", 0755));
|
||||
testlib_extract("/zip/life.elf", "folder/life.elf", 0755);
|
||||
ASSERT_SYS(0, 0, unveil("folder", "rwc"));
|
||||
ASSERT_SYS(0, 0, unveil(0, 0));
|
||||
testlib_extract("/zip/life.elf", "folder/life.elf", 0755);
|
||||
SPAWN(fork);
|
||||
ASSERT_SYS(0, 0, stat("folder/life.elf", &st));
|
||||
ASSERT_SYS(EACCES, -1, execl("folder/life.elf", "folder/life.elf", 0));
|
||||
|
@ -152,9 +152,9 @@ TEST(unveil, rwc_createExecutableFile_isAllowedButCantBeRun) {
|
|||
TEST(unveil, rwcx_createExecutableFile_canAlsoBeRun) {
|
||||
SPAWN(fork);
|
||||
ASSERT_SYS(0, 0, mkdir("folder", 0755));
|
||||
testlib_extract("/zip/life.elf", "folder/life.elf", 0755);
|
||||
ASSERT_SYS(0, 0, unveil("folder", "rwcx"));
|
||||
ASSERT_SYS(0, 0, unveil(0, 0));
|
||||
testlib_extract("/zip/life.elf", "folder/life.elf", 0755);
|
||||
SPAWN(fork);
|
||||
ASSERT_SYS(0, 0, stat("folder/life.elf", &st));
|
||||
execl("folder/life.elf", "folder/life.elf", 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue