[llvm-branch-commits] libcxx: In gdb test detect execute_mi with feature check instead of version check. (PR #132291)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 20 14:42:34 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Peter Collingbourne (pcc)
<details>
<summary>Changes</summary>
The existing version check can lead to test failures on some distribution
packages of gdb where not all components of the version number are
integers, such as Fedora where gdb.VERSION can be something like
"15.2-4.fc41". Fix it by replacing the version check with a feature check.
---
Full diff: https://github.com/llvm/llvm-project/pull/132291.diff
1 Files Affected:
- (modified) libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py (+1-1)
``````````diff
diff --git a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
index 254a61a8c633e..630b90c9d77a6 100644
--- a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
+++ b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py
@@ -30,7 +30,7 @@
# we exit.
has_run_tests = False
-has_execute_mi = tuple(map(int, gdb.VERSION.split("."))) >= (14, 2)
+has_execute_mi = 'execute_mi' in gdb.__dict__
class CheckResult(gdb.Command):
def __init__(self):
``````````
</details>
https://github.com/llvm/llvm-project/pull/132291
More information about the llvm-branch-commits
mailing list