Skip to content

Cleanup symlink tests #21890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2024
Merged

Cleanup symlink tests #21890

merged 1 commit into from
May 6, 2024

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented May 4, 2024

Add some more tests to links.c and make sure it runs on native linux.

Simplify symlink_on_nodefs.c by using assert.

@sbc100 sbc100 requested a review from kripken May 4, 2024 16:43
@sbc100 sbc100 force-pushed the symlink_tests branch 5 times, most recently from 5de9dc4 to d8fb93e Compare May 4, 2024 17:54
@sbc100 sbc100 requested a review from dschuff May 5, 2024 19:48
- Add some more tests to `links.c` and make sure it runs on native linux.
- Simplify symlink_on_nodefs.c by using assert.

Also, fix `utils.delete_content` so that it also removes dangling
symlinks.  Without this the dangling symlinks in the test output
directory are not removed.
fs.mkdirSync('./new-directory', '0777');
fs.writeFileSync('./new-directory/test', 'Link it');
fs.symlinkSync(fs.realpathSync('./new-directory'), './symlink');
fs.mkdirSync('new-directory', '0777');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the difference between fs and FS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fs is working directly with the real (node) filesystem. (e.g. import * as fs from "fs" in node)

FS is the emscripten VFS.

@sbc100 sbc100 enabled auto-merge (squash) May 6, 2024 17:01
@sbc100 sbc100 merged commit 80798ac into emscripten-core:main May 6, 2024
@sbc100 sbc100 deleted the symlink_tests branch May 6, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants