blob: dcd7ceb4f059b25dcfc6235aca18f8667bd7a9c7 [file] [log] [blame]
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +07001
2Executing test_rx
3======== testing 8-N-1 (no data)
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +07004test_rx_exec() @ 0: flush the Rx buffer
5test_rx_exec() @ 6: flush the Rx buffer
6test_rx_exec() @ 12: flush the Rx buffer
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +07007======== testing 8-N-1 (fill up flush)
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +07008suart_rx_cb(flags=00): de ad be ef
9suart_rx_cb(flags=00): 00 aa 55 ff
10test_rx_exec() @ 101: flush the Rx buffer
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070011======== testing 8-N-1 (HELLO)
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +070012test_rx_exec() @ 18: flush the Rx buffer
13suart_rx_cb(flags=00): 48
14test_rx_exec() @ 31: flush the Rx buffer
15suart_rx_cb(flags=00): 45
16test_rx_exec() @ 57: flush the Rx buffer
17suart_rx_cb(flags=00): 4c
18test_rx_exec() @ 70: flush the Rx buffer
19suart_rx_cb(flags=00): 4c
20test_rx_exec() @ 96: flush the Rx buffer
21suart_rx_cb(flags=00): 4f
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070022======== testing 8-N-1 (framing errors)
Vadim Yanitskiybf95f822023-11-18 01:46:16 +070023suart_rx_cb(flags=01): 00
24suart_rx_cb(flags=01): aa
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +070025test_rx_exec() @ 41: flush the Rx buffer
26suart_rx_cb(flags=00): ff
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070027======== testing 8-N-2 (HELLO)
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +070028test_rx_exec() @ 20: flush the Rx buffer
29test_rx_exec() @ 22: flush the Rx buffer
30suart_rx_cb(flags=00): 48
31test_rx_exec() @ 35: flush the Rx buffer
32test_rx_exec() @ 37: flush the Rx buffer
33suart_rx_cb(flags=00): 45
34test_rx_exec() @ 65: flush the Rx buffer
35test_rx_exec() @ 67: flush the Rx buffer
36suart_rx_cb(flags=00): 4c
37test_rx_exec() @ 80: flush the Rx buffer
38test_rx_exec() @ 82: flush the Rx buffer
39suart_rx_cb(flags=00): 4c
40test_rx_exec() @ 110: flush the Rx buffer
41test_rx_exec() @ 112: flush the Rx buffer
42suart_rx_cb(flags=00): 4f
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070043======== testing 8-N-2 (framing errors)
Vadim Yanitskiybf95f822023-11-18 01:46:16 +070044suart_rx_cb(flags=01): 00
45suart_rx_cb(flags=01): aa
46suart_rx_cb(flags=01): 55
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +070047test_rx_exec() @ 57: flush the Rx buffer
Vadim Yanitskiybf95f822023-11-18 01:46:16 +070048suart_rx_cb(flags=00): ff
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070049======== testing 8-E-1 (invalid parity)
Vadim Yanitskiybf95f822023-11-18 01:46:16 +070050suart_rx_cb(flags=02): 00
51suart_rx_cb(flags=02): 01
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +070052suart_rx_cb(flags=02): ff
Vadim Yanitskiybf95f822023-11-18 01:46:16 +070053test_rx_exec() @ 49: flush the Rx buffer
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070054======== testing 8-E-1 (valid parity)
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +070055test_rx_exec() @ 63: flush the Rx buffer
56suart_rx_cb(flags=00): 00 ff aa 55
57test_rx_exec() @ 120: flush the Rx buffer
58suart_rx_cb(flags=00): 80 e0 f8 fe
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070059======== testing 8-O-1 (invalid parity)
Vadim Yanitskiybf95f822023-11-18 01:46:16 +070060suart_rx_cb(flags=02): 00
61suart_rx_cb(flags=02): 01
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +070062suart_rx_cb(flags=02): ff
Vadim Yanitskiybf95f822023-11-18 01:46:16 +070063test_rx_exec() @ 42: flush the Rx buffer
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070064======== testing 8-O-1 (valid parity)
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +070065test_rx_exec() @ 63: flush the Rx buffer
66suart_rx_cb(flags=00): 00 ff aa 55
67test_rx_exec() @ 120: flush the Rx buffer
68suart_rx_cb(flags=00): 80 e0 f8 fe
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070069
Vadim Yanitskiyd76cc372023-12-09 04:38:14 +070070Executing test_rx_flush
71calling osmo_soft_uart_flush_rx() while Rx disabled
72enabling the receiver
73calling osmo_soft_uart_flush_rx() while Rx enabled, but no data
Vadim Yanitskiyb3920992023-12-11 22:38:17 +070074testing corner case: manual flushing during a parity error (8-E-1)
75test_rx_exec() @ 47: flush the Rx buffer
76suart_rx_cb(flags=02): aa 55
77suart_rx_cb(flags=02): ff
Vadim Yanitskiyd76cc372023-12-09 04:38:14 +070078
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070079Executing test_tx_rx
80======== testing 8-N-1
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +070081suart_tx_cb(len=4/4): de ad be ef
82suart_rx_cb(flags=00): de ad be ef
83test_tx_rx_exec_one(n_bits_total=40): 0011110111 0101101011 0011111011 0111101111
84suart_tx_cb(len=4/4): 00 aa 55 ff
85suart_rx_cb(flags=00): 00 aa 55 ff
86test_tx_rx_exec_one(n_bits_total=40): 0000000001 0010101011 0101010101 0111111111
87suart_tx_cb(len=4/4): 01 02 04 08
88suart_rx_cb(flags=00): 01 02 04 08
89test_tx_rx_exec_one(n_bits_total=40): 0100000001 0010000001 0001000001 0000100001
90suart_tx_cb(len=4/4): 10 20 40 80
91suart_rx_cb(flags=00): 10 20 40 80
92test_tx_rx_exec_one(n_bits_total=40): 0000010001 0000001001 0000000101 0000000011
93suart_tx_cb(len=0/4):
94test_tx_rx_exec_one(n_bits_total=40): 1111111111 1111111111 1111111111 1111111111
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +070095======== testing 8-N-2
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +070096suart_tx_cb(len=4/4): de ad be ef
97suart_rx_cb(flags=00): de ad be ef
98test_tx_rx_exec_one(n_bits_total=44): 00111101111 01011010111 00111110111 01111011111
99suart_tx_cb(len=4/4): 00 aa 55 ff
100suart_rx_cb(flags=00): 00 aa 55 ff
101test_tx_rx_exec_one(n_bits_total=44): 00000000011 00101010111 01010101011 01111111111
102suart_tx_cb(len=4/4): 01 02 04 08
103suart_rx_cb(flags=00): 01 02 04 08
104test_tx_rx_exec_one(n_bits_total=44): 01000000011 00100000011 00010000011 00001000011
105suart_tx_cb(len=4/4): 10 20 40 80
106suart_rx_cb(flags=00): 10 20 40 80
107test_tx_rx_exec_one(n_bits_total=44): 00000100011 00000010011 00000001011 00000000111
108suart_tx_cb(len=0/4):
109test_tx_rx_exec_one(n_bits_total=44): 11111111111 11111111111 11111111111 11111111111
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700110======== testing 8-E-1
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +0700111suart_tx_cb(len=4/4): de ad be ef
112suart_rx_cb(flags=00): de ad be ef
113test_tx_rx_exec_one(n_bits_total=44): 00111101101 01011010111 00111110101 01111011111
114suart_tx_cb(len=4/4): 00 aa 55 ff
115suart_rx_cb(flags=00): 00 aa 55 ff
116test_tx_rx_exec_one(n_bits_total=44): 00000000001 00101010101 01010101001 01111111101
117suart_tx_cb(len=4/4): 01 02 04 08
118suart_rx_cb(flags=00): 01 02 04 08
119test_tx_rx_exec_one(n_bits_total=44): 01000000011 00100000011 00010000011 00001000011
120suart_tx_cb(len=4/4): 10 20 40 80
121suart_rx_cb(flags=00): 10 20 40 80
122test_tx_rx_exec_one(n_bits_total=44): 00000100011 00000010011 00000001011 00000000111
123suart_tx_cb(len=0/4):
124test_tx_rx_exec_one(n_bits_total=44): 11111111111 11111111111 11111111111 11111111111
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700125======== testing 8-O-1
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +0700126suart_tx_cb(len=4/4): de ad be ef
127suart_rx_cb(flags=00): de ad be ef
128test_tx_rx_exec_one(n_bits_total=44): 00111101111 01011010101 00111110111 01111011101
129suart_tx_cb(len=4/4): 00 aa 55 ff
130suart_rx_cb(flags=00): 00 aa 55 ff
131test_tx_rx_exec_one(n_bits_total=44): 00000000011 00101010111 01010101011 01111111111
132suart_tx_cb(len=4/4): 01 02 04 08
133suart_rx_cb(flags=00): 01 02 04 08
134test_tx_rx_exec_one(n_bits_total=44): 01000000001 00100000001 00010000001 00001000001
135suart_tx_cb(len=4/4): 10 20 40 80
136suart_rx_cb(flags=00): 10 20 40 80
137test_tx_rx_exec_one(n_bits_total=44): 00000100001 00000010001 00000001001 00000000101
138suart_tx_cb(len=0/4):
139test_tx_rx_exec_one(n_bits_total=44): 11111111111 11111111111 11111111111 11111111111
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700140======== testing 8-M-1
Vadim Yanitskiy0d78a002023-11-19 16:15:38 +0700141suart_tx_cb(len=4/4): de ad be ef
142suart_rx_cb(flags=00): de ad be ef
143test_tx_rx_exec_one(n_bits_total=44): 00111101111 01011010111 00111110111 01111011111
144suart_tx_cb(len=4/4): 00 aa 55 ff
145suart_rx_cb(flags=00): 00 aa 55 ff
146test_tx_rx_exec_one(n_bits_total=44): 00000000011 00101010111 01010101011 01111111111
147suart_tx_cb(len=4/4): 01 02 04 08
148suart_rx_cb(flags=00): 01 02 04 08
149test_tx_rx_exec_one(n_bits_total=44): 01000000011 00100000011 00010000011 00001000011
150suart_tx_cb(len=4/4): 10 20 40 80
151suart_rx_cb(flags=00): 10 20 40 80
152test_tx_rx_exec_one(n_bits_total=44): 00000100011 00000010011 00000001011 00000000111
153suart_tx_cb(len=0/4):
154test_tx_rx_exec_one(n_bits_total=44): 11111111111 11111111111 11111111111 11111111111
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700155======== testing 8-S-1
Vadim Yanitskiy0d78a002023-11-19 16:15:38 +0700156suart_tx_cb(len=4/4): de ad be ef
157suart_rx_cb(flags=00): de ad be ef
158test_tx_rx_exec_one(n_bits_total=44): 00111101101 01011010101 00111110101 01111011101
159suart_tx_cb(len=4/4): 00 aa 55 ff
160suart_rx_cb(flags=00): 00 aa 55 ff
161test_tx_rx_exec_one(n_bits_total=44): 00000000001 00101010101 01010101001 01111111101
162suart_tx_cb(len=4/4): 01 02 04 08
163suart_rx_cb(flags=00): 01 02 04 08
164test_tx_rx_exec_one(n_bits_total=44): 01000000001 00100000001 00010000001 00001000001
165suart_tx_cb(len=4/4): 10 20 40 80
166suart_rx_cb(flags=00): 10 20 40 80
167test_tx_rx_exec_one(n_bits_total=44): 00000100001 00000010001 00000001001 00000000101
168suart_tx_cb(len=0/4):
169test_tx_rx_exec_one(n_bits_total=44): 11111111111 11111111111 11111111111 11111111111
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700170======== testing 6-N-1
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +0700171suart_tx_cb(len=4/4): de ad be ef
Vadim Yanitskiy2d2ce492023-11-19 15:37:10 +0700172suart_rx_cb(flags=00): 1e 2d 3e 2f
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +0700173test_tx_rx_exec_one(n_bits_total=32): 00111101 01011011 00111111 01111011
174suart_tx_cb(len=4/4): 00 aa 55 ff
Vadim Yanitskiy2d2ce492023-11-19 15:37:10 +0700175suart_rx_cb(flags=00): 00 2a 15 3f
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +0700176test_tx_rx_exec_one(n_bits_total=32): 00000001 00101011 01010101 01111111
177suart_tx_cb(len=4/4): 01 02 04 08
Vadim Yanitskiy2d2ce492023-11-19 15:37:10 +0700178suart_rx_cb(flags=00): 01 02 04 08
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +0700179test_tx_rx_exec_one(n_bits_total=32): 01000001 00100001 00010001 00001001
180suart_tx_cb(len=4/4): 10 20 40 80
Vadim Yanitskiy2d2ce492023-11-19 15:37:10 +0700181suart_rx_cb(flags=00): 10 20 00 00
Vadim Yanitskiy9ef304d2023-11-14 20:46:01 +0700182test_tx_rx_exec_one(n_bits_total=32): 00000101 00000011 00000001 00000001
183suart_tx_cb(len=0/4):
184test_tx_rx_exec_one(n_bits_total=32): 11111111 11111111 11111111 11111111
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700185
186Executing test_tx_rx_pull_n
187======== pulling 32 bits (1 at a time)
Vadim Yanitskiyffdd9972023-11-21 02:25:32 +0700188suart_tx_cb(len=1/1): 55
189suart_tx_cb(len=1/1): 55
190suart_tx_cb(len=1/1): 55
191suart_tx_cb(len=1/1): 55
19201010101010101010101010101010101
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700193======== feeding 32 bits into the receiver
Vadim Yanitskiyffdd9972023-11-21 02:25:32 +0700194suart_rx_cb(flags=00): 55 55 55
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700195
196Executing test_tx_rx_pull_n
197======== pulling 32 bits (2 at a time)
Vadim Yanitskiyffdd9972023-11-21 02:25:32 +0700198suart_tx_cb(len=1/1): 55
199suart_tx_cb(len=1/1): 55
200suart_tx_cb(len=1/1): 55
201suart_tx_cb(len=1/1): 55
20201010101010101010101010101010101
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700203======== feeding 32 bits into the receiver
Vadim Yanitskiyffdd9972023-11-21 02:25:32 +0700204suart_rx_cb(flags=00): 55 55 55
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700205
206Executing test_tx_rx_pull_n
207======== pulling 32 bits (4 at a time)
Vadim Yanitskiyffdd9972023-11-21 02:25:32 +0700208suart_tx_cb(len=1/1): 55
209suart_tx_cb(len=1/1): 55
210suart_tx_cb(len=1/1): 55
21101010101011101010101011101010101
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700212======== feeding 32 bits into the receiver
Vadim Yanitskiyffdd9972023-11-21 02:25:32 +0700213suart_rx_cb(flags=00): 55 55
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700214
215Executing test_tx_rx_pull_n
216======== pulling 32 bits (8 at a time)
Vadim Yanitskiyffdd9972023-11-21 02:25:32 +0700217suart_tx_cb(len=1/1): 55
218suart_tx_cb(len=1/1): 55
21901010101011111110101010101111111
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700220======== feeding 32 bits into the receiver
Vadim Yanitskiyffdd9972023-11-21 02:25:32 +0700221suart_rx_cb(flags=00): 55 55
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700222
Vadim Yanitskiyd8070f52023-12-11 22:51:29 +0700223Executing test_tx_pull
224pulling 25 bits (first time) out of the transmitter
225suart_tx_cb(len=2/2): 42 42
226pulling 25 bits (second time) out of the transmitter
227suart_tx_cb(len=2/2): 42 42
228
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700229Executing test_modem_status
230initial status=0x00000000
Vadim Yanitskiy6587dd02023-11-30 03:04:32 +0700231de-asserting DCD, which was not asserted
232asserting both RI and DCD, expecting the callback to be called twice
233suart_status_change_cb(status=0x00000008)
234suart_status_change_cb(status=0x0000000a)
235de-asserting RI, expecting the callback to be called
236suart_status_change_cb(status=0x00000002)
237resetting to 0x00, expecting the callback to be called
238suart_status_change_cb(status=0x00000000)
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700239
240Executing test_flow_control_dtr_dsr
241initial status=0x00000000
Vadim Yanitskiy6587dd02023-11-30 03:04:32 +0700242expecting osmo_soft_uart_tx_ubits() to yield nothing
243expecting osmo_soft_uart_rx_ubits() to yield nothing
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700244======== asserting both DTR and DSR
Vadim Yanitskiy6587dd02023-11-30 03:04:32 +0700245suart_status_change_cb(status=0x00000001)
246suart_status_change_cb(status=0x00000005)
247expecting osmo_soft_uart_tx_ubits() to yield 40 bits (requesting 40 bits)
248suart_tx_cb(len=4/4): 42 42 42 42
2490010000101001000010100100001010010000101
250expecting osmo_soft_uart_rx_ubits() to consume 40 bits and yield 4 chars
251suart_rx_cb(flags=00): 42 42 42 42
252expecting osmo_soft_uart_tx_ubits() to yield 2 bits (requesting 2 bits)
253suart_tx_cb(len=1/1): 42
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700254======== de-asserting DSR
Vadim Yanitskiy6587dd02023-11-30 03:04:32 +0700255suart_status_change_cb(status=0x00000001)
256expecting osmo_soft_uart_tx_ubits() to yield 8 bits (requesting 40 bits)
257expecting osmo_soft_uart_rx_ubits() to consume 40 bits and yield a pending char
258suart_rx_cb(flags=00): 42
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700259
260Executing test_flow_control_rts_cts
261initial status=0x00000000
Vadim Yanitskiy6587dd02023-11-30 03:04:32 +0700262expecting osmo_soft_uart_tx_ubits() to yield nothing
263expecting osmo_soft_uart_rx_ubits() to yield nothing
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700264======== asserting both CTS and RTS/RTR
Vadim Yanitskiy6587dd02023-11-30 03:04:32 +0700265suart_status_change_cb(status=0x00000020)
266suart_status_change_cb(status=0x00000030)
267expecting osmo_soft_uart_tx_ubits() to yield 40 bits (requesting 40 bits)
268suart_tx_cb(len=4/4): 42 42 42 42
2690010000101001000010100100001010010000101
270expecting osmo_soft_uart_rx_ubits() to consume 40 bits and yield 4 chars
271suart_rx_cb(flags=00): 42 42 42 42
272expecting osmo_soft_uart_tx_ubits() to yield 2 bits (requesting 2 bits)
273suart_tx_cb(len=1/1): 42
Vadim Yanitskiyd0b575c2023-12-09 04:26:51 +0700274======== de-asserting CTS
Vadim Yanitskiy6587dd02023-11-30 03:04:32 +0700275suart_status_change_cb(status=0x00000010)
276expecting osmo_soft_uart_tx_ubits() to yield 8 bits (requesting 40 bits)
277expecting osmo_soft_uart_rx_ubits() to consume 40 bits and yield a pending char
278suart_rx_cb(flags=00): 42