@@ -275,6 +275,7 @@ def _reassemble_iothread_config(mapping):
275275 iothread1 .update ({re .sub ('-' , '_' , item .split ()[0 ]): item .split ()[1 ]})
276276 iothread1 .update ({'poll' : tmp_poll })
277277 iothread_config ['iothread' ].append (iothread1 )
278+
278279 logging .debug ("Configured iothreads:%s" , iothread_config ['iothread' ])
279280 return iothread_config
280281
@@ -396,6 +397,8 @@ def exec_iothreadset(need_verify=True):
396397 verify_poll ()
397398 if test_thread_pool and need_verify :
398399 verify_thread_pool ()
400+ if live_set :
401+ verify_iothread_by_vm_xml ()
399402
400403 def exec_attach_disk (vm_name , source , target , thread_id ,
401404 ignore_status = False ):
@@ -464,18 +467,24 @@ def check_iothread_pool(org_pool, act_pool, is_equal=False):
464467
465468 :param org_pool: original pool
466469 :param act_pool: actual pool
467- :param is_equal: True to assume they are some values
468- False to check if they are different
470+ :param is_equal: True to check if org_pool is a subset of act_pool
471+ False to check if they are not exactly equal
469472 :raise: test.fail if result does not show as expected
470473 """
471- if (org_pool == act_pool ) != is_equal :
472- err_info = ("The iothread pool values haven't been updated!"
473- "Expected: {}, Actual: {}" .format (org_pool , act_pool ))
474- if is_equal :
474+ if is_equal :
475+ for key , expected_value in org_pool .items ():
476+ if key not in act_pool or act_pool [key ] != expected_value :
477+ err_info = ("The iothread pool values were not updated as expected. "
478+ "Mismatch found for key '%s'.\n "
479+ "Expected subset: %s\n "
480+ "Actual full set: %s" % (key , org_pool , act_pool ))
481+ test .fail (err_info )
482+ else :
483+ if org_pool == act_pool :
475484 err_info = ("The iothread pool values have been updated "
476485 "unexpectedly! Expected: {}, Actual: {}"
477486 .format (org_pool , act_pool ))
478- test .fail (err_info )
487+ test .fail (err_info )
479488
480489 def check_schedinfo ():
481490 """
@@ -545,6 +554,7 @@ def _exec_schedinfo(items, update_error=False):
545554 restart_libvirtd = "yes" == params .get ("restart_libvirtd" , "no" )
546555 restart_vm = "yes" == params .get ("restart_vm" , "no" )
547556 need_start_vm = "yes" == params .get ("need_start_vm" , "no" )
557+ live_set = "yes" == params .get ("live_set" , "no" )
548558 test_operations = params .get ("test_operations" )
549559 cmd_options = params .get ("cmd_options" , '' )
550560
0 commit comments