Skip to content

Conversation

bd1976bris
Copy link
Collaborator

Make the test regexes more permissive to fix buildbot failures caused by the merge of PR #159129. This is the same fix as applied in: #148908. We retain cross-platform-test coverage to check that the path content is correct.

In a subsequent commit I will make the tests more robust, perhaps along the lines of: PR #159151.

This is a short term fix to get the build bot green without having to revert a trail of commits.

…bots

Not all builds name the compiler executable clang. For example, the
Fuchsia buildbots use llvm as their single toolchain executable name, as
they combine everything together in a busybox-style binary. This is
currently causing the new ps5-dtlto.c to fail on such build bots.

Update the Clang driver tests to simply check that a non-empty path is
provided for the --thinlto-remote-compiler argument, rather than
hardcoding the executable name. The cross-project tests will verify that
the path is valid later.

This is the same fix as applied earlier in llvm#148908. However, that fix
left a case in the dtlto.c test that was subsequently reflected into the
new ps5-dtlto.c test where it caused a failure. Why it doesn't cause a
failure in the existing dtlto.c test is a mystery to me - perhaps the
substring "clang" is now included in the path to the busybox-style binary,
or perhaps that test was disabled for affected buildbots and then not
re-enabled? It's clearly a latent issue though so I have also fixed the
dtlto.c test in this patch.

Should fix the buildbot failures caused by: llvm#158041.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Sep 16, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 16, 2025

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: bd1976bris (bd1976bris)

Changes

Make the test regexes more permissive to fix buildbot failures caused by the merge of PR #159129. This is the same fix as applied in: #148908. We retain cross-platform-test coverage to check that the path content is correct.

In a subsequent commit I will make the tests more robust, perhaps along the lines of: PR #159151.

This is a short term fix to get the build bot green without having to revert a trail of commits.


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

2 Files Affected:

  • (modified) clang/test/Driver/DTLTO/dtlto.c (+1-1)
  • (modified) clang/test/Driver/DTLTO/ps5-dtlto.c (+1-1)
diff --git a/clang/test/Driver/DTLTO/dtlto.c b/clang/test/Driver/DTLTO/dtlto.c
index 96795d9a4e6a4..bb1bd4ace0487 100644
--- a/clang/test/Driver/DTLTO/dtlto.c
+++ b/clang/test/Driver/DTLTO/dtlto.c
@@ -35,7 +35,7 @@
 
 // DEFAULT: ld.lld
 // DEFAULT-SAME: "--thinlto-distributor=d.exe"
-// DEFAULT-SAME: "--thinlto-remote-compiler={{.*}}clang{{[^\"]*}}"
+// DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]+}}"
 
 /// Check that nothing is forwarded when the compiler is not in LTO mode, and that
 /// appropriate unused option warnings are issued.
diff --git a/clang/test/Driver/DTLTO/ps5-dtlto.c b/clang/test/Driver/DTLTO/ps5-dtlto.c
index 9b70c88257a85..a37073b85aa32 100644
--- a/clang/test/Driver/DTLTO/ps5-dtlto.c
+++ b/clang/test/Driver/DTLTO/ps5-dtlto.c
@@ -35,7 +35,7 @@
 
 // DEFAULT: prospero-lld
 // DEFAULT-SAME: "--thinlto-distributor=d.exe"
-// DEFAULT-SAME: "--thinlto-remote-compiler={{.*}}clang{{[^\"]*}}"
+// DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]+}}"
 
 /// Check that the arguments are forwarded unconditionally even when the
 /// compiler is not in LTO mode.

@bd1976bris
Copy link
Collaborator Author

bd1976bris commented Sep 16, 2025

Hi @petrhosek. This is the same fix as you approved in #159050. It's not ideal but there's not loss of coverage given the DTLTO testing in the cross-poject-test area. I would like to make this patch to get the bot green, rather than reverting the previous chain of commits, and then subsequently replace with something hopefully along the lines of PR #159151.

@bd1976bris bd1976bris requested a review from ilovepi September 16, 2025 20:01
Copy link
Contributor

@jplehr jplehr left a comment

Choose a reason for hiding this comment

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

lgtm

@bd1976bris bd1976bris merged commit c24b8e9 into llvm:main Sep 16, 2025
24 of 26 checks passed
@jplehr
Copy link
Contributor

jplehr commented Sep 16, 2025

This one did not fix the buildbot: https://lab.llvm.org/buildbot/#/builders/10/builds/13615
Is your other PR supposed to address that issue?

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 16, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-quick running on linaro-clang-aarch64-quick while building clang at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'lit :: timeout-hang.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 18
not env -u FILECHECK_OPTS "/usr/bin/python3.10" /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/utils/lit/lit.py -j1 --order=lexical Inputs/timeout-hang/run-nonexistent.txt  --timeout=15 --param external=0 | "/usr/bin/python3.10" /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/utils/lit/tests/timeout-hang.py 5
# executed command: not env -u FILECHECK_OPTS /usr/bin/python3.10 /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/utils/lit/lit.py -j1 --order=lexical Inputs/timeout-hang/run-nonexistent.txt --timeout=15 --param external=0
# .---command stderr------------
# | lit.py: /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 15 seconds was requested on the command line. Forcing timeout to be 15 seconds.
# `-----------------------------
# executed command: /usr/bin/python3.10 /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/utils/lit/tests/timeout-hang.py 5
# .---command stdout------------
# | Testing took 8.15s, which is beyond the grace period of 5.0s
# `-----------------------------
# error: command failed with exit status: 1

--

********************


@petrhosek
Copy link
Member

petrhosek commented Sep 16, 2025

This one did not fix the buildbot: https://lab.llvm.org/buildbot/#/builders/10/builds/13615 Is your other PR supposed to address that issue?

We see the same issue on our Windows builders.

@Kewen12
Copy link
Contributor

Kewen12 commented Sep 16, 2025

Hi, can we revert your original PR if possible while you are investigating the issue? It blocks bots.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 16, 2025

LLVM Buildbot has detected a new failure on builder lldb-remote-linux-win running on as-builder-10 while building clang at step 17 "test-check-lldb-api".

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

Here is the relevant piece of the build log for the reference
Step 17 (test-check-lldb-api) failure: Test just built components: check-lldb-api completed (failure)
...
UNSUPPORTED: lldb-api :: functionalities/postmortem/FreeBSDKernel/TestFreeBSDKernelVMCore.py (568 of 1305)
PASS: lldb-api :: functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py (569 of 1305)
PASS: lldb-api :: functionalities/postmortem/elf-core/TestLinuxCore.py (570 of 1305)
UNSUPPORTED: lldb-api :: functionalities/postmortem/elf-core/expr/TestExpr.py (571 of 1305)
PASS: lldb-api :: functionalities/load_unload/TestLoadUnload.py (572 of 1305)
PASS: lldb-api :: functionalities/pointer_num_children/TestPointerNumChildren.py (573 of 1305)
PASS: lldb-api :: functionalities/postmortem/elf-core/gcore/TestGCore.py (574 of 1305)
PASS: lldb-api :: functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py (575 of 1305)
PASS: lldb-api :: functionalities/postmortem/minidump/TestMiniDump.py (576 of 1305)
UNRESOLVED: lldb-api :: functionalities/postmortem/netbsd-core/TestNetBSDCore.py (577 of 1305)
******************** TEST 'lldb-api :: functionalities/postmortem/netbsd-core/TestNetBSDCore.py' FAILED ********************
Script:
--
C:/Python312/python.exe C:/buildbot/as-builder-10/lldb-x-aarch64/llvm-project/lldb\test\API\dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=C:/buildbot/as-builder-10/lldb-x-aarch64/build/./lib --env LLVM_INCLUDE_DIR=C:/buildbot/as-builder-10/lldb-x-aarch64/build/include --env LLVM_TOOLS_DIR=C:/buildbot/as-builder-10/lldb-x-aarch64/build/./bin --arch aarch64 --build-dir C:/buildbot/as-builder-10/lldb-x-aarch64/build/lldb-test-build.noindex --lldb-module-cache-dir C:/buildbot/as-builder-10/lldb-x-aarch64/build/lldb-test-build.noindex/module-cache-lldb\lldb-api --clang-module-cache-dir C:/buildbot/as-builder-10/lldb-x-aarch64/build/lldb-test-build.noindex/module-cache-clang\lldb-api --executable C:/buildbot/as-builder-10/lldb-x-aarch64/build/./bin/lldb.exe --compiler C:/buildbot/as-builder-10/lldb-x-aarch64/build/./bin/clang.exe --dsymutil C:/buildbot/as-builder-10/lldb-x-aarch64/build/./bin/dsymutil.exe --make C:/ninja/make.exe --llvm-tools-dir C:/buildbot/as-builder-10/lldb-x-aarch64/build/./bin --lldb-obj-root C:/buildbot/as-builder-10/lldb-x-aarch64/build/tools/lldb --lldb-libs-dir C:/buildbot/as-builder-10/lldb-x-aarch64/build/./lib --cmake-build-type Release --platform-url connect://jetson-agx-0086.lab.llvm.org:1234 --platform-working-dir /home/ubuntu/lldb-tests --sysroot c:/buildbot/fs/jetson-agx-ubuntu --env ARCH_CFLAGS=-mcpu=cortex-a78 --platform-name remote-linux --skip-category=lldb-server C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\API\functionalities\postmortem\netbsd-core -p TestNetBSDCore.py
--
Exit Code: 3221226356

Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision c24b8e92fcc3c9a638b274cbd12d50d40f14c17e)
  clang revision c24b8e92fcc3c9a638b274cbd12d50d40f14c17e
  llvm revision c24b8e92fcc3c9a638b274cbd12d50d40f14c17e
Setting up remote platform 'remote-linux'

Connecting to remote platform 'remote-linux' at 'connect://jetson-agx-0086.lab.llvm.org:1234'...

Connected.

Setting remote platform working directory to '/home/ubuntu/lldb-tests'...

Skipping the following test categories: ['lldb-server', 'msvcstl', 'dsym', 'gmodules', 'debugserver', 'objc', 'lldb-dap']


--
Command Output (stderr):
--
Windows fatal exception: code 0xc0000374

Current thread 0x000004e4 (most recent call first):
  File "C:\buildbot\as-builder-10\lldb-x-aarch64\build\Lib\site-packages\lldb\__init__.py", line 5596 in DeleteTarget
  File "C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\API\functionalities\postmortem\netbsd-core\TestNetBSDCore.py", line 133 in do_test
  File "C:\buildbot\as-builder-10\lldb-x-aarch64\llvm-project\lldb\test\API\functionalities\postmortem\netbsd-core\TestNetBSDCore.py", line 152 in test_aarch64_single_threaded
  File "C:\Python312\Lib\unittest\case.py", line 589 in _callTestMethod
  File "C:\Python312\Lib\unittest\case.py", line 634 in run
  File "C:\Python312\Lib\unittest\case.py", line 690 in __call__
  File "C:\Python312\Lib\unittest\suite.py", line 122 in run
  File "C:\Python312\Lib\unittest\suite.py", line 84 in __call__
  File "C:\Python312\Lib\unittest\suite.py", line 122 in run
  File "C:\Python312\Lib\unittest\suite.py", line 84 in __call__

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 17, 2025

LLVM Buildbot has detected a new failure on builder ppc64le-lld-multistage-test running on ppc64le-lld-multistage-test while building clang at step 7 "test-build-stage1-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-stage1-unified-tree-check-all) failure: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
543.795 [1/2/1] Preparing lit tests
command timed out: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1744.949758
Step 9 (clean-build/stage2-dir) failure: Delete failed. (failure) (timed out)
Step 10 (clean-install/stage2-dir) failure: Delete failed. (failure) (timed out)
Step 11 (cmake-configure-stage2) failure: cmake (failure) (timed out)
command timed out: 1200 seconds without output running [b'cmake', b'-G', b'Ninja', b'-DLLVM_ENABLE_ASSERTIONS=ON', b'-DLLVM_LIT_ARGS=-svj 256', b'-DCMAKE_C_COMPILER_LAUNCHER=ccache', b'-DCMAKE_CXX_COMPILER_LAUNCHER=ccache', b'-DCMAKE_BUILD_TYPE=Release', b'-DLLVM_BUILD_TESTS=ON', b'-DLLVM_OPTIMIZED_TABLEGEN=ON', b'-DCLANG_BUILD_EXAMPLES=OFF', b'-DLLVM_ENABLE_WERROR=ON', b'-DLLVM_ENABLE_LLD=ON', b'-DCMAKE_INSTALL_PREFIX=../../install/stage2', b'-DLLVM_ENABLE_PROJECTS=lld;llvm;clang', b'-DCMAKE_CXX_COMPILER=/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/install/stage1/bin/clang++', b'-DCMAKE_C_COMPILER=/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/install/stage1/bin/clang', b'../../llvm-project/llvm'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1200.540079

@bd1976bris
Copy link
Collaborator Author

@jplehr , @petrhosek and @Kewen12 really sorry that I didn't check back on this last night. I'm unsure why this didn't fix the bots as it's basically #148908 which has been running for some weeks on the bots with no reports of problems. Anyway, I'll get this resolved (somehow!) first thing today.

@jplehr
Copy link
Contributor

jplehr commented Sep 17, 2025

@jplehr , @petrhosek and @Kewen12 really sorry that I didn't check back on this last night. I'm unsure why this didn't fix the bots as it's basically #148908 which has been running for some weeks on the bots with no reports of problems. Anyway, I'll get this resolved (somehow!) first thing today.

If there is something that I can do to assist, please let me know.

@jplehr
Copy link
Contributor

jplehr commented Sep 17, 2025

On our bot, I cleaned both source and build tree and gave that a go.
It seems that this helped in our case. Maybe something simply left some stale data around?

@bd1976bris
Copy link
Collaborator Author

@jplehr thanks for the info. I rebased and pushed: #159151 earlier. I'm hoping that that change will put an end to this. Did you pick that change up in on e of your runs?

@jplehr
Copy link
Contributor

jplehr commented Sep 17, 2025

@bd1976bris it came into this build https://lab.llvm.org/buildbot/#/builders/10/builds/13650 which did not break. :)
Thank you for your time! I appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants