@@ -81,8 +81,8 @@ device, the following commands can be used::
81
81
82
82
# echo 0x104c > functions/pci_epf_test/func1/vendorid
83
83
# echo 0xb500 > functions/pci_epf_test/func1/deviceid
84
- # echo 16 > functions/pci_epf_test/func1/msi_interrupts
85
- # echo 8 > functions/pci_epf_test/func1/msix_interrupts
84
+ # echo 32 > functions/pci_epf_test/func1/msi_interrupts
85
+ # echo 2048 > functions/pci_epf_test/func1/msix_interrupts
86
86
87
87
88
88
Binding pci-epf-test Device to EP Controller
@@ -123,114 +123,83 @@ above::
123
123
Using Endpoint Test function Device
124
124
-----------------------------------
125
125
126
- pcitest.sh added in tools/testing/selftests/pci_endpoint can be used to run all
127
- the default PCI endpoint tests. To compile this tool the following commands
128
- should be used::
126
+ Kselftest added in tools/testing/selftests/pci_endpoint can be used to run all
127
+ the default PCI endpoint tests. To build the Kselftest for PCI endpoint
128
+ subsystem, the following commands should be used::
129
129
130
130
# cd <kernel-dir>
131
131
# make -C tools/testing/selftests/pci_endpoint
132
132
133
133
or if you desire to compile and install in your system::
134
134
135
135
# cd <kernel-dir>
136
- # make -C tools/testing/selftests/pci_endpoint install
136
+ # make -C tools/testing/selftests/pci_endpoint INSTALL_PATH=/usr/bin install
137
137
138
- The tool and script will be located in <rootfs>/usr/bin/
138
+ The test will be located in <rootfs>/usr/bin/
139
139
140
-
141
- pcitest.sh Output
142
- ~~~~~~~~~~~~~~~~~
140
+ Kselftest Output
141
+ ~~~~~~~~~~~~~~~~
143
142
::
144
143
145
- # pcitest.sh
146
- BAR tests
147
-
148
- BAR0: OKAY
149
- BAR1: OKAY
150
- BAR2: OKAY
151
- BAR3: OKAY
152
- BAR4: NOT OKAY
153
- BAR5: NOT OKAY
154
-
155
- Interrupt tests
156
-
157
- SET IRQ TYPE TO LEGACY: OKAY
158
- LEGACY IRQ: NOT OKAY
159
- SET IRQ TYPE TO MSI: OKAY
160
- MSI1: OKAY
161
- MSI2: OKAY
162
- MSI3: OKAY
163
- MSI4: OKAY
164
- MSI5: OKAY
165
- MSI6: OKAY
166
- MSI7: OKAY
167
- MSI8: OKAY
168
- MSI9: OKAY
169
- MSI10: OKAY
170
- MSI11: OKAY
171
- MSI12: OKAY
172
- MSI13: OKAY
173
- MSI14: OKAY
174
- MSI15: OKAY
175
- MSI16: OKAY
176
- MSI17: NOT OKAY
177
- MSI18: NOT OKAY
178
- MSI19: NOT OKAY
179
- MSI20: NOT OKAY
180
- MSI21: NOT OKAY
181
- MSI22: NOT OKAY
182
- MSI23: NOT OKAY
183
- MSI24: NOT OKAY
184
- MSI25: NOT OKAY
185
- MSI26: NOT OKAY
186
- MSI27: NOT OKAY
187
- MSI28: NOT OKAY
188
- MSI29: NOT OKAY
189
- MSI30: NOT OKAY
190
- MSI31: NOT OKAY
191
- MSI32: NOT OKAY
192
- SET IRQ TYPE TO MSI-X: OKAY
193
- MSI-X1: OKAY
194
- MSI-X2: OKAY
195
- MSI-X3: OKAY
196
- MSI-X4: OKAY
197
- MSI-X5: OKAY
198
- MSI-X6: OKAY
199
- MSI-X7: OKAY
200
- MSI-X8: OKAY
201
- MSI-X9: NOT OKAY
202
- MSI-X10: NOT OKAY
203
- MSI-X11: NOT OKAY
204
- MSI-X12: NOT OKAY
205
- MSI-X13: NOT OKAY
206
- MSI-X14: NOT OKAY
207
- MSI-X15: NOT OKAY
208
- MSI-X16: NOT OKAY
209
- [...]
210
- MSI-X2047: NOT OKAY
211
- MSI-X2048: NOT OKAY
212
-
213
- Read Tests
214
-
215
- SET IRQ TYPE TO MSI: OKAY
216
- READ ( 1 bytes): OKAY
217
- READ ( 1024 bytes): OKAY
218
- READ ( 1025 bytes): OKAY
219
- READ (1024000 bytes): OKAY
220
- READ (1024001 bytes): OKAY
221
-
222
- Write Tests
223
-
224
- WRITE ( 1 bytes): OKAY
225
- WRITE ( 1024 bytes): OKAY
226
- WRITE ( 1025 bytes): OKAY
227
- WRITE (1024000 bytes): OKAY
228
- WRITE (1024001 bytes): OKAY
229
-
230
- Copy Tests
231
-
232
- COPY ( 1 bytes): OKAY
233
- COPY ( 1024 bytes): OKAY
234
- COPY ( 1025 bytes): OKAY
235
- COPY (1024000 bytes): OKAY
236
- COPY (1024001 bytes): OKAY
144
+ # pci_endpoint_test
145
+ TAP version 13
146
+ 1..16
147
+ # Starting 16 tests from 9 test cases.
148
+ # RUN pci_ep_bar.BAR0.BAR_TEST ...
149
+ # OK pci_ep_bar.BAR0.BAR_TEST
150
+ ok 1 pci_ep_bar.BAR0.BAR_TEST
151
+ # RUN pci_ep_bar.BAR1.BAR_TEST ...
152
+ # OK pci_ep_bar.BAR1.BAR_TEST
153
+ ok 2 pci_ep_bar.BAR1.BAR_TEST
154
+ # RUN pci_ep_bar.BAR2.BAR_TEST ...
155
+ # OK pci_ep_bar.BAR2.BAR_TEST
156
+ ok 3 pci_ep_bar.BAR2.BAR_TEST
157
+ # RUN pci_ep_bar.BAR3.BAR_TEST ...
158
+ # OK pci_ep_bar.BAR3.BAR_TEST
159
+ ok 4 pci_ep_bar.BAR3.BAR_TEST
160
+ # RUN pci_ep_bar.BAR4.BAR_TEST ...
161
+ # OK pci_ep_bar.BAR4.BAR_TEST
162
+ ok 5 pci_ep_bar.BAR4.BAR_TEST
163
+ # RUN pci_ep_bar.BAR5.BAR_TEST ...
164
+ # OK pci_ep_bar.BAR5.BAR_TEST
165
+ ok 6 pci_ep_bar.BAR5.BAR_TEST
166
+ # RUN pci_ep_basic.CONSECUTIVE_BAR_TEST ...
167
+ # OK pci_ep_basic.CONSECUTIVE_BAR_TEST
168
+ ok 7 pci_ep_basic.CONSECUTIVE_BAR_TEST
169
+ # RUN pci_ep_basic.LEGACY_IRQ_TEST ...
170
+ # OK pci_ep_basic.LEGACY_IRQ_TEST
171
+ ok 8 pci_ep_basic.LEGACY_IRQ_TEST
172
+ # RUN pci_ep_basic.MSI_TEST ...
173
+ # OK pci_ep_basic.MSI_TEST
174
+ ok 9 pci_ep_basic.MSI_TEST
175
+ # RUN pci_ep_basic.MSIX_TEST ...
176
+ # OK pci_ep_basic.MSIX_TEST
177
+ ok 10 pci_ep_basic.MSIX_TEST
178
+ # RUN pci_ep_data_transfer.memcpy.READ_TEST ...
179
+ # OK pci_ep_data_transfer.memcpy.READ_TEST
180
+ ok 11 pci_ep_data_transfer.memcpy.READ_TEST
181
+ # RUN pci_ep_data_transfer.memcpy.WRITE_TEST ...
182
+ # OK pci_ep_data_transfer.memcpy.WRITE_TEST
183
+ ok 12 pci_ep_data_transfer.memcpy.WRITE_TEST
184
+ # RUN pci_ep_data_transfer.memcpy.COPY_TEST ...
185
+ # OK pci_ep_data_transfer.memcpy.COPY_TEST
186
+ ok 13 pci_ep_data_transfer.memcpy.COPY_TEST
187
+ # RUN pci_ep_data_transfer.dma.READ_TEST ...
188
+ # OK pci_ep_data_transfer.dma.READ_TEST
189
+ ok 14 pci_ep_data_transfer.dma.READ_TEST
190
+ # RUN pci_ep_data_transfer.dma.WRITE_TEST ...
191
+ # OK pci_ep_data_transfer.dma.WRITE_TEST
192
+ ok 15 pci_ep_data_transfer.dma.WRITE_TEST
193
+ # RUN pci_ep_data_transfer.dma.COPY_TEST ...
194
+ # OK pci_ep_data_transfer.dma.COPY_TEST
195
+ ok 16 pci_ep_data_transfer.dma.COPY_TEST
196
+ # PASSED: 16 / 16 tests passed.
197
+ # Totals: pass:16 fail:0 xfail:0 xpass:0 skip:0 error:0
198
+
199
+
200
+ Testcase 16 (pci_ep_data_transfer.dma.COPY_TEST) will fail for most of the DMA
201
+ capable endpoint controllers due to the absence of the MEMCPY over DMA. For such
202
+ controllers, it is advisable to skip this testcase using this
203
+ command::
204
+
205
+ # pci_endpoint_test -f pci_ep_bar -f pci_ep_basic -v memcpy -T COPY_TEST -v dma
0 commit comments