-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[libcxx] [test] Enable gdb_pretty_printer_test.sh.cpp for clang #102893
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
Conversation
… Windows In practice, this test hasn't been run by any of the Windows configurations so far, because it has been excluded by the "UNSUPPORTED: clang-18, clang-19" line - but it does end up failing if running with e.g. clang-20 on Windows. As the test fails on more fundamental issues on Windows, mark it outright unsupported on this platform; this fixes testing libcxx with a recent nightly version of Clang from git main.
@llvm/pr-subscribers-libcxx Author: Martin Storsjö (mstorsjo) ChangesWith current versions of clang-19 in the CI image, this test does pass. Full diff: https://github.com/llvm/llvm-project/pull/102893.diff 1 Files Affected:
diff --git a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
index 4c2b483914f47e..0645df0ebd498f 100644
--- a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
+++ b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
@@ -12,7 +12,7 @@
// UNSUPPORTED: c++03
// TODO: Investigate these failures which break the CI.
-// UNSUPPORTED: clang-17, clang-18, clang-19
+// UNSUPPORTED: clang-17, clang-18
// The Android libc++ tests are run on a non-Android host, connected to an
// Android device over adb. gdb needs special support to make this work (e.g.
@@ -20,6 +20,9 @@
// support gdb anymore, favoring lldb instead.
// UNSUPPORTED: android
+// This test doesn't work as such on Windows.
+// UNSUPPORTED: windows
+
// RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} -g %{link_flags}
// Ensure locale-independence for unicode tests.
// RUN: env LANG=en_US.UTF-8 %{gdb} -nx -batch -iex "set autoload off" -ex "source %S/../../../utils/gdb/libcxx/printers.py" -ex "python register_libcxx_printer_loader()" -ex "source %S/gdb_pretty_printer_test.py" %t.exe
|
This goes on top of #102891. This test does pass at least in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this also work for older clang versions?
Actually, yes, it seems to run fine in the current CI environments with all clang versions. I guess it can easily fail in users' own local checkouts though, but in that case we should probably add a more finegrained |
With current versions the CI image, this test does pass, with both Clang 17, 18 and 19 - so there doesn't seem to be anything Clang version specific in it.
b6dcc31
to
4e72b6d
Compare
This change seems to run fine in all our CI configs, except for the So we can't merge this as is. I guess that optimized builds of the tests don't work with this test... Anyway, this PR was only a side quest for me, so I'll leave this up to someone else to pick up and finish... |
I ran into another case where this fails on Linux - the situation seems to be that my host GDB doesn't understand DWARF 5, but Clang defaults to that. Adding a So this test seems quite picky with the surrounding environment, and is quite prone to breakage when run in various user environments. |
Closing this one; while it could be worthwhile to do, it's quite messy and I'm not going to pursue it. |
With current versions the CI image, this test does pass, with both Clang 17, 18 and 19 - so there doesn't seem to be anything Clang version specific in it.