-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Copy pathTest_TC_SU_2_7.yaml
255 lines (200 loc) · 13.1 KB
/
Test_TC_SU_2_7.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default
name: 3.5.1. [TC-SU-2.7] Verifying Events on OTA-R(DUT)
PICS:
- MCORE.OTA.Requestor
config:
nodeId: 0x12344321
cluster: "Basic Information"
endpoint: 0
tests:
- label: "Step 1: Perform a software update on the DUT."
verification: |
./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0
Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID
Please use Interactive mode to Verify the subscription of an event
./chip-tool interactive start
Subscribe to StateTransition event using command
otasoftwareupdaterequestor subscribe-event state-transition 5 10 321 0
Verify that the OTA-Subscriber(TH) receives the SateTransition event notification for the state changes like Querying,Downloading,Applying,Idle(Optional).
[1673513950.693526][6070:6073] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Event 0x0000_0000
[1673513950.693585][6070:6073] CHIP:TOO: Event number: 65539
[1673513950.693687][6070:6073] CHIP:TOO: Priority: Info
[1673513950.693733][6070:6073] CHIP:TOO: Timestamp: 92662821
[1673513950.693907][6070:6073] CHIP:TOO: StateTransition: {
[1673513950.693982][6070:6073] CHIP:TOO: PreviousState: 5
[1673513950.694036][6070:6073] CHIP:TOO: NewState: 1
[1673513950.694088][6070:6073] CHIP:TOO: Reason: 1
[1673513950.694142][6070:6073] CHIP:TOO: TargetSoftwareVersion: null
[1673513950.694258][6070:6073] CHIP:TOO: }
disabled: true
- label:
"Step 2: DUT sends a QueryImage command to the TH/OTA-P. TH/OTA-P
sends a QueryImageResponse back to DUT. QueryStatus is set to 'Busy'."
verification: |
./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0
Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID
Please use Interactive mode to Verify the subscription of an event
./chip-tool interactive start
Subscribe to StateTransition event using command
otasoftwareupdaterequestor subscribe-event state-transition 5 10 321 0
Verify that the OTA-Subscriber receives(TH) a StateTransition event notification for the state change to DelayedOnQuery.
[1673514130.748245][6097:6099] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Event 0x0000_0000
[1673514130.748304][6097:6099] CHIP:TOO: Event number: 3
[1673514130.748349][6097:6099] CHIP:TOO: Priority: Info
[1673514130.748394][6097:6099] CHIP:TOO: Timestamp: 97644124
[1673514130.748640][6097:6099] CHIP:TOO: StateTransition: {
[1673514130.748720][6097:6099] CHIP:TOO: PreviousState: 1
[1673514130.748778][6097:6099] CHIP:TOO: NewState: 2
[1673514130.748832][6097:6099] CHIP:TOO: Reason: 1
[1673514130.748887][6097:6099] CHIP:TOO: TargetSoftwareVersion: null
[1673514130.748940][6097:6099] CHIP:TOO: }
[1673514130.749175][6097:6099] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Event 0x0000_0000
[1673514130.749233][6097:6099] CHIP:TOO: Event number: 4
[1673514130.749278][6097:6099] CHIP:TOO: Priority: Info
[1673514130.749324][6097:6099] CHIP:TOO: Timestamp: 97644362
[1673514130.749389][6097:6099] CHIP:TOO: StateTransition: {
[1673514130.749446][6097:6099] CHIP:TOO: PreviousState: 2
[1673514130.749500][6097:6099] CHIP:TOO: NewState: 3
[1673514130.749551][6097:6099] CHIP:TOO: Reason: 4
[1673514130.749603][6097:6099] CHIP:TOO: TargetSoftwareVersion: null
[1673514130.749658][6097:6099] CHIP:TOO: }
disabled: true
- label:
"Step 3: DUT sends a QueryImage command to the TH/OTA-P. TH/OTA-P does
not respond back to DUT."
verification: |
./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0
Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID
Please use Interactive mode to Verify the subscription of an event
./chip-tool interactive start
Subscribe to StateTransition event using command
otasoftwareupdaterequestor subscribe-event state-transition 5 10 321 0
Kill OTA Provider App before issuing query using
Verify that the OTA-Subscriber receives(TH) a StateTransition event notification for the state change to Idle.
[1673515600.737159][6193:6195] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Event 0x0000_0000
[1673515600.737213][6193:6195] CHIP:TOO: Event number: 6
[1673515600.737258][6193:6195] CHIP:TOO: Priority: Info
[1673515600.737303][6193:6195] CHIP:TOO: Timestamp: 99077244
[1673515600.737367][6193:6195] CHIP:TOO: StateTransition: {
[1673515600.737421][6193:6195] CHIP:TOO: PreviousState: 4
[1673515600.737473][6193:6195] CHIP:TOO: NewState: 1
[1673515600.737523][6193:6195] CHIP:TOO: Reason: 3
[1673515600.737575][6193:6195] CHIP:TOO: TargetSoftwareVersion: null
[1673515600.737626][6193:6195] CHIP:TOO: }
disabled: true
- label:
"Step 4: DUT sends a QueryImage command to the TH/OTA-P.
RequestorCanConsent is set to True by DUT. OTA-P/TH responds with a
QueryImageResponse with UserConsentNeeded field set to True."
PICS: MCORE.OTA.RequestorConsent
verification: |
Run the Provider App using
./chip-ota-provider-app --discriminator 22 --secured-device-port 5565 --KVS /tmp/chip_kvs_provider --filepath /tmp/test.bin -c
./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0
Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID
Please use Interactive mode to Verify the subscription of an event
./chip-tool interactive start
Subscribe to StateTransition event using command
otasoftwareupdaterequestor subscribe-event state-transition 5 10 321 0
Verify that the OTA-Subscriber receives a StateTransition event notification for the state change to DelayedOnUserConsent.
disabled: true
- label:
"Step 5: Force an error during the download of the OTA image to the
DUT. Wait for the Idle timeout which should be no less than 5 minutes."
verification: |
./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0
Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID
Please use Interactive mode to Verify the subscription of an event
./chip-tool interactive start
Force an error during the download of the OTA image to the DUT. Wait for the Idle timeout which should be no less than 5 minutes.
otasoftwareupdaterequestor subscribe-event download-error 5 10 321 0 --timeout 65535
Verify that the OTA-Subscribe(TH) receives a DownloadError event notification on BDX Idle timeout which should be no less than 5 minutes
Verify following fields:
- SoftwareVersion - Set to the value of the SoftwareVersion being downloaded.
- BytesDownloaded - Number of bytes that have been downloaded.
- ProgressPercent - Nearest Integer percent value reflecting how far within the transfer the failure occurred. IF the total length of the transfer is unknown, the value can be NULL.
- PlatformCode - Internal product-specific error code or NULL.
[1651520178426] [98732:38086919] CHIP: [TOO] DownloadError: {
[1651520178426] [98732:38086919] CHIP: [TOO] SoftwareVersion: 2
[1651520178426] [98732:38086919] CHIP: [TOO] BytesDownloaded: 2995
[1651520178426] [98732:38086919] CHIP: [TOO] ProgressPercent: 65
[1651520178426] [98732:38086919] CHIP: [TOO] PlatformCode: null
[1651520178426] [98732:38086919] CHIP: [TOO] }
otasoftwareupdaterequestor subscribe-event-by-id 0 30 60 321 0
Verify that the OTA-Subscribe(TH) receives a StateTransition event notification for the state change to Idle.
[1654558704063] [57765:69159905] CHIP: [TOO] StateTransition: {
[1654558704064] [57765:69159905] CHIP: [TOO] PreviousState: 4
[1654558704064] [57765:69159905] CHIP: [TOO] NewState: 1
[1654558704064] [57765:69159905] CHIP: [TOO] Reason: 3
[1654558704064] [57765:69159905] CHIP: [TOO] TargetSoftwareVersion: null
[1654558704064] [57765:69159905] CHIP: [TOO] }
disabled: true
- label:
"Step 6: After the OTA image is transferred, DUT sends
ApplyUpdateRequest to the OTA-P. OTA-P/TH sends the
ApplyUpdateResponse Command to the DUT. Action field is set to
'AwaitNextAction'."
verification: |
./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0
Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID
Please use Interactive mode to Verify the subscription of an event
./chip-tool interactive start
Subscribe to StateTransition event using command
otasoftwareupdaterequestor subscribe-event state-transition 5 10 321 0
Verify that the OTA-Subscriber(TH) receives the SateTransition event notification for the state change to DelayedOnApply
[1651283503471] [29332:35530821] CHIP: [TOO] StateTransition: {
[1651283503471] [29332:35530821] CHIP: [TOO] PreviousState: 1
[1651283503471] [29332:35530821] CHIP: [TOO] NewState: 2
[1651283503471] [29332:35530821] CHIP: [TOO] Reason: 1
[1651283503471] [29332:35530821] CHIP: [TOO] TargetSoftwareVersion: null
[1651283503471] [29332:35530821] CHIP: [TOO] }
[1651283503471] [29332:35530821] CHIP: [TOO] StateTransition: {
[1651283503471] [29332:35530821] CHIP: [TOO] PreviousState: 2
[1651283503471] [29332:35530821] CHIP: [TOO] NewState: 4
[1651283503471] [29332:35530821] CHIP: [TOO] Reason: 1
[1651283503471] [29332:35530821] CHIP: [TOO] TargetSoftwareVersion: 2
[1651283503471] [29332:35530821] CHIP: [TOO] }
[1651283513475] [29332:35531053] CHIP: [TOO] StateTransition: {
[1651283513475] [29332:35531053] CHIP: [TOO] PreviousState: 4
[1651283513475] [29332:35531053] CHIP: [TOO] NewState: 5
[1651283513475] [29332:35531053] CHIP: [TOO] Reason: 1
[1651283513475] [29332:35531053] CHIP: [TOO] TargetSoftwareVersion: 2
[1651283513475] [29332:35531053] CHIP: [TOO] }
[1651283513475] [29332:35531053] CHIP: [TOO] StateTransition: {
[1651283513475] [29332:35531053] CHIP: [TOO] PreviousState: 5
[1651283513475] [29332:35531053] CHIP: [TOO] NewState: 6
[1651283513475] [29332:35531053] CHIP: [TOO] Reason: 4
[1651283513475] [29332:35531053] CHIP: [TOO] TargetSoftwareVersion: null
[1651283513475] [29332:35531053] CHIP: [TOO] }
disabled: true
- label:
"Step 7: DUT successfully finishes applying a software update, and the
new software image version is being executed on the DUT.
OTA-Subscriber sends a read request to read the VersionApplied event
from the DUT."
verification: |
./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0
Where 321 is OTA Requestor node ID and 123 is OTA Provider node ID
Read VersionApplied event once the DUT successfully finishes applying a software update .
./chip-tool otasoftwareupdaterequestor read-event version-applied 321 0
Verify TH receives VersionApplied event with following fields:
- SoftwareVersion - Same as the one available in the SoftwareVersion attribute of the Basic Information Cluster for the newly executing version.
- ProductID - Same as what is available in the ProductID attribute of the Basic Information Cluster.
[1645818271254] [21222:21170014] CHIP: [TOO] VersionApplied: {
[1645818271254] [21222:21170014] CHIP: [TOO] SoftwareVersion: 2
[1645818271254] [21222:21170014] CHIP: [TOO] ProductID: 32769
[1645818271254] [21222:21170014] CHIP: [TOO] }
disabled: true