@@ -36,11 +36,12 @@ def test_function_001(device_type):
36
36
migtd_dst = "../../Bin/migtd_001.bin"
37
37
38
38
with migtd_context () as ctx :
39
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
40
39
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
40
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
41
41
ctx .start_user_td (type = "src" )
42
42
ctx .start_user_td (type = "dst" )
43
- ctx .connect ()
43
+ if device_type == "vsock" :
44
+ ctx .connect ()
44
45
ctx .pre_migration ()
45
46
ctx .check_migration_result ()
46
47
@@ -56,11 +57,12 @@ def test_function_002(device_type):
56
57
migtd_dst = "../../Bin/migtd_001.bin"
57
58
58
59
with migtd_context () as ctx :
59
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
60
60
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
61
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
61
62
ctx .start_user_td (type = "src" )
62
63
ctx .start_user_td (type = "dst" )
63
- ctx .connect ()
64
+ if device_type == "vsock" :
65
+ ctx .connect ()
64
66
ctx .pre_migration ()
65
67
ctx .check_migration_result ()
66
68
@@ -76,11 +78,12 @@ def test_function_negative_003(device_type):
76
78
migtd_dst = "../../Bin/migtd_001.bin"
77
79
78
80
with migtd_context () as ctx :
79
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
80
81
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
82
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
81
83
ctx .start_user_td (type = "src" )
82
84
ctx .start_user_td (type = "dst" )
83
- ctx .connect ()
85
+ if device_type == "vsock" :
86
+ ctx .connect ()
84
87
ctx .pre_migration ()
85
88
ctx .check_migration_result (negative = True )
86
89
@@ -96,11 +99,12 @@ def test_function_004(device_type):
96
99
migtd_dst = "../../Bin/migtd_004.bin"
97
100
98
101
with migtd_context () as ctx :
99
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
100
102
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
103
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
101
104
ctx .start_user_td (type = "src" )
102
105
ctx .start_user_td (type = "dst" )
103
- ctx .connect ()
106
+ if device_type == "vsock" :
107
+ ctx .connect ()
104
108
ctx .pre_migration ()
105
109
ctx .check_migration_result ()
106
110
@@ -116,11 +120,12 @@ def test_function_005(device_type):
116
120
migtd_dst = "../../Bin/migtd_005.bin"
117
121
118
122
with migtd_context () as ctx :
119
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
120
123
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
124
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
121
125
ctx .start_user_td (type = "src" )
122
126
ctx .start_user_td (type = "dst" )
123
- ctx .connect ()
127
+ if device_type == "vsock" :
128
+ ctx .connect ()
124
129
ctx .pre_migration ()
125
130
ctx .check_migration_result ()
126
131
@@ -136,11 +141,12 @@ def test_function_negative_006(device_type):
136
141
migtd_dst = "../../Bin/migtd_006.bin"
137
142
138
143
with migtd_context () as ctx :
139
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
140
144
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
145
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
141
146
ctx .start_user_td (type = "src" )
142
147
ctx .start_user_td (type = "dst" )
143
- ctx .connect ()
148
+ if device_type == "vsock" :
149
+ ctx .connect ()
144
150
ctx .pre_migration ()
145
151
ctx .check_migration_result (negative = True )
146
152
@@ -156,11 +162,12 @@ def test_function_negative_007(device_type):
156
162
migtd_dst = "../../Bin/migtd_no.bin"
157
163
158
164
with migtd_context () as ctx :
159
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
160
165
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
166
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
161
167
ctx .start_user_td (type = "src" )
162
168
ctx .start_user_td (type = "dst" )
163
- ctx .connect ()
169
+ if device_type == "vsock" :
170
+ ctx .connect ()
164
171
ctx .pre_migration ()
165
172
ctx .check_migration_result (negative = True )
166
173
@@ -176,11 +183,12 @@ def test_function_negative_008(device_type):
176
183
migtd_dst = "../../Bin/migtd_no.bin"
177
184
178
185
with migtd_context () as ctx :
179
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
180
186
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
187
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
181
188
ctx .start_user_td (type = "src" )
182
189
ctx .start_user_td (type = "dst" )
183
- ctx .connect ()
190
+ if device_type == "vsock" :
191
+ ctx .connect ()
184
192
ctx .pre_migration ()
185
193
ctx .check_migration_result (negative = True )
186
194
@@ -196,11 +204,12 @@ def test_function_negative_009(device_type):
196
204
migtd_dst = "../../Bin/migtd_009.bin"
197
205
198
206
with migtd_context () as ctx :
199
- ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
200
207
ctx .start_mig_td (bios_img = migtd_src , type = "src" , no_device = True , device = device_type )
208
+ ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
201
209
ctx .start_user_td (type = "src" )
202
210
ctx .start_user_td (type = "dst" )
203
- ctx .connect ()
211
+ if device_type == "vsock" :
212
+ ctx .connect ()
204
213
ctx .pre_migration ()
205
214
ctx .check_migration_result (negative = True , wait_time = 10 )
206
215
@@ -212,11 +221,12 @@ def test_function_010(device_type):
212
221
migtd_dst = "../../Bin/migtd_010.bin"
213
222
214
223
with migtd_context () as ctx :
215
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
216
224
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
225
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
217
226
ctx .start_user_td (type = "src" )
218
227
ctx .start_user_td (type = "dst" )
219
- ctx .connect ()
228
+ if device_type == "vsock" :
229
+ ctx .connect ()
220
230
ctx .pre_migration ()
221
231
ctx .check_migration_result ()
222
232
@@ -228,11 +238,12 @@ def test_function_011(device_type):
228
238
migtd_dst = "../../Bin/migtd_011.bin"
229
239
230
240
with migtd_context () as ctx :
231
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
232
241
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
242
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
233
243
ctx .start_user_td (type = "src" )
234
244
ctx .start_user_td (type = "dst" )
235
- ctx .connect ()
245
+ if device_type == "vsock" :
246
+ ctx .connect ()
236
247
ctx .pre_migration ()
237
248
ctx .check_migration_result ()
238
249
@@ -248,11 +259,12 @@ def test_function_012(device_type):
248
259
migtd_dst = "../../Bin/migtd_dst_012.bin"
249
260
250
261
with migtd_context () as ctx :
251
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
252
262
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
263
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
253
264
ctx .start_user_td (type = "src" )
254
265
ctx .start_user_td (type = "dst" )
255
- ctx .connect ()
266
+ if device_type == "vsock" :
267
+ ctx .connect ()
256
268
ctx .pre_migration ()
257
269
ctx .check_migration_result ()
258
270
@@ -268,11 +280,12 @@ def test_function_013(device_type):
268
280
migtd_dst = "../../Bin/migtd_dst_013.bin"
269
281
270
282
with migtd_context () as ctx :
271
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
272
283
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
284
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
273
285
ctx .start_user_td (type = "src" )
274
286
ctx .start_user_td (type = "dst" )
275
- ctx .connect ()
287
+ if device_type == "vsock" :
288
+ ctx .connect ()
276
289
ctx .pre_migration ()
277
290
ctx .check_migration_result ()
278
291
@@ -288,11 +301,12 @@ def test_function_negative_014(device_type):
288
301
migtd_dst = "../../Bin/migtd_dst_014.bin"
289
302
290
303
with migtd_context () as ctx :
291
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
292
304
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
305
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
293
306
ctx .start_user_td (type = "src" )
294
307
ctx .start_user_td (type = "dst" )
295
- ctx .connect ()
308
+ if device_type == "vsock" :
309
+ ctx .connect ()
296
310
ctx .pre_migration ()
297
311
ctx .check_migration_result (negative = True )
298
312
@@ -308,11 +322,12 @@ def test_function_negative_015(device_type):
308
322
migtd_dst = "../../Bin/migtd_015.bin"
309
323
310
324
with migtd_context () as ctx :
311
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
312
325
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
326
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
313
327
ctx .start_user_td (type = "src" )
314
328
ctx .start_user_td (type = "dst" )
315
- ctx .connect ()
329
+ if device_type == "vsock" :
330
+ ctx .connect ()
316
331
ctx .pre_migration ()
317
332
ctx .check_migration_result (negative = True )
318
333
@@ -328,11 +343,12 @@ def test_function_negative_016(device_type):
328
343
migtd_dst = "../../Bin/migtd_016.bin"
329
344
330
345
with migtd_context () as ctx :
331
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
332
346
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
347
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
333
348
ctx .start_user_td (type = "src" )
334
349
ctx .start_user_td (type = "dst" )
335
- ctx .connect ()
350
+ if device_type == "vsock" :
351
+ ctx .connect ()
336
352
ctx .pre_migration ()
337
353
ctx .check_migration_result (negative = True )
338
354
@@ -348,11 +364,12 @@ def test_function_negative_017(device_type):
348
364
migtd_dst = "../../Bin/migtd_017.bin"
349
365
350
366
with migtd_context () as ctx :
351
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
352
367
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
368
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
353
369
ctx .start_user_td (type = "src" )
354
370
ctx .start_user_td (type = "dst" )
355
- ctx .connect ()
371
+ if device_type == "vsock" :
372
+ ctx .connect ()
356
373
ctx .pre_migration ()
357
374
ctx .check_migration_result (negative = True )
358
375
@@ -372,7 +389,8 @@ def test_function_negative_018(device_type):
372
389
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
373
390
ctx .start_user_td (type = "src" )
374
391
ctx .start_user_td (type = "dst" )
375
- ctx .connect ()
392
+ if device_type == "vsock" :
393
+ ctx .connect ()
376
394
ctx .pre_migration ()
377
395
ctx .check_migration_result (negative = True )
378
396
@@ -398,11 +416,12 @@ def test_pre_binding(device_type, servtd_hash):
398
416
migtd_dst = "../../target/release/migtd.bin"
399
417
400
418
with migtd_context () as ctx :
401
- ctx .start_user_td (type = "src" , is_pre_binding = True , hash = servtd_hash )
402
419
ctx .start_user_td (type = "dst" , is_pre_binding = True , hash = servtd_hash )
420
+ ctx .start_user_td (type = "src" , is_pre_binding = True , hash = servtd_hash )
403
421
ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
404
422
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
405
- ctx .connect ()
423
+ if device_type == "vsock" :
424
+ ctx .connect ()
406
425
407
426
ctx .pre_migration (is_pre_binding = True )
408
427
ctx .check_migration_result ()
@@ -417,9 +436,10 @@ def test_cycle(device_type):
417
436
migtd_dst = "../../target/release/migtd.bin"
418
437
419
438
with migtd_context () as ctx :
420
- ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
421
439
ctx .start_mig_td (bios_img = migtd_dst , type = "dst" , device = device_type )
422
- ctx .connect ()
440
+ ctx .start_mig_td (bios_img = migtd_src , type = "src" , device = device_type )
441
+ if device_type == "vsock" :
442
+ ctx .connect ()
423
443
424
444
for i in range (ctx .stress_test_cycles ):
425
445
LOG .debug (f"#### Cycle Test: { i } ####" )
0 commit comments