From c158582c0fc7f4bd73980fe9adad446855f4d61b Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 10 Oct 2014 03:19:54 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- .../qemu-tests-cpuflags-migrate-to-provider.patch | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 recipes-test/virt-test/files/qemu-tests-cpuflags-migrate-to-provider.patch (limited to 'recipes-test/virt-test/files/qemu-tests-cpuflags-migrate-to-provider.patch') diff --git a/recipes-test/virt-test/files/qemu-tests-cpuflags-migrate-to-provider.patch b/recipes-test/virt-test/files/qemu-tests-cpuflags-migrate-to-provider.patch new file mode 100644 index 0000000..1b948f6 --- /dev/null +++ b/recipes-test/virt-test/files/qemu-tests-cpuflags-migrate-to-provider.patch @@ -0,0 +1,91 @@ +commit a1aa54ba8adbf2e12043b7d91161ee6302e7584c +Author: Jonas Eriksson +Date: Wed Mar 26 14:08:54 2014 +0100 + + cpuflags: Migrate cpuflags test case to provider + + The provider module has a install_cpuflags_util_on_vm function that does + the very same thing as the internal implementation: Use that instead. + + Signed-off-by: Jonas Eriksson + Upstream-Status: Pending + +diff --git a/qemu/tests/cpuflags.py b/qemu/tests/cpuflags.py +index 7b2dca6..eecbf16 100644 +--- a/qemu/tests/cpuflags.py ++++ b/qemu/tests/cpuflags.py +@@ -11,6 +11,7 @@ from autotest.client.shared import error, utils + from virttest import qemu_vm, virt_vm + from virttest import utils_misc, utils_test, aexpect + from autotest.client.shared.syncdata import SyncData ++from provider import cpuflags + + + def run(test, params, env): +@@ -385,21 +386,6 @@ def run(test, params, env): + + return set(online) - set(disabled_cpu) + +- def install_cpuflags_test_on_vm(vm, dst_dir): +- """ +- Install stress to vm. +- +- :param vm: virtual machine. +- :param dst_dir: Installation path. +- """ +- session = vm.wait_for_login() +- vm.copy_files_to(cpuflags_src, dst_dir) +- session.cmd("sync") +- session.cmd("cd %s; make EXTRA_FLAGS='';" % +- os.path.join(dst_dir, "cpu_flags")) +- session.cmd("sync") +- session.close() +- + def check_cpuflags_work(vm, path, flags): + """ + Check which flags work. +@@ -433,7 +419,7 @@ def run(test, params, env): + """ + ret = False + install_path = "/tmp" +- install_cpuflags_test_on_vm(vm, install_path) ++ cpuflags.install_cpuflags_util_on_vm(test, vm, install_path) + flags = check_cpuflags_work(vm, install_path, guest_flags) + dd_session = vm.wait_for_login() + stress_session = vm.wait_for_login() +@@ -614,7 +600,7 @@ def run(test, params, env): + logging.info("Check main instruction sets.") + + install_path = "/tmp" +- install_cpuflags_test_on_vm(self.vm, install_path) ++ cpuflags.install_cpuflags_util_on_vm(test, self.vm, install_path) + + Flags = check_cpuflags_work(self.vm, install_path, + flags.all_possible_guest_flags) +@@ -815,7 +801,7 @@ def run(test, params, env): + (self.vm, _) = start_guest_with_cpuflags(cpuf_model, smp) + + install_path = "/tmp" +- install_cpuflags_test_on_vm(self.vm, install_path) ++ cpuflags.install_cpuflags_util_on_vm(test, self.vm, install_path) + flags = check_cpuflags_work(self.vm, install_path, + flags.guest_flags) + dd_session = self.vm.wait_for_login() +@@ -931,7 +917,7 @@ def run(test, params, env): + vm = env.get_vm("vm1") + session = vm.wait_for_login(timeout=self.login_timeout) + +- install_cpuflags_test_on_vm(vm, install_path) ++ cpuflags.install_cpuflags_util_on_vm(test, vm, install_path) + + Flags = check_cpuflags_work(vm, install_path, + flags.all_possible_guest_flags) +@@ -1060,7 +1046,7 @@ def run(test, params, env): + vm = env.get_vm("vm1") + session = vm.wait_for_login(timeout=self.login_timeout) + +- install_cpuflags_test_on_vm(vm, install_path) ++ cpuflags.install_cpuflags_util_on_vm(test, vm, install_path) + + Flags = check_cpuflags_work(vm, install_path, + flags.all_possible_guest_flags) -- cgit v1.2.3-54-g00ecf