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

[test] env -u is not supported on AIX, use unset instead #111736

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

w2yehia
Copy link
Contributor

@w2yehia w2yehia commented Oct 9, 2024

No description provided.

@llvmbot llvmbot added compiler-rt PGO Profile Guided Optimizations labels Oct 9, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Oct 9, 2024

@llvm/pr-subscribers-pgo

Author: Wael Yehia (w2yehia)

Changes

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

1 Files Affected:

  • (modified) compiler-rt/test/profile/instrprof-tmpdir.c (+2-1)
diff --git a/compiler-rt/test/profile/instrprof-tmpdir.c b/compiler-rt/test/profile/instrprof-tmpdir.c
index 6f323e7e6a01a5..5cc9af4455e00b 100644
--- a/compiler-rt/test/profile/instrprof-tmpdir.c
+++ b/compiler-rt/test/profile/instrprof-tmpdir.c
@@ -12,7 +12,8 @@
 // RUN: llvm-profdata show ./raw2.profraw | FileCheck %s -check-prefix TMPDIR
 //
 // Check that we fall back to the default path if TMPDIR is missing.
-// RUN: env -u TMPDIR LLVM_PROFILE_FILE="%%t/raw3.profraw" %run %t/binary 2>&1 | FileCheck %s -check-prefix MISSING
+// RUN: unset TMPDIR
+// RUN: env LLVM_PROFILE_FILE="%%t/raw3.profraw" %run %t/binary 2>&1 | FileCheck %s -check-prefix MISSING
 // RUN: llvm-profdata show ./default.profraw | FileCheck %s -check-prefix TMPDIR
 
 // TMPDIR: Maximum function count: 1

@@ -12,7 +12,8 @@
// RUN: llvm-profdata show ./raw2.profraw | FileCheck %s -check-prefix TMPDIR
//
// Check that we fall back to the default path if TMPDIR is missing.
// RUN: env -u TMPDIR LLVM_PROFILE_FILE="%%t/raw3.profraw" %run %t/binary 2>&1 | FileCheck %s -check-prefix MISSING
// RUN: unset TMPDIR
Copy link
Collaborator

@hubert-reinterpretcast hubert-reinterpretcast Oct 9, 2024

Choose a reason for hiding this comment

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

I see no sign that unset is implemented in the LIT built-in shell:
https://github.com/llvm/llvm-project/blob/e82fcda1475b6708b7d314fd7a54e551306d5739/llvm/utils/lit/lit/TestRunner.py

The built-in env does not support env -i.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, unset does not seem to be implemented in the built-in shell,
and since windows doesn't have unset, I'm making this an aix-only change.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler-rt PGO Profile Guided Optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants