File tree 2 files changed +8
-2
lines changed
selftests/all/functional/avocado
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
import shutil
5
+ import signal
5
6
6
7
from avocado import test
7
8
from avocado import job
@@ -34,8 +35,13 @@ def action(self):
34
35
Execute 'doublefree'.
35
36
"""
36
37
cmd = os .path .join (self .srcdir , 'doublefree' )
37
- cmd_result = process .run (cmd )
38
+ cmd_result = process .run (cmd , ignore_status = True )
38
39
self .log .info (cmd_result )
40
+ expected_exit_status = - signal .SIGABRT
41
+ output = cmd_result .stdout + cmd_result .stderr
42
+ self .assertEqual (cmd_result .exit_status , expected_exit_status )
43
+ self .assertIn ('double free or corruption' , output )
44
+
39
45
40
46
if __name__ == "__main__" :
41
47
job .main ()
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def test_output_doublefree(self):
22
22
os .chdir (basedir )
23
23
cmd_line = './scripts/avocado run --sysinfo=off doublefree'
24
24
result = process .run (cmd_line , ignore_status = True )
25
- expected_rc = 1
25
+ expected_rc = 0
26
26
output = result .stdout + result .stderr
27
27
self .assertEqual (result .exit_status , expected_rc ,
28
28
"Avocado did not return rc %d:\n %s" %
You can’t perform that action at this time.
0 commit comments