@@ -93,12 +93,18 @@ def test_expressions_frame_var_counts(self):
93
93
substrs = ["undeclared identifier 'doesnt_exist'" ])
94
94
# Doesn't successfully execute.
95
95
self .expect ("expr int *i = nullptr; *i" , error = True )
96
- # Interpret an integer as an array with 3 elements is also a failure.
96
+ # Interpret an integer as an array with 3 elements is a failure for
97
+ # the "expr" command, but the expression evaluation will succeed and
98
+ # be counted as a success even though the "expr" options will for the
99
+ # command to fail. It is more important to track expression evaluation
100
+ # from all sources instead of just through the command, so this was
101
+ # changed. If we want to track command success and fails, we can do
102
+ # so using another metric.
97
103
self .expect ("expr -Z 3 -- 1" , error = True ,
98
104
substrs = ["expression cannot be used with --element-count" ])
99
105
# We should have gotten 3 new failures and the previous success.
100
106
stats = self .get_stats ()
101
- self .verify_success_fail_count (stats , 'expressionEvaluation' , 1 , 3 )
107
+ self .verify_success_fail_count (stats , 'expressionEvaluation' , 2 , 2 )
102
108
103
109
self .expect ("statistics enable" )
104
110
# 'frame var' with enabled statistics will change stats.
0 commit comments