[dts] [PATCH V1] tests/vm_power_manager:restart libvirtd

Tu, Lijuan lijuan.tu at intel.com
Mon Oct 25 05:34:15 CEST 2021



> -----Original Message-----
> From: dts <dts-bounces at dpdk.org> On Behalf Of Lewei Yang
> Sent: 2021年10月19日 3:05
> To: dts at dpdk.org
> Cc: Yang, LeweiX <leweix.yang at intel.com>
> Subject: [dts] [PATCH V1] tests/vm_power_manager:restart libvirtd
> 
> dut needs to create a new vm,but a suite has created a vm before.
> restart libvirtd to make sure new vm can be created
> 
> Signed-off-by: Lewei Yang <leweix.yang at intel.com>
> ---
>  tests/TestSuite_vm_power_manager.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/TestSuite_vm_power_manager.py
> b/tests/TestSuite_vm_power_manager.py
> index f650ba28..455383f7 100644
> --- a/tests/TestSuite_vm_power_manager.py
> +++ b/tests/TestSuite_vm_power_manager.py
> @@ -63,6 +63,7 @@ class TestVmPowerManager(TestCase):
>          self.vcpu_map = []
>          # start vm
>          self.vm_name = "vm0"
> +        self.dut.send_expect("service libvirtd restart", "# ")

It's real a bad idea to restart service. Libvirt should have the cap to create a new vm.

>          self.vm = LibvirtKvm(self.dut, self.vm_name, self.suite_name)
>          channels = [
>              {'path': '/tmp/powermonitor/%s.0' %
> --
> 2.17.1



More information about the dts mailing list