[Lldb-commits] [lldb] 910838f - Fix buildbots after https://reviews.llvm.org/D111686

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 21 14:21:54 PDT 2021


Author: Greg Clayton
Date: 2021-10-21T14:21:36-07:00
New Revision: 910838f07da7872d2b7cca5b07d64ea9915b6767

URL: https://github.com/llvm/llvm-project/commit/910838f07da7872d2b7cca5b07d64ea9915b6767
DIFF: https://github.com/llvm/llvm-project/commit/910838f07da7872d2b7cca5b07d64ea9915b6767.diff

LOG: Fix buildbots after https://reviews.llvm.org/D111686

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/lldbtest.py
    lldb/test/API/commands/statistics/basic/TestStats.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 352ce6fabf165..169f43f59c2f9 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -750,6 +750,10 @@ def getBuildArtifact(self, name="a.out"):
         """Return absolute path to an artifact in the test's build directory."""
         return os.path.join(self.getBuildDir(), name)
 
+    def getSourcePath(self, name):
+        """Return absolute path to a file in the test's source directory."""
+        return os.path.join(self.getSourceDir(), name)
+
     @classmethod
     def setUpCommands(cls):
         commands = [

diff  --git a/lldb/test/API/commands/statistics/basic/TestStats.py b/lldb/test/API/commands/statistics/basic/TestStats.py
index 5f9e7b0ca9e2b..838b270f75a99 100644
--- a/lldb/test/API/commands/statistics/basic/TestStats.py
+++ b/lldb/test/API/commands/statistics/basic/TestStats.py
@@ -93,12 +93,18 @@ def test_expressions_frame_var_counts(self):
                     substrs=["undeclared identifier 'doesnt_exist'"])
         # Doesn't successfully execute.
         self.expect("expr int *i = nullptr; *i", error=True)
-        # Interpret an integer as an array with 3 elements is also a failure.
+        # Interpret an integer as an array with 3 elements is a failure for
+        # the "expr" command, but the expression evaluation will succeed and
+        # be counted as a success even though the "expr" options will for the
+        # command to fail. It is more important to track expression evaluation
+        # from all sources instead of just through the command, so this was
+        # changed. If we want to track command success and fails, we can do
+        # so using another metric.
         self.expect("expr -Z 3 -- 1", error=True,
                     substrs=["expression cannot be used with --element-count"])
         # We should have gotten 3 new failures and the previous success.
         stats = self.get_stats()
-        self.verify_success_fail_count(stats, 'expressionEvaluation', 1, 3)
+        self.verify_success_fail_count(stats, 'expressionEvaluation', 2, 2)
 
         self.expect("statistics enable")
         # 'frame var' with enabled statistics will change stats.


        


More information about the lldb-commits mailing list