Skip to content

[llvm-lit] Add precommit test to verify current behavior of glob expansion in lit's internal shell #106325

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 4 commits into from
Aug 30, 2024

Conversation

Harini0924
Copy link
Contributor

This patch introduces a precommit test to verify the current behavior of glob expansion in lit's internal shell. The motivation for this test stems from an issue encountered during the BOLT test suite when running with the lit internal shell using the command:

LIT_USE_INTERNAL_SHELL=1 ninja check-bolt

During execution, the following error was observed:

File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 416, in executeBuiltinEcho
    stdout.write(encode(maybeUnescape(args[-1])))
TypeError: string argument expected, got 'GlobItem'

The executeBuiltinEcho function in the lit testing framework expects a string to be passed to stdout.write, but it received a GlobItem object instead. This precommit test is designed to check the current behavior where the glob pattern isn't correctly expanded, leading to this TypeError.

While this patch doesn't fix the issue, it helps in understanding and verifying the current behavior. The feedback I received from this PR suggests using cmd.args = expand_glob_expressions(cmd.args, shenv.cwd) to match the behavior of executeBuiltinMkdir and executeBuiltinRm, but it is recognized that the internal shell should ideally expand globs before calling any built-in command.

Request for Feedback:
I'm looking for feedback on how to improve this precommit test, specifically regarding the handling and expansion of glob patterns for commands like mkdir and rm within the internal shell. Currently, the args are expanded at the beginning of these functions, which should ensure proper glob expansion. However, I'd appreciate guidance on whether I should write additional tests to verify that mkdir and rm are handling glob expansions correctly.

If such tests are recommended, I would also appreciate advice on the best approach to implement them, considering the existing framework and the way glob expansion is expected to function in the internal shell. Should these tests confirm that the current implementation passes, or are there specific edge cases I should be aware of?

Next Steps:

In my follow-up PR, I plan to address the UNRESOLVED error by expanding the entire command, ensuring correct and consistent behavior across all commands. The current test checks for an unresolved issue with the glob expansion, specifically looking for a TypeError due to an unexpanded GlobItem. This will be updated to reflect the correct behavior once the issue is resolved.

This change is relevant for [RFC] Enabling the Lit Internal Shell by Default

This commit introduces a new test file, shtest-glob.py, to the lit testing framework. The test is designed to verify the handling of glob patterns within the internal shell, specifically checking the behavior of commands like echo when glob patterns are present. The test includes example files, example_file1.txt and example_file2.txt, which are used to validate whether the glob expansion is correctly performed or remains unexpanded as expected in certain cases. This addition helps ensure that glob pattern processing behaves consistently across different shell commands in lit.
@llvmbot
Copy link
Member

llvmbot commented Aug 28, 2024

@llvm/pr-subscribers-testing-tools

Author: None (Harini0924)

Changes

This patch introduces a precommit test to verify the current behavior of glob expansion in lit's internal shell. The motivation for this test stems from an issue encountered during the BOLT test suite when running with the lit internal shell using the command:

LIT_USE_INTERNAL_SHELL=1 ninja check-bolt

During execution, the following error was observed:

File "/usr/local/google/home/harinidonthula/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 416, in executeBuiltinEcho
    stdout.write(encode(maybeUnescape(args[-1])))
TypeError: string argument expected, got 'GlobItem'

The executeBuiltinEcho function in the lit testing framework expects a string to be passed to stdout.write, but it received a GlobItem object instead. This precommit test is designed to check the current behavior where the glob pattern isn't correctly expanded, leading to this TypeError.

While this patch doesn't fix the issue, it helps in understanding and verifying the current behavior. The feedback I received from this PR suggests using cmd.args = expand_glob_expressions(cmd.args, shenv.cwd) to match the behavior of executeBuiltinMkdir and executeBuiltinRm, but it is recognized that the internal shell should ideally expand globs before calling any built-in command.

Request for Feedback:
I'm looking for feedback on how to improve this precommit test, specifically regarding the handling and expansion of glob patterns for commands like mkdir and rm within the internal shell. Currently, the args are expanded at the beginning of these functions, which should ensure proper glob expansion. However, I'd appreciate guidance on whether I should write additional tests to verify that mkdir and rm are handling glob expansions correctly.

If such tests are recommended, I would also appreciate advice on the best approach to implement them, considering the existing framework and the way glob expansion is expected to function in the internal shell. Should these tests confirm that the current implementation passes, or are there specific edge cases I should be aware of?

Next Steps:

In my follow-up PR, I plan to address the UNRESOLVED error by expanding the entire command, ensuring correct and consistent behavior across all commands. The current test checks for an unresolved issue with the glob expansion, specifically looking for a TypeError due to an unexpanded GlobItem. This will be updated to reflect the correct behavior once the issue is resolved.

This change is relevant for [RFC] Enabling the Lit Internal Shell by Default


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

4 Files Affected:

  • (added) llvm/utils/lit/tests/Inputs/shtest-glob/example_file1.txt (+2)
  • (added) llvm/utils/lit/tests/Inputs/shtest-glob/example_file2.txt (+2)
  • (added) llvm/utils/lit/tests/Inputs/shtest-glob/glob-echo.txt (+2)
  • (added) llvm/utils/lit/tests/shtest-glob.py (+9)
diff --git a/llvm/utils/lit/tests/Inputs/shtest-glob/example_file1.txt b/llvm/utils/lit/tests/Inputs/shtest-glob/example_file1.txt
new file mode 100644
index 00000000000000..1bf50291a824a6
--- /dev/null
+++ b/llvm/utils/lit/tests/Inputs/shtest-glob/example_file1.txt
@@ -0,0 +1,2 @@
+## This is the first example file used for testing glob pattern matching.
+RUN: This is the first example file.
diff --git a/llvm/utils/lit/tests/Inputs/shtest-glob/example_file2.txt b/llvm/utils/lit/tests/Inputs/shtest-glob/example_file2.txt
new file mode 100644
index 00000000000000..7263ea1dccf4a8
--- /dev/null
+++ b/llvm/utils/lit/tests/Inputs/shtest-glob/example_file2.txt
@@ -0,0 +1,2 @@
+## This is the second example file used for testing glob pattern matching.
+RUN: This is the second example file.
diff --git a/llvm/utils/lit/tests/Inputs/shtest-glob/glob-echo.txt b/llvm/utils/lit/tests/Inputs/shtest-glob/glob-echo.txt
new file mode 100644
index 00000000000000..31fc03f22bd5f9
--- /dev/null
+++ b/llvm/utils/lit/tests/Inputs/shtest-glob/glob-echo.txt
@@ -0,0 +1,2 @@
+## Tests glob pattern expansion by listing matching files.
+# RUN: echo %{inputs}/shtest-glob/example_file*.txt
diff --git a/llvm/utils/lit/tests/shtest-glob.py b/llvm/utils/lit/tests/shtest-glob.py
new file mode 100644
index 00000000000000..3d59e681cca4f9
--- /dev/null
+++ b/llvm/utils/lit/tests/shtest-glob.py
@@ -0,0 +1,9 @@
+## Tests glob pattern handling in echo command.
+
+# RUN: not %{lit} -a -v %{inputs}/shtest-glob \ 
+# RUN: | FileCheck -dump-input=fail -match-full-lines %s
+#
+# END.
+
+# CHECK: UNRESOLVED: shtest-glob :: glob-echo.txt ({{[^)]*}})
+# CHECK: TypeError: string argument expected, got 'GlobItem'

I forgot to add the lit.cfg file in my previous commit.
Copy link

github-actions bot commented Aug 28, 2024

✅ With the latest revision this PR passed the Python code formatter.

Copy link
Member

@arichardson arichardson left a comment

Choose a reason for hiding this comment

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

(accidentally accepted)

Renamed `example_file1.txt` and `example_file2.txt` to `.input` files to avoid `RUN` lines in test files and ensure they are not executed as test scripts. Added `glob-mkdir.txt` to test `mkdir` with glob patterns, ensuring failure when directories exist.  Modified `shtest-glob.py` to include checks for both `echo` and `mkdir` command tests. Ensured that the `mkdir` command test is expected to fail, confirming proper error handling for existing paths.
@Harini0924
Copy link
Contributor Author

I will address the code formatter issues later.

@Harini0924
Copy link
Contributor Author

@arichardson I followed your suggestion about keeping the tests in separate files to align with the current structure of the lit internal test suite. I created a file glob-mkdir.txt that checks if the mkdir command fails as expected when attempting to create a directory that already exists (using example_file). This is reflected in the shtest-glob.py file, where the test is expected to fail. Is this what you had in mind? Should I add or change anything else?

Copy link
Contributor

@ilovepi ilovepi left a comment

Choose a reason for hiding this comment

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

LGTM, as long as @arichardson is satisfied.

Copy link
Member

@arichardson arichardson left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good to me.

# CHECK: TypeError: string argument expected, got 'GlobItem'

# CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}})
# CHECK: # error: command failed with exit status: 1
Copy link
Member

Choose a reason for hiding this comment

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

I was surprised there is no more specific error here but it looks like the builtin mkdir does not print any output right now. Turns out it doesn't handle EEXISTS the same way as the real mkdir command. I can submit a patch for this once this commit lands.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A patch to address that would be great, and I’m looking forward to seeing it once this commit lands.

@arichardson
Copy link
Member

Thanks, this looks good to me.

But please do fix the trailing whitespace before committing.

@Harini0924 Harini0924 merged commit 9764cf8 into llvm:main Aug 30, 2024
8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 30, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-ubuntu-fast running on sie-linux-worker while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/5871

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lit :: shtest-glob.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
not env -u FILECHECK_OPTS "/usr/bin/python3.10" /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob  | FileCheck -dump-input=fail -match-full-lines /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/utils/lit/tests/shtest-glob.py
# executed command: not env -u FILECHECK_OPTS /usr/bin/python3.10 /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob
# executed command: FileCheck -dump-input=fail -match-full-lines /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/utils/lit/tests/shtest-glob.py
# .---command stderr------------
# | �[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/utils/lit/tests/shtest-glob.py:11:10: �[0m�[0;1;31merror: �[0m�[1mCHECK: expected string not found in input
# | �[0m# CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}
# | �[0;1;32m         ^
# | �[0m�[1m<stdin>:26:52: �[0m�[0;1;30mnote: �[0m�[1mscanning from here
# | �[0mTypeError: string argument expected, got 'GlobItem'
# | �[0;1;32m                                                   ^
# | �[0m�[1m<stdin>:30:1: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
# | �[0mFAIL: shtest-glob :: glob-mkdir.txt (2 of 2)
# | �[0;1;32m^
# | �[0m
# | Input file: <stdin>
# | Check file: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/utils/lit/tests/shtest-glob.py
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# | �[1m�[0m�[0;1;30m            1: �[0m�[1m�[0;1;46m-- Testing: 2 tests, 1 workers -- �[0m
# | �[0;1;30m            2: �[0m�[1m�[0;1;46m�[0mUNRESOLVED: shtest-glob :: glob-echo.txt (1 of 2)�[0;1;46m �[0m
# | �[0;1;32mcheck:8        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | �[0m�[0;1;30m            3: �[0m�[1m�[0;1;46m******************** TEST 'shtest-glob :: glob-echo.txt' FAILED ******************** �[0m
# | �[0;1;30m            4: �[0m�[1m�[0;1;46mException during script execution: �[0m
# | �[0;1;30m            5: �[0m�[1m�[0;1;46mTraceback (most recent call last): �[0m
# | �[0;1;30m            6: �[0m�[1m�[0;1;46m File "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit/worker.py", line 76, in _execute_test_handle_errors �[0m
# | �[0;1;30m            7: �[0m�[1m�[0;1;46m result = test.config.test_format.execute(test, lit_config) �[0m
# | �[0;1;30m            8: �[0m�[1m�[0;1;46m File "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit/formats/shtest.py", line 29, in execute �[0m
# | �[0;1;30m            9: �[0m�[1m�[0;1;46m return lit.TestRunner.executeShTest( �[0m
# | �[0;1;30m           10: �[0m�[1m�[0;1;46m File "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 2298, in executeShTest �[0m
# | �[0;1;30m           11: �[0m�[1m�[0;1;46m return _runShTest(test, litConfig, useExternalSh, script, tmpBase) �[0m
# | �[0;1;30m           12: �[0m�[1m�[0;1;46m File "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 2242, in _runShTest �[0m
# | �[0;1;30m           13: �[0m�[1m�[0;1;46m res = runOnce(execdir) �[0m
# | �[0;1;30m           14: �[0m�[1m�[0;1;46m File "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 2218, in runOnce �[0m
# | �[0;1;30m           15: �[0m�[1m�[0;1;46m res = executeScriptInternal( �[0m
# | �[0;1;30m           16: �[0m�[1m�[0;1;46m File "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1086, in executeScriptInternal �[0m
# | �[0;1;30m           17: �[0m�[1m�[0;1;46m exitCode, timeoutInfo = executeShCmd( �[0m
# | �[0;1;30m           18: �[0m�[1m�[0;1;46m File "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 204, in executeShCmd �[0m
# | �[0;1;30m           19: �[0m�[1m�[0;1;46m finalExitCode = _executeShCmd(cmd, shenv, results, timeoutHelper) �[0m
# | �[0;1;30m           20: �[0m�[1m�[0;1;46m File "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 696, in _executeShCmd �[0m
# | �[0;1;30m           21: �[0m�[1m�[0;1;46m res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper) �[0m
# | �[0;1;30m           22: �[0m�[1m�[0;1;46m File "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 799, in _executeShCmd �[0m
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 30, 2024

LLVM Buildbot has detected a new failure on builder ml-opt-devrel-x86-64 running on ml-opt-devrel-x86-64-b2 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/175/builds/4327

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lit :: shtest-glob.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
not env -u FILECHECK_OPTS "/usr/bin/python3" /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob  | FileCheck -dump-input=fail -match-full-lines /b/ml-opt-devrel-x86-64-b1/build/utils/lit/tests/shtest-glob.py
# executed command: not env -u FILECHECK_OPTS /usr/bin/python3 /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob
# executed command: FileCheck -dump-input=fail -match-full-lines /b/ml-opt-devrel-x86-64-b1/build/utils/lit/tests/shtest-glob.py
# .---command stderr------------
# | /b/ml-opt-devrel-x86-64-b1/build/utils/lit/tests/shtest-glob.py:11:10: error: CHECK: expected string not found in input
# | # CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}
# |          ^
# | <stdin>:26:52: note: scanning from here
# | TypeError: string argument expected, got 'GlobItem'
# |                                                    ^
# | <stdin>:30:1: note: possible intended match here
# | FAIL: shtest-glob :: glob-mkdir.txt (2 of 2)
# | ^
# | 
# | Input file: <stdin>
# | Check file: /b/ml-opt-devrel-x86-64-b1/build/utils/lit/tests/shtest-glob.py
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            21:  res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper) 
# |            22:  File "/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 799, in _executeShCmd 
# |            23:  result = inproc_builtin(Command(args, j.redirects), cmd_shenv) 
# |            24:  File "/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 415, in executeBuiltinEcho 
# |            25:  stdout.write(encode(maybeUnescape(args[-1]))) 
# |            26: TypeError: string argument expected, got 'GlobItem' 
# | check:11'0                                                        X error: no match found
# |            27:  
# | check:11'0     ~
# |            28:  
# | check:11'0     ~
# |            29: ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~
# |            30: FAIL: shtest-glob :: glob-mkdir.txt (2 of 2) 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:11'1     ?                                             possible intended match
# |            31: ******************** TEST 'shtest-glob :: glob-mkdir.txt' FAILED ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            32: Exit Code: 1 
# | check:11'0     ~~~~~~~~~~~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 30, 2024

LLVM Buildbot has detected a new failure on builder ml-opt-dev-x86-64 running on ml-opt-dev-x86-64-b1 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/137/builds/4372

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lit :: shtest-glob.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
not env -u FILECHECK_OPTS "/usr/bin/python3" /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob  | FileCheck -dump-input=fail -match-full-lines /b/ml-opt-dev-x86-64-b1/build/utils/lit/tests/shtest-glob.py
# executed command: not env -u FILECHECK_OPTS /usr/bin/python3 /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob
# executed command: FileCheck -dump-input=fail -match-full-lines /b/ml-opt-dev-x86-64-b1/build/utils/lit/tests/shtest-glob.py
# .---command stderr------------
# | /b/ml-opt-dev-x86-64-b1/build/utils/lit/tests/shtest-glob.py:11:10: error: CHECK: expected string not found in input
# | # CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}
# |          ^
# | <stdin>:26:52: note: scanning from here
# | TypeError: string argument expected, got 'GlobItem'
# |                                                    ^
# | <stdin>:30:1: note: possible intended match here
# | FAIL: shtest-glob :: glob-mkdir.txt (2 of 2)
# | ^
# | 
# | Input file: <stdin>
# | Check file: /b/ml-opt-dev-x86-64-b1/build/utils/lit/tests/shtest-glob.py
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            21:  res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper) 
# |            22:  File "/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 799, in _executeShCmd 
# |            23:  result = inproc_builtin(Command(args, j.redirects), cmd_shenv) 
# |            24:  File "/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 415, in executeBuiltinEcho 
# |            25:  stdout.write(encode(maybeUnescape(args[-1]))) 
# |            26: TypeError: string argument expected, got 'GlobItem' 
# | check:11'0                                                        X error: no match found
# |            27:  
# | check:11'0     ~
# |            28:  
# | check:11'0     ~
# |            29: ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~
# |            30: FAIL: shtest-glob :: glob-mkdir.txt (2 of 2) 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:11'1     ?                                             possible intended match
# |            31: ******************** TEST 'shtest-glob :: glob-mkdir.txt' FAILED ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            32: Exit Code: 1 
# | check:11'0     ~~~~~~~~~~~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 30, 2024

LLVM Buildbot has detected a new failure on builder lld-x86_64-ubuntu-fast running on as-builder-4 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/33/builds/2142

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lit :: shtest-glob.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
not env -u FILECHECK_OPTS "/usr/bin/python3.10" /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob  | FileCheck -dump-input=fail -match-full-lines /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/utils/lit/tests/shtest-glob.py
# executed command: not env -u FILECHECK_OPTS /usr/bin/python3.10 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob
# executed command: FileCheck -dump-input=fail -match-full-lines /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/utils/lit/tests/shtest-glob.py
# .---command stderr------------
# | /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/utils/lit/tests/shtest-glob.py:11:10: error: CHECK: expected string not found in input
# | # CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}
# |          ^
# | <stdin>:26:52: note: scanning from here
# | TypeError: string argument expected, got 'GlobItem'
# |                                                    ^
# | <stdin>:30:1: note: possible intended match here
# | FAIL: shtest-glob :: glob-mkdir.txt (2 of 2)
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/utils/lit/tests/shtest-glob.py
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            21:  res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper) 
# |            22:  File "/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 799, in _executeShCmd 
# |            23:  result = inproc_builtin(Command(args, j.redirects), cmd_shenv) 
# |            24:  File "/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 415, in executeBuiltinEcho 
# |            25:  stdout.write(encode(maybeUnescape(args[-1]))) 
# |            26: TypeError: string argument expected, got 'GlobItem' 
# | check:11'0                                                        X error: no match found
# |            27:  
# | check:11'0     ~
# |            28:  
# | check:11'0     ~
# |            29: ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~
# |            30: FAIL: shtest-glob :: glob-mkdir.txt (2 of 2) 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:11'1     ?                                             possible intended match
# |            31: ******************** TEST 'shtest-glob :: glob-mkdir.txt' FAILED ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            32: Exit Code: 1 
# | check:11'0     ~~~~~~~~~~~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 30, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-expensive-checks-debian running on gribozavr4 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/16/builds/4460

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lit :: shtest-glob.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
not env -u FILECHECK_OPTS "/usr/bin/python3.9" /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob  | FileCheck -dump-input=fail -match-full-lines /b/1/llvm-clang-x86_64-expensive-checks-debian/build/utils/lit/tests/shtest-glob.py
# executed command: not env -u FILECHECK_OPTS /usr/bin/python3.9 /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob
# executed command: FileCheck -dump-input=fail -match-full-lines /b/1/llvm-clang-x86_64-expensive-checks-debian/build/utils/lit/tests/shtest-glob.py
# .---command stderr------------
# | /b/1/llvm-clang-x86_64-expensive-checks-debian/build/utils/lit/tests/shtest-glob.py:11:10: error: CHECK: expected string not found in input
# | # CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}
# |          ^
# | <stdin>:26:52: note: scanning from here
# | TypeError: string argument expected, got 'GlobItem'
# |                                                    ^
# | <stdin>:30:1: note: possible intended match here
# | FAIL: shtest-glob :: glob-mkdir.txt (2 of 2)
# | ^
# | 
# | Input file: <stdin>
# | Check file: /b/1/llvm-clang-x86_64-expensive-checks-debian/build/utils/lit/tests/shtest-glob.py
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            21:  res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper) 
# |            22:  File "/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 799, in _executeShCmd 
# |            23:  result = inproc_builtin(Command(args, j.redirects), cmd_shenv) 
# |            24:  File "/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 415, in executeBuiltinEcho 
# |            25:  stdout.write(encode(maybeUnescape(args[-1]))) 
# |            26: TypeError: string argument expected, got 'GlobItem' 
# | check:11'0                                                        X error: no match found
# |            27:  
# | check:11'0     ~
# |            28:  
# | check:11'0     ~
# |            29: ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~
# |            30: FAIL: shtest-glob :: glob-mkdir.txt (2 of 2) 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:11'1     ?                                             possible intended match
# |            31: ******************** TEST 'shtest-glob :: glob-mkdir.txt' FAILED ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            32: Exit Code: 1 
# | check:11'0     ~~~~~~~~~~~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 30, 2024

LLVM Buildbot has detected a new failure on builder clang-x86_64-debian-fast running on gribozavr4 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/6159

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lit :: shtest-glob.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
not env -u FILECHECK_OPTS "/usr/bin/python3.9" /b/1/clang-x86_64-debian-fast/llvm.src/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob  | FileCheck -dump-input=fail -match-full-lines /b/1/clang-x86_64-debian-fast/llvm.obj/utils/lit/tests/shtest-glob.py
# executed command: not env -u FILECHECK_OPTS /usr/bin/python3.9 /b/1/clang-x86_64-debian-fast/llvm.src/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob
# executed command: FileCheck -dump-input=fail -match-full-lines /b/1/clang-x86_64-debian-fast/llvm.obj/utils/lit/tests/shtest-glob.py
# .---command stderr------------
# | /b/1/clang-x86_64-debian-fast/llvm.obj/utils/lit/tests/shtest-glob.py:11:10: error: CHECK: expected string not found in input
# | # CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}
# |          ^
# | <stdin>:26:52: note: scanning from here
# | TypeError: string argument expected, got 'GlobItem'
# |                                                    ^
# | <stdin>:30:1: note: possible intended match here
# | FAIL: shtest-glob :: glob-mkdir.txt (2 of 2)
# | ^
# | 
# | Input file: <stdin>
# | Check file: /b/1/clang-x86_64-debian-fast/llvm.obj/utils/lit/tests/shtest-glob.py
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            21:  res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper) 
# |            22:  File "/b/1/clang-x86_64-debian-fast/llvm.src/llvm/utils/lit/lit/TestRunner.py", line 799, in _executeShCmd 
# |            23:  result = inproc_builtin(Command(args, j.redirects), cmd_shenv) 
# |            24:  File "/b/1/clang-x86_64-debian-fast/llvm.src/llvm/utils/lit/lit/TestRunner.py", line 415, in executeBuiltinEcho 
# |            25:  stdout.write(encode(maybeUnescape(args[-1]))) 
# |            26: TypeError: string argument expected, got 'GlobItem' 
# | check:11'0                                                        X error: no match found
# |            27:  
# | check:11'0     ~
# |            28:  
# | check:11'0     ~
# |            29: ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~
# |            30: FAIL: shtest-glob :: glob-mkdir.txt (2 of 2) 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:11'1     ?                                             possible intended match
# |            31: ******************** TEST 'shtest-glob :: glob-mkdir.txt' FAILED ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            32: Exit Code: 1 
# | check:11'0     ~~~~~~~~~~~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 30, 2024

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building llvm at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/7491

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lit :: shtest-glob.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
not env -u FILECHECK_OPTS "/usr/bin/python3.10" /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob  | FileCheck -dump-input=fail -match-full-lines /build/buildbot/premerge-monolithic-linux/build/utils/lit/tests/shtest-glob.py
# executed command: not env -u FILECHECK_OPTS /usr/bin/python3.10 /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical -a -v Inputs/shtest-glob
# note: command had no output on stdout or stderr
# executed command: FileCheck -dump-input=fail -match-full-lines /build/buildbot/premerge-monolithic-linux/build/utils/lit/tests/shtest-glob.py
# .---command stderr------------
# | /build/buildbot/premerge-monolithic-linux/build/utils/lit/tests/shtest-glob.py:11:10: error: CHECK: expected string not found in input
# | # CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}}
# |          ^
# | <stdin>:26:52: note: scanning from here
# | TypeError: string argument expected, got 'GlobItem'
# |                                                    ^
# | <stdin>:30:1: note: possible intended match here
# | FAIL: shtest-glob :: glob-mkdir.txt (2 of 2)
# | ^
# | 
# | Input file: <stdin>
# | Check file: /build/buildbot/premerge-monolithic-linux/build/utils/lit/tests/shtest-glob.py
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            21:  res = _executeShCmd(cmd.rhs, shenv, results, timeoutHelper) 
# |            22:  File "/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 799, in _executeShCmd 
# |            23:  result = inproc_builtin(Command(args, j.redirects), cmd_shenv) 
# |            24:  File "/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 415, in executeBuiltinEcho 
# |            25:  stdout.write(encode(maybeUnescape(args[-1]))) 
# |            26: TypeError: string argument expected, got 'GlobItem' 
# | check:11'0                                                        X error: no match found
# |            27:  
# | check:11'0     ~
# |            28:  
# | check:11'0     ~
# |            29: ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~
# |            30: FAIL: shtest-glob :: glob-mkdir.txt (2 of 2) 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:11'1     ?                                             possible intended match
# |            31: ******************** TEST 'shtest-glob :: glob-mkdir.txt' FAILED ******************** 
# | check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            32: Exit Code: 1 
...

schwitanski pushed a commit to RWTH-HPC/llvm-lit-mirror that referenced this pull request Feb 27, 2025
…lob expansion in lit's internal shell" (#106763)

Reverts llvm/llvm-project#106325
Broke some Buildbots.
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.

5 participants