Skip to content
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

[lldb][test] Fix formatter tests for clang version 15 #93710

Closed
wants to merge 1 commit into from

Conversation

mbucko
Copy link
Contributor

@mbucko mbucko commented May 29, 2024

Summary:

Test Plan:
ninja check-lldb

Reviewers:
clayborg

Subscribers:

Tasks:

Tags:

Summary:

Test Plan:
ninja check-lldb

Reviewers:
clayborg

Subscribers:

Tasks:

Tags:
@mbucko mbucko requested a review from JDevlieghere as a code owner May 29, 2024 17:39
@llvmbot llvmbot added the lldb label May 29, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented May 29, 2024

@llvm/pr-subscribers-lldb

Author: Miro Bucko (mbucko)

Changes

Summary:

Test Plan:
ninja check-lldb

Reviewers:
clayborg

Subscribers:

Tasks:

Tags:


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

15 Files Affected:

  • (modified) lldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/non-module-type-separation/TestNonModuleTypeSeparation.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py (+2-2)
  • (modified) lldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py (+1-1)
  • (modified) lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py (+1-1)
  • (modified) lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py (+1-1)
  • (modified) lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py (+2-2)
diff --git a/lldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py
index 9e2fc17fa10b4..4168570f38c70 100644
--- a/lldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/deque-basic/TestDequeFromStdModule.py
@@ -20,7 +20,7 @@ def test(self):
         self.runCmd("settings set target.import-std-module true")
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             deque_type = "std::deque<int>"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
index 24b1e00de67c7..cf11668290eee 100644
--- a/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
@@ -21,7 +21,7 @@ def test(self):
         self.runCmd("settings set target.import-std-module true")
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             deque_type = "std::deque<Foo>"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py
index 9b0ca8c49f003..1a146767cc1f8 100644
--- a/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py
@@ -20,7 +20,7 @@ def test(self):
         self.runCmd("settings set target.import-std-module true")
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             list_type = "std::forward_list<Foo>"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py
index 10dd8ee01081c..c7382220883a9 100644
--- a/lldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/forward_list/TestForwardListFromStdModule.py
@@ -20,7 +20,7 @@ def test(self):
         self.runCmd("settings set target.import-std-module true")
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             list_type = "std::forward_list<int>"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py
index 31351a5cbdbaa..f0828b44fb8ea 100644
--- a/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py
@@ -23,7 +23,7 @@ def test(self):
         self.runCmd("settings set target.import-std-module true")
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             list_type = "std::list<Foo>"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py
index f29d9fdb5b2cf..f7138da8f1a67 100644
--- a/lldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/list/TestListFromStdModule.py
@@ -20,7 +20,7 @@ def test(self):
         self.runCmd("settings set target.import-std-module true")
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             list_type = "std::list<int>"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/non-module-type-separation/TestNonModuleTypeSeparation.py b/lldb/test/API/commands/expression/import-std-module/non-module-type-separation/TestNonModuleTypeSeparation.py
index b7e89d3f8a952..f97ebeed0df8b 100644
--- a/lldb/test/API/commands/expression/import-std-module/non-module-type-separation/TestNonModuleTypeSeparation.py
+++ b/lldb/test/API/commands/expression/import-std-module/non-module-type-separation/TestNonModuleTypeSeparation.py
@@ -31,7 +31,7 @@ def test(self):
         ]
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             vector_type = "std::vector<int>"
             dbg_vec_type = "std::vector<DbgInfoClass>"
diff --git a/lldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py
index b08a53855e1db..060ea684c33f4 100644
--- a/lldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/queue/TestQueueFromStdModule.py
@@ -25,7 +25,7 @@ def test(self):
         self.runCmd("settings set target.import-std-module true")
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             queue_type = "std::queue<C>"
         else:
@@ -54,7 +54,7 @@ def test(self):
 
         # Test std::queue functionality with a std::list.
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             queue_type = "std::queue<C, std::list<C> >"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py b/lldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py
index aa8646b4cfb73..b1c3b11ee4a7a 100644
--- a/lldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py
@@ -14,7 +14,7 @@ def test(self):
         )
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             vec_type = "std::vector<int>"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py b/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py
index e21a4cc5a565b..7aa267acd7eb1 100644
--- a/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py
+++ b/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py
@@ -22,7 +22,7 @@ def test(self):
         self.runCmd("settings set target.import-std-module true")
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             ptr_type = "std::unique_ptr<Foo>"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py
index 2952b2e4f0727..f2841fd61de10 100644
--- a/lldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/unique_ptr/TestUniquePtrFromStdModule.py
@@ -22,7 +22,7 @@ def test(self):
         self.runCmd("settings set target.import-std-module true")
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             ptr_type = "std::unique_ptr<int>"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py
index 397ac6a14cca8..ca49f96e323a3 100644
--- a/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py
@@ -23,7 +23,7 @@ def test(self):
         self.runCmd("settings set target.import-std-module true")
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             vector_type = "std::vector<Foo>"
         else:
diff --git a/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py
index a1f33271f39d2..84ecc9438bf04 100644
--- a/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectorsFromStdModule.py
@@ -18,7 +18,7 @@ def test(self):
         )
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             vector_type = "std::vector<int>"
             vector_of_vector_type = "std::vector<std::vector<int> >"
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py
index 23011c951e213..98a91d4814f8d 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py
@@ -58,7 +58,7 @@ def test_shared_ptr_variables(self):
         self.assertNotEqual(valobj.child[0].unsigned, 0)
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             string_type = "std::string"
         else:
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py
index 6a726e0253482..2c331a29223b3 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py
@@ -15,7 +15,7 @@ def make_expected_type(self, pointee_type: str, qualifiers: str = "") -> str:
             qualifiers = " " + qualifiers
 
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             return f"std::unique_ptr<{pointee_type}>{qualifiers}"
         else:
@@ -23,7 +23,7 @@ def make_expected_type(self, pointee_type: str, qualifiers: str = "") -> str:
 
     def make_expected_basic_string_ptr(self) -> str:
         if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
-            [">", "16.0"]
+            [">", "14.0"]
         ):
             return f"std::unique_ptr<std::string>"
         else:

Copy link
Collaborator

@clayborg clayborg left a comment

Choose a reason for hiding this comment

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

My main question is how did you determine the clang-14 being the right version to check against here? Which clang-14 or clang-15 did you use? The public release branches from upstream?

@Michael137
Copy link
Member

Michael137 commented Jun 3, 2024

What platform was this failing on for you? We have a matrix bot for macOS that runs these tests on older Clang versions. https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-matrix/

I probably wrote these checks when clang was on 16.0 to fix the matrix bot (which only had 15.0 back then). But I wonder why the matrix bots are running fine atm, but the tests are failing for you

@mbucko
Copy link
Contributor Author

mbucko commented Jun 4, 2024

No longer needed, failing tests were due to local version override

@mbucko mbucko closed this Jun 4, 2024
@mbucko mbucko deleted the fix_tests branch June 20, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants