File tree Expand file tree Collapse file tree 6 files changed +13
-12
lines changed
core/msg_queue_print/tests
net/gnrc_ipv6_fwd_w_sub/tests Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def expect_content(child, counter):
46
46
else :
47
47
child .expect (r'type: 0x0000, content: 0 \((0x)?0+\)' )
48
48
else :
49
- child .expect_exact (f'type: 0x{ counter :04x} , content: { counter } (0x { counter :x} )' )
49
+ child .expect (f'type: 0x{ counter :04x} , content: { counter } \((0x)?0* { counter :x} \ )' )
50
50
51
51
52
52
def testfunc (child ):
Original file line number Diff line number Diff line change @@ -31,10 +31,11 @@ def testfunc(child):
31
31
child .expect (r"00000020 55 44 33 FF FE 22 11 00 54 B8 59 AF 3A B4 5C 85" )
32
32
child .expect (r"00000030 1E CE E2 EB 05 4E A3 85" )
33
33
child .sendline ("pktbuf" )
34
- child .expect (r"packet buffer: first byte: (0x [0-9a-fA-F]+), "
35
- r"last byte: 0x [0-9a-fA-F]+ \(size: (\d+)\)" )
34
+ child .expect (r"packet buffer: first byte: ((0x)? [0-9a-fA-F]+), "
35
+ r"last byte: (0x)? [0-9a-fA-F]+ \(size: (\d+)\)" )
36
36
start_addr = child .match .group (1 )
37
- size = child .match .group (2 )
37
+ size = child .match .group (4 )
38
+ print (start_addr , size )
38
39
child .expect (r" position of last byte used: \d+" )
39
40
child .expect (r"~ unused: {} \(next: (\(nil\)|0(x0+)?), size: +{}\) ~"
40
41
.format (start_addr , size ))
Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ def check_current_slot_and_app_ver(self, child):
66
66
# Ask for data of all slots
67
67
child .expect_exact ('>' )
68
68
child .sendline ("dumpaddrs" )
69
- child .expect (r"slot 0: metadata: 0x [0-9a-fA-F]{1,8} "
69
+ child .expect (r"slot 0: metadata: (0x)? [0-9a-fA-F]{1,8} "
70
70
r"image: 0x[0-9a-fA-F]{8}\r\n" )
71
- child .expect (r"slot 1: metadata: 0x [0-9a-fA-F]{1,8} "
71
+ child .expect (r"slot 1: metadata: (0x)? [0-9a-fA-F]{1,8} "
72
72
r"image: 0x[0-9a-fA-F]{8}\r\n" )
73
73
child .expect_exact ('>' )
74
74
Original file line number Diff line number Diff line change @@ -17,14 +17,14 @@ def testfunc(child):
17
17
if ret == 1 :
18
18
return
19
19
child .sendline ('malloc 100' )
20
- child .expect ('allocated 0x ' )
20
+ child .expect ('allocated (0x)? ' )
21
21
addr = child .readline ()
22
22
addr = addr [:- 2 ]
23
23
child .expect_exact ('> ' )
24
24
child .sendline ('heap' )
25
25
child .expect (r'heap: \d+ \(used \d+, free \d+\) \[bytes\]' )
26
26
child .sendline ('free 0x' + addr )
27
- child .expect ('freeing 0x ' + addr )
27
+ child .expect ('freeing (0x)? ' + addr )
28
28
child .expect_exact ('>' )
29
29
child .sendline ('heap' )
30
30
child .expect (r'heap: \d+ \(used \d+, free \d+\) \[bytes\]' )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def testfunc(child):
22
22
number_of_tests = int (child .match .group (1 ))
23
23
initial_allocations = 0
24
24
for _ in range (number_of_tests ):
25
- child .expect (r"Allocated {} Bytes at 0x [a-z0-9]+, total [a-z0-9]+\r\n"
25
+ child .expect (r"Allocated {} Bytes at (0x)? [a-z0-9]+, total [a-z0-9]+\r\n"
26
26
.format (chunk_size ))
27
27
child .expect (r'Allocations count: (\d+)\r\n' ,
28
28
timeout = ALLOCATION_TIMEOUT )
@@ -31,7 +31,7 @@ def testfunc(child):
31
31
if initial_allocations == 0 :
32
32
initial_allocations = allocations
33
33
assert initial_allocations == allocations
34
- child .expect (r"Free {} Bytes at 0x [a-z0-9]+, total [a-z0-9]+\r\n"
34
+ child .expect (r"Free {} Bytes at (0x)? [a-z0-9]+, total [a-z0-9]+\r\n"
35
35
.format (chunk_size ))
36
36
child .expect (r'Free count: (\d+)\r\n' , timeout = FREE_TIMEOUT )
37
37
freed = int (child .match .group (1 ))
Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ def testfunc(child):
22
22
for test in range (number_of_tests ):
23
23
child .expect_exact ("TEST #{}:" .format (test + 1 ))
24
24
for i in range (max_number_blocks ):
25
- child .expect (r'\({}, @@@@@@@\) Allocated \d+ Bytes at 0x [a-z0 -9]+,'
25
+ child .expect (r'\({}, @@@@@@@\) Allocated \d+ Bytes at (0x)? [a-zA-Z0 -9]+,'
26
26
r' total [0-9]+\r\n' .format (i ))
27
27
for i in range (max_number_blocks ):
28
- child .expect (r'Free \({}\) \d+ Bytes at 0x [a-z0 -9]+,'
28
+ child .expect (r'Free \({}\) \d+ Bytes at (0x)? [a-zA-Z0 -9]+,'
29
29
' total [0-9]+\r \n ' .format (i ))
30
30
31
31
child .expect_exact ("Extend and reduce tests" )
You can’t perform that action at this time.
0 commit comments