tests: Allow running tests from /tmp directory - #791
Open
maruixin-kls wants to merge 3 commits into
Open
maruixin-kls wants to merge 3 commits into
maruixin-kls wants to merge 3 commits into
Conversation
smcv
requested changes
Sep 14, 2026
smcv
left a comment
Collaborator
There was a problem hiding this comment.
No, this is not a solution. As the doc-comment of BwrapSandbox says, several test-cases assume that /tmp is an empty tmpfs under our control, and therefore that they can safely create predictable, hard-coded paths like /tmp/f in that tmpfs. That won't be true if /tmp is a copy of the "real" /tmp.
Perhaps you could change the BASE_BWRAP_ARGS to put a tmpfs on /dev/shm , then change all the hard-coded uses of /tmp in test-helper.py to be /dev/shm? And then it would be possible to remove the --tmpfs /tmp.
Alternatively, you could do your build in /var/tmp or some other filesystem.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes issue #781.
Previously, the test helper script (
tests/test-utils.sh) restricted the source directory to specific paths (like /home or /usr), causing tests to fail when the source tree was located in/tmp.This change updates the path validation logic to explicitly allow
/tmp, enabling developers to run the test suite from temporary directories.Fixes: #781