Author: David Spickett Date: 2026-08-12T13:32:35+01:00 New Revision: c84a6d7df54c411709f870f1069083488fba4c2e
URL: https://github.com/llvm/llvm-project/commit/c84a6d7df54c411709f870f1069083488fba4c2e DIFF: https://github.com/llvm/llvm-project/commit/c84a6d7df54c411709f870f1069083488fba4c2e.diff LOG: [lldb][test] Do not check order of elements in SharedCluster test (#215529) Fixes #215310 ClusterManager uses a SmallPtrSet to track elements. SmallPtrSet is not intentionally ordered, but its "small" representation is when only using it in the ways that SmallPtrSet does. When LLVM_REVERSE_ITERATION is ON, the order is reversed which causes this unit test to fail. >From what I understand, the order is not important. So I've changed the test to ignore the element order. I think the large representation of SmallPtrSet is more likely to be unordered. So the fact that we've been using it in the field since 2022 (33722848fcb5b569ab3a388cae15f31acf9a9c5e) also backs up order not being important. Added: Modified: lldb/unittests/Utility/SharedClusterTest.cpp Removed: ################################################################################ diff --git a/lldb/unittests/Utility/SharedClusterTest.cpp b/lldb/unittests/Utility/SharedClusterTest.cpp index 56dd4da2ed91e..ec95afa8d2eed 100644 --- a/lldb/unittests/Utility/SharedClusterTest.cpp +++ b/lldb/unittests/Utility/SharedClusterTest.cpp @@ -54,5 +54,5 @@ TEST(SharedCluster, ClusterManager) { } ASSERT_THAT(Queue, testing::IsEmpty()); } - ASSERT_THAT(Queue, testing::ElementsAre(1, 2)); + ASSERT_THAT(Queue, testing::UnorderedElementsAre(1, 2)); } _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
