Commit c2a4d27
selftests: rtnetlink: correct the final return value for the test
The return value "ret" will be reset to 0 from the beginning of each
sub-test in rtnetlink.sh, therefore this test will always pass if the
last sub-test has passed:
$ sudo ./rtnetlink.sh
PASS: policy routing
PASS: route get
PASS: preferred_lft addresses have expired
PASS: promote_secondaries complete
PASS: tc htb hierarchy
PASS: gre tunnel endpoint
PASS: gretap
PASS: ip6gretap
PASS: erspan
PASS: ip6erspan
PASS: bridge setup
PASS: ipv6 addrlabel
PASS: set ifalias a39ee707-e36b-41d3-802f-63179ed4d580 for test-dummy0
PASS: vrf
PASS: vxlan
FAIL: can't add fou port 7777, skipping test
PASS: macsec
PASS: ipsec
3,7c3,7
< sa[0] spi=0x00000009 proto=0x32 salt=0x64636261 crypt=1
< sa[0] key=0x31323334 35363738 39303132 33343536
< sa[1] rx ipaddr=0x00000000 00000000 00000000 c0a87b03
< sa[1] spi=0x00000009 proto=0x32 salt=0x64636261 crypt=1
< sa[1] key=0x31323334 35363738 39303132 33343536
---
> sa[0] spi=0x00000009 proto=0x32 salt=0x61626364 crypt=1
> sa[0] key=0x34333231 38373635 32313039 36353433
> sa[1] rx ipaddr=0x00000000 00000000 00000000 037ba8c0
> sa[1] spi=0x00000009 proto=0x32 salt=0x61626364 crypt=1
> sa[1] key=0x34333231 38373635 32313039 36353433
FAIL: ipsec_offload incorrect driver data
FAIL: ipsec_offload
PASS: bridge fdb get
PASS: neigh get
$ echo $?
0
Make "ret" become a local variable for all sub-tests.
Also, check the sub-test results in kci_test_rtnl() and return the
final result for this test.
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 0b0e299 commit c2a4d27
1 file changed
Lines changed: 43 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
116 | | - | |
| 115 | + | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
| |||
149 | 148 | | |
150 | 149 | | |
151 | 150 | | |
152 | | - | |
| 151 | + | |
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| |||
184 | 183 | | |
185 | 184 | | |
186 | 185 | | |
187 | | - | |
| 186 | + | |
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
| |||
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
210 | | - | |
| 209 | + | |
211 | 210 | | |
212 | 211 | | |
213 | 212 | | |
| |||
290 | 289 | | |
291 | 290 | | |
292 | 291 | | |
293 | | - | |
| 292 | + | |
294 | 293 | | |
295 | 294 | | |
296 | 295 | | |
| |||
330 | 329 | | |
331 | 330 | | |
332 | 331 | | |
333 | | - | |
| 332 | + | |
334 | 333 | | |
335 | 334 | | |
336 | 335 | | |
| |||
385 | 384 | | |
386 | 385 | | |
387 | 386 | | |
388 | | - | |
| 387 | + | |
389 | 388 | | |
390 | 389 | | |
391 | 390 | | |
| |||
425 | 424 | | |
426 | 425 | | |
427 | 426 | | |
428 | | - | |
| 427 | + | |
429 | 428 | | |
430 | 429 | | |
431 | 430 | | |
| |||
511 | 510 | | |
512 | 511 | | |
513 | 512 | | |
514 | | - | |
| 513 | + | |
515 | 514 | | |
516 | 515 | | |
517 | 516 | | |
| |||
548 | 547 | | |
549 | 548 | | |
550 | 549 | | |
551 | | - | |
| 550 | + | |
552 | 551 | | |
553 | 552 | | |
554 | 553 | | |
| |||
573 | 572 | | |
574 | 573 | | |
575 | 574 | | |
576 | | - | |
| 575 | + | |
577 | 576 | | |
578 | 577 | | |
579 | 578 | | |
| |||
631 | 630 | | |
632 | 631 | | |
633 | 632 | | |
634 | | - | |
| 633 | + | |
635 | 634 | | |
636 | 635 | | |
637 | 636 | | |
| |||
731 | 730 | | |
732 | 731 | | |
733 | 732 | | |
734 | | - | |
| 733 | + | |
735 | 734 | | |
736 | 735 | | |
737 | 736 | | |
| |||
841 | 840 | | |
842 | 841 | | |
843 | 842 | | |
844 | | - | |
| 843 | + | |
845 | 844 | | |
846 | 845 | | |
847 | 846 | | |
| |||
891 | 890 | | |
892 | 891 | | |
893 | 892 | | |
894 | | - | |
| 893 | + | |
895 | 894 | | |
896 | 895 | | |
897 | 896 | | |
| |||
941 | 940 | | |
942 | 941 | | |
943 | 942 | | |
944 | | - | |
| 943 | + | |
945 | 944 | | |
946 | 945 | | |
947 | 946 | | |
| |||
1006 | 1005 | | |
1007 | 1006 | | |
1008 | 1007 | | |
1009 | | - | |
| 1008 | + | |
1010 | 1009 | | |
1011 | 1010 | | |
1012 | 1011 | | |
| |||
1077 | 1076 | | |
1078 | 1077 | | |
1079 | 1078 | | |
1080 | | - | |
| 1079 | + | |
1081 | 1080 | | |
1082 | 1081 | | |
1083 | 1082 | | |
| |||
1125 | 1124 | | |
1126 | 1125 | | |
1127 | 1126 | | |
1128 | | - | |
| 1127 | + | |
1129 | 1128 | | |
1130 | 1129 | | |
1131 | 1130 | | |
| |||
1175 | 1174 | | |
1176 | 1175 | | |
1177 | 1176 | | |
| 1177 | + | |
1178 | 1178 | | |
1179 | 1179 | | |
1180 | 1180 | | |
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
1184 | 1184 | | |
| 1185 | + | |
1185 | 1186 | | |
| 1187 | + | |
1186 | 1188 | | |
| 1189 | + | |
1187 | 1190 | | |
| 1191 | + | |
1188 | 1192 | | |
| 1193 | + | |
1189 | 1194 | | |
| 1195 | + | |
1190 | 1196 | | |
| 1197 | + | |
1191 | 1198 | | |
| 1199 | + | |
1192 | 1200 | | |
| 1201 | + | |
1193 | 1202 | | |
| 1203 | + | |
1194 | 1204 | | |
| 1205 | + | |
1195 | 1206 | | |
| 1207 | + | |
1196 | 1208 | | |
| 1209 | + | |
1197 | 1210 | | |
| 1211 | + | |
1198 | 1212 | | |
| 1213 | + | |
1199 | 1214 | | |
| 1215 | + | |
1200 | 1216 | | |
| 1217 | + | |
1201 | 1218 | | |
| 1219 | + | |
1202 | 1220 | | |
| 1221 | + | |
1203 | 1222 | | |
| 1223 | + | |
1204 | 1224 | | |
1205 | 1225 | | |
| 1226 | + | |
1206 | 1227 | | |
1207 | 1228 | | |
1208 | 1229 | | |
| |||
1221 | 1242 | | |
1222 | 1243 | | |
1223 | 1244 | | |
1224 | | - | |
| 1245 | + | |
0 commit comments