Skip to content

[lit] Add HOME to "safe" variables to pass through to tests #139367

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 10, 2025

Conversation

mgorny
Copy link
Member

@mgorny mgorny commented May 10, 2025

Incldue HOME among the variables that are passed through to tests when environment is cleaned. This is necessary for Gentoo build environments, where individual package builds are given temporary home directories that are exposed via HOME variable. By stripping the variable, lit made these tests attempt to access user's home directory, resulting in permission errors.

Incldue `HOME` among the variables that are passed through to tests
when environment is cleaned. This is necessary for Gentoo build
environments, where individual package builds are given temporary
home directories that are exposed via `HOME` variable. By stripping
the variable, `lit` made these tests attempt to access user's home
directory, resulting in permission errors.
@llvmbot
Copy link
Member

llvmbot commented May 10, 2025

@llvm/pr-subscribers-testing-tools

Author: Michał Górny (mgorny)

Changes

Incldue HOME among the variables that are passed through to tests when environment is cleaned. This is necessary for Gentoo build environments, where individual package builds are given temporary home directories that are exposed via HOME variable. By stripping the variable, lit made these tests attempt to access user's home directory, resulting in permission errors.


Full diff: https://github.com/llvm/llvm-project/pull/139367.diff

1 Files Affected:

  • (modified) llvm/utils/lit/lit/TestingConfig.py (+1)
diff --git a/llvm/utils/lit/lit/TestingConfig.py b/llvm/utils/lit/lit/TestingConfig.py
index b0d8e7149e553..c063851b89526 100644
--- a/llvm/utils/lit/lit/TestingConfig.py
+++ b/llvm/utils/lit/lit/TestingConfig.py
@@ -66,6 +66,7 @@ def fromdefaults(litConfig):
             "DFLTCC",
             "QEMU_LD_PREFIX",
             "QEMU_CPU",
+            "HOME",
         ]
 
         if sys.platform.startswith("aix"):

@mgorny mgorny merged commit 635c648 into llvm:main May 10, 2025
14 checks passed
@mgorny mgorny deleted the lit-home-passthrough branch May 10, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants