diff options
-rw-r--r-- | tests/unistd/access.c | 10 | ||||
-rw-r--r-- | tests/unistd/truncate.c | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/unistd/access.c b/tests/unistd/access.c index 57d38f5c..92b52e5e 100644 --- a/tests/unistd/access.c +++ b/tests/unistd/access.c @@ -33,5 +33,15 @@ int main() { errno = 0; printf("\n"); } + + // Restore full permissions on all created files so that python test runner rmtree + // won't have problems on deleting the files. On Windows, calling shutil.rmtree() + // will fail if any of the files are read-only. + EM_ASM( + FS.chmod('forbidden', 0777); + FS.chmod('readable', 0777); + FS.chmod('writeable', 0777); + FS.chmod('allaccess', 0777); + ); return 0; } diff --git a/tests/unistd/truncate.c b/tests/unistd/truncate.c index e63a4c13..5620f502 100644 --- a/tests/unistd/truncate.c +++ b/tests/unistd/truncate.c @@ -76,5 +76,11 @@ int main() { memset(&s, 0, sizeof s); errno = 0; + // Restore full permissions on all created files so that python test runner rmtree + // won't have problems on deleting the files. On Windows, calling shutil.rmtree() + // will fail if any of the files are read-only. + EM_ASM( + FS.chmod('toread', 0777); + ); return 0; } |