Skip to content
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

Making proc and removing files #95

Open
gicmo opened this issue Sep 16, 2019 · 0 comments
Open

Making proc and removing files #95

gicmo opened this issue Sep 16, 2019 · 0 comments

Comments

@gicmo
Copy link
Contributor

gicmo commented Sep 16, 2019

To remove a file in the /proc the docu suggest to create a broken symlink:

Currently there is no way to "remove" files from the real directories or fully control them. You can get the effect of removing a file by creating a broken symlink in the umockdev directory though.

This does not seem to work because to check if a file exists in the mocked proc an access call is done, which dereferences the symlink, which will then fail and the real /proc will show through:

symlink("/NONEXIST-BOLT", "/tmp/umockdev.ZNLR7Z/proc/sys/kernel/osrelease") = 0
access("/tmp/umockdev.ZNLR7Z/disabled", F_OK) = -1 ENOENT (No such file or directory)
access("/tmp/umockdev.ZNLR7Z/proc/sys/kernel/osrelease", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/proc/sys/kernel/osrelease", O_RDONLY) = 7

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

No branches or pull requests

1 participant