@@ -129,7 +129,8 @@ def diff(self, other):
129
129
# - needs to specify:
130
130
# 'command' - perf command name
131
131
# 'args' - special command arguments
132
- # 'ret' - expected command return value (0 by default)
132
+ # 'ret' - Skip test if Perf doesn't exit with this value (0 by default)
133
+ # 'test_ret'- If set to 'true', fail test instead of skipping for 'ret' argument
133
134
# 'arch' - architecture specific test (optional)
134
135
# comma separated list, ! at the beginning
135
136
# negates it.
@@ -155,6 +156,8 @@ def __init__(self, path, options):
155
156
except :
156
157
self .ret = 0
157
158
159
+ self .test_ret = parser .getboolean ('config' , 'test_ret' , fallback = False )
160
+
158
161
try :
159
162
self .arch = parser .get ('config' , 'arch' )
160
163
log .warning ("test limitation '%s'" % self .arch )
@@ -232,7 +235,10 @@ def run_cmd(self, tempdir):
232
235
log .info (" '%s' ret '%s', expected '%s'" % (cmd , str (ret ), str (self .ret )))
233
236
234
237
if not data_equal (str (ret ), str (self .ret )):
235
- raise Unsup (self )
238
+ if self .test_ret :
239
+ raise Fail (self , "Perf exit code failure" )
240
+ else :
241
+ raise Unsup (self )
236
242
237
243
def compare (self , expect , result ):
238
244
match = {}
0 commit comments