Skip to content

[llvm-objdump][test] Relax directory prefix check in source-interleave test #93789

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 31, 2024

Conversation

nikic
Copy link
Contributor

@nikic nikic commented May 30, 2024

This test currently has an explicit regex for characters that are supposedly valid inside a directory name -- however, it does not actually cover all necessary characters. For example, this test fails if the path contains a tilde.

Instead, replace this with a wildcard.

… (NFC)

This test currently has an explicit regex for characters that are
supposedly valid inside a directory name -- however, it does not
actually cover all necessary characters. For example, this test
fails if the path contains a tilde.

Instead, replace this with a wildcard.
@llvmbot
Copy link
Member

llvmbot commented May 30, 2024

@llvm/pr-subscribers-llvm-binary-utilities

Author: Nikita Popov (nikic)

Changes

This test currently has an explicit regex for characters that are supposedly valid inside a directory name -- however, it does not actually cover all necessary characters. For example, this test fails if the path contains a tilde.

Instead, replace this with a wildcard.


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

1 Files Affected:

  • (modified) llvm/test/tools/llvm-objdump/X86/source-interleave-x86_64.test (+1-1)
diff --git a/llvm/test/tools/llvm-objdump/X86/source-interleave-x86_64.test b/llvm/test/tools/llvm-objdump/X86/source-interleave-x86_64.test
index cbcc35cf79653..dcce95c83b1d2 100644
--- a/llvm/test/tools/llvm-objdump/X86/source-interleave-x86_64.test
+++ b/llvm/test/tools/llvm-objdump/X86/source-interleave-x86_64.test
@@ -11,7 +11,7 @@
 
 # LINES: <main>:
 # LINES-NEXT: ; main():
-# LINES-NEXT: ; {{[ -\(\)_A-Za-z0-9.\\/:]+}}source-interleave-x86_64.c:6
+# LINES-NEXT: ; {{.+}}source-interleave-x86_64.c:6
 
 # SOURCE: <main>:
 # SOURCE-NEXT: ; int main() {

@nikic nikic changed the title [llvm-objdump] Don't match directory prefix in source-interleave test (NFC) [llvm-objdump] Relax directory prefix check in source-interleave test (NFC) May 31, 2024
@nikic nikic requested review from tuliom and kwk May 31, 2024 06:17
@MaskRay
Copy link
Member

MaskRay commented May 31, 2024

(NFC)

This is good, but I think [test] is more popular for pure test changes. NFC can describe code changes, while [test] is clear it is for tests.

@nikic nikic changed the title [llvm-objdump] Relax directory prefix check in source-interleave test (NFC) [llvm-objdump][test] Relax directory prefix check in source-interleave test May 31, 2024
@nikic nikic merged commit 57eb92e into llvm:main May 31, 2024
9 checks passed
@nikic nikic deleted the fix-source-interleave-test branch May 31, 2024 16:46
@@ -11,7 +11,7 @@

# LINES: <main>:
# LINES-NEXT: ; main():
# LINES-NEXT: ; {{[ -\(\)_A-Za-z0-9.\\/:]+}}source-interleave-x86_64.c:6
# LINES-NEXT: ; {{.+}}source-interleave-x86_64.c:6
Copy link
Collaborator

@jh7370 jh7370 Jun 4, 2024

Choose a reason for hiding this comment

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

FWIW, I think this should probably actually be using a FileCheck variable, defined on the command-line using a lit substitution (e.g. FileCheck -D SRC_DIR=%S ... and here ; [[SRC_DIR]]source-interleave-x86_64.c:6 - just an example, the actual variable probably wants to be something else).

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.

4 participants