def test_unload_kvm(self):
        """
        Asserts for `autotest.client.kvm_control.unload_kvm`

        :returns: None
        """
        self._mock_utils_system(0)
        self._mock_cpu_info("GenuineIntel\nvmx")
        self.assertTrue(kvm_control.unload_kvm() == 0)

        self._mock_utils_system(1)
        self._mock_cpu_info("GenuineIntel\nvmx")
        self.assertTrue(kvm_control.load_kvm() == 1)

        self._mock_utils_system(0)
        self._mock_cpu_info("POWER7")
        self.assertTrue(kvm_control.load_kvm() == 0)
Beispiel #2
0
 def stop(self, test):
     unload_status = kvm_control.unload_kvm()
     self.logfile.write("Unloaded KVM module with status %s.\n" %
                        repr(unload_status))
     self.log_lsmod(self.logfile)
     self.logfile.close()