You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TESTS/network/emac/README.md
+46-51Lines changed: 46 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ To configure a device to be a CTP echo server, you need to enable the `echo-serv
8
8
9
9
## Other configuration options
10
10
11
-
Targets with connectivity set the target.network-default-interface-type configuration variable appropriately, either to their only interface or their most-commonly-used one. For targets that provide more than one type of connectivity, you may choose the default by overriding the target.network-default-interface-type configuration variable.
11
+
Targets with connectivity set the `target.network-default-interface-type` configuration variable appropriately, either to their only interface or their mostcommonlyused one. For targets that provide more than one type of connectivity, you may choose the default by overriding the `target.network-default-interface-type` configuration variable.
12
12
13
13
For Ethernet, if you want to overrride the default, set the `json` configuration to:
14
14
@@ -21,7 +21,7 @@ For Ethernet, if you want to overrride the default, set the `json` configuration
21
21
}
22
22
```
23
23
24
-
For Wi-Fi set the `json` configuration to:
24
+
For Wi-Fi, set the `json` configuration to:
25
25
26
26
```
27
27
"target_overrides": {
@@ -35,16 +35,13 @@ For Wi-Fi set the `json` configuration to:
35
35
}
36
36
```
37
37
38
-
For Wi-Fi you also need to configure Wi-Fi SSID and security options to the configuration file.
38
+
For Wi-Fi, you also need to configure Wi-Fi SSID and security options to the configuration file.
39
39
40
40
41
41
Test case priorities
42
42
--------------------
43
43
44
-
Please refer to the following table for priorities of test cases. Priorities
45
-
are labeled as MUST and SHOULD. MUST means this is a requirement and
46
-
therefore mandatory to pass the test. SHOULD means it is recommended to
47
-
pass the test if the driver implements the feature in question.
44
+
Please refer to the following table for priorities of test cases. Priorities are labeled as MUST and SHOULD. MUST means this is a requirement and therefore mandatory to pass the test. SHOULD means it is recommended to pass the test if the driver implements the feature in question.
@@ -129,101 +126,100 @@ To verify whether the echo server is receiving CTP Ethernet frames, enable `echo
129
126
130
127
**Description:**
131
128
132
-
Test case initializes and connects the EMAC driver and the test network stack.
129
+
The test case initializes and connects the EMAC driver and the test network stack.
133
130
134
-
**Preconditions:**
131
+
**Precondition:**
135
132
136
-
1. Device is ready to be connected (Ethernet cable is plugged or WIFI base station is available).
133
+
The device is ready to be connected. (The ethernet cable is plugged in, or a Wi-Fi base station is available).
137
134
138
135
**Test steps:**
139
136
140
-
1. Constructs the network interface
141
-
142
-
2. Connects the network interface
137
+
1. Constructs the network interface.
138
+
2. Connects the network interface.
143
139
144
140
**Expected result:**
145
141
146
-
Network interface is connected.
142
+
The network interface is connected.
147
143
148
144
### EMAC broadcast
149
145
150
146
**Description:**
151
147
152
-
Test case tests basic broadcast functionality and resolves CTP echo server MAC address.
148
+
The test case tests basic broadcast functionality and resolves CTP echo server MAC address.
153
149
154
-
**Preconditions:**
150
+
**Precondition:**
155
151
156
-
1. Network interface is connected.
152
+
The network interface is connected.
157
153
158
154
**Test steps:**
159
155
160
-
1. Sends three CTP broadcast messages (100 bytes each)
161
-
2. Waits for three seconds
156
+
1. Sends three CTP broadcast messages (100 bytes each).
157
+
2. Waits for three seconds.
162
158
3. Sends three CTP broadcast messages (60 bytes each).
163
159
4. Listens for the CTP echo server responses.
164
160
5. Stores the addresses of the echo servers if replies are received.
165
161
166
162
**Expected result:**
167
163
168
-
Echo server replies to broadcast messages. For each sent broadcast messagereply is waited for three seconds. In case reply is not received sending is repeated six times before failing the test.
164
+
The echo server replies to broadcast messages. For each sent broadcast message, a reply waits for three seconds. If the reply is not received, the reply is sent six more times before the test fails.
169
165
170
166
### EMAC unicast
171
167
172
168
**Description:**
173
169
174
-
Test case tests basic unicast functionality and that the CTP echo server replies to unicast messages.
170
+
The test case tests basic unicast functionality, and the CTP echo server replies to unicast messages.
175
171
176
-
**Preconditions:**
172
+
**Precondition:**
177
173
178
-
1. Network interface is connected.
174
+
The network interface is connected.
179
175
180
176
**Test steps:**
181
177
182
178
1. Sends three CTP unicast messages (100 bytes each) to the CTP echo server.
183
-
2. Verifies that all are replied.
179
+
2. Verifies all replies.
184
180
185
181
**Expected result:**
186
182
187
-
Echo server replies to unicast messages. For each sent unicast messagereply is waited for three seconds. In case reply is not received sending is repeated five times before failing the test.
183
+
The echo server replies to unicast messages. For each sent unicast message, a reply waits for three seconds. If the reply is not received, it is sent five more times before the test fails.
188
184
189
185
### EMAC unicast frame length
190
186
191
187
**Description:**
192
188
193
-
Test case tests Ethernet frame lengths.
189
+
The test case tests Ethernet frame lengths.
194
190
195
191
**Preconditions:**
196
192
197
-
1. Network interface is connected.
193
+
The network interface is connected.
198
194
199
195
**Test steps:**
200
196
201
-
1. Sends CTP unicast messages with Ethernet message length from 100 bytes to the maximum defined by the MTU of the EMAC with 50 bytes increments.
202
-
2. Verifies that all are replied.
197
+
1. Sends CTP unicast messages with Ethernet message length from 100 bytes to the maximum defined by the MTU of the EMAC with 50-byte increments.
198
+
2. Verifies all replies.
203
199
204
200
**Expected result:**
205
201
206
-
Echo server replies to messages that are sent to it. For each sent unicast messagereply is waited for 500ms. In case reply is not received sending is repeated five times before failing the test.
202
+
The echo server replies to messages that are sent to it. For each sent unicast message, a reply waits for 500ms. If the reply is not received, it is sendt again five more times before the test fails.
207
203
208
204
### EMAC unicast burst
209
205
210
206
**Description:**
211
207
212
-
Test case tests Ethernet echoing at full speed.
208
+
The test case tests Ethernet echoing at full speed.
213
209
214
-
**Preconditions:**
210
+
**Precondition:**
215
211
216
-
1. Network interface is connected.
212
+
The network interface is connected.
217
213
218
214
**Test steps:**
219
215
220
-
1. Sends CTP unicast messages with Ethernet message length from 100 bytes to the maximum defined by the MTU of the EMAC with 50 bytes increments.
216
+
1. Sends CTP unicast messages with Ethernet message length from 100 bytes to the maximum defined by the MTU of the EMAC with 50-byte increments.
221
217
2. Repeats the sending 10 times.
222
-
3. Verifies that all are replied.
218
+
3. Verifies all replies.
223
219
224
220
**Expected result:**
225
221
226
-
Echo server replies to messages that are sent to it. For each sent unicast messagereply is waited for five seconds. In case reply is not received sending is repeated five times before failing the test.
222
+
The echo server replies to messages that are sent to it. For each sent unicast message, a reply waits for five seconds. If the reply is not received, it is sent again five more times before the test fails.
227
223
228
224
### EMAC unicast long
229
225
@@ -233,27 +229,27 @@ Test case tests Ethernet echoing at full speed for an extended time.
233
229
234
230
**Preconditions:**
235
231
236
-
1. Network interface is connected.
232
+
The network interface is connected.
237
233
238
234
**Test steps:**
239
235
240
236
1. Sends CTP unicast messages with random Ethernet message length.
241
-
2. Repeats the sending 50000 times.
242
-
3. Verifies that all are replied.
237
+
2. Repeats the sending 50,000 times.
238
+
3. Verifies all replies.
243
239
244
240
**Expected result:**
245
241
246
-
Echo server replies to messages that are sent to it. For each sent unicast messagereply is waited for 350ms. In case reply is not received sending is repeated five times before failing the test.
242
+
The echo server replies to messages that are sent to it. For each sent unicast message, a reply waits for 350ms. If the reply is not received, it is sent five more times before the test fails.
247
243
248
244
### EMAC multicast filter
249
245
250
246
**Description:**
251
247
252
-
Test case tests multicast filtering. Multicast filtering is an optional feature for the EMAC. The test does not fail if filtering is not implemented.
248
+
The test case tests multicast filtering. Multicast filtering is an optional feature for the EMAC. The test does not fail if filtering is not implemented.
253
249
254
-
**Preconditions:**
250
+
**Precondition:**
255
251
256
-
1. Network interface is connected.
252
+
The network interface is connected.
257
253
258
254
**Test steps:**
259
255
@@ -266,24 +262,24 @@ Test case tests multicast filtering. Multicast filtering is an optional feature
266
262
267
263
**Expected result:**
268
264
269
-
Echo server replies to are received as expected by the test step. Supporting of the filtering will affect what messages are received.
265
+
The echo server replies are received as expected by the test step. Supporting of the filtering will affect what messages are received.
270
266
271
267
### EMAC memory
272
268
273
269
**Description:**
274
270
275
-
Test case tests memory manager out-of-memory situations. The test case configures the test memory manager to reject memory buffer allocations made by the EMAC. Memory buffer allocations are divided into output and input memory allocations:
271
+
The test case tests memory manager out-of-memory situations. The test case configures the test memory manager to reject memory buffer allocations made by the EMAC. Memory buffer allocations are divided into output and input memory allocations:
276
272
277
-
- The output memory allocations are the ones made by the EMAC in the \`link\_out()\` function called by the network stack (test case).
273
+
- The output memory allocations are the ones made by the EMAC in the ``\`link\_out()\`` function called by the network stack (test case).
278
274
- The input memory allocations are other memory allocations made by the EMAC.
279
275
280
276
Depending on the EMAC implementation, it may or may not allocate memory manager buffers in the link output function. If the memory manager buffers are not allocated, disabling the link output memory allocations in the test does not affect the functionality.
281
277
282
-
In each test step, the test case sends CTP unicast messages with Ethernet message length from 100 bytes to the maximum defined by the MTU of the EMAC with 50 bytes increments. Memory buffers sent to the EMAC in the \`link\_out()\` function are forced to be non-aligned in this test case.
278
+
In each test step, the test case sends CTP unicast messages with Ethernet message length from 100 bytes to the maximum defined by the MTU of the EMAC with 50-byte increments. Memory buffers sent to the EMAC in the ``\`link\_out()\`` function are forced to be nonaligned in this test case.
283
279
284
-
**Preconditions:**
280
+
**Precondition:**
285
281
286
-
1. Network interface is connected.
282
+
The network interface is connected.
287
283
288
284
**Test steps:**
289
285
@@ -298,5 +294,4 @@ In each test step, the test case sends CTP unicast messages with Ethernet messag
298
294
299
295
**Expected result:**
300
296
301
-
Echo server replies to messages that are sent to it based on whether the driver can allocate memory for frame or not. For each sent unicast message reply is waited for 500ms. In case reply is not received sending is repeated three times. If test expects that memory should be available and sending fails three times, test is failed.
302
-
297
+
The echo server replies to messages that are sent to it based on whether the driver can allocate memory for the frame or not. For each sent unicast message, a reply waits for 500ms. If the reply is not received, it is sent another three times. If the test expects that memory should be available and sending fails three times, the test fails.
0 commit comments