diff options
Diffstat (limited to 'recipes-test/virt-test/files/qemu-tests-cpuflags-migrate-to-provider.patch')
-rw-r--r-- | recipes-test/virt-test/files/qemu-tests-cpuflags-migrate-to-provider.patch | 91 |
1 files changed, 91 insertions, 0 deletions
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 @@ | |||
1 | commit a1aa54ba8adbf2e12043b7d91161ee6302e7584c | ||
2 | Author: Jonas Eriksson <jonas.eriksson@enea.com> | ||
3 | Date: Wed Mar 26 14:08:54 2014 +0100 | ||
4 | |||
5 | cpuflags: Migrate cpuflags test case to provider | ||
6 | |||
7 | The provider module has a install_cpuflags_util_on_vm function that does | ||
8 | the very same thing as the internal implementation: Use that instead. | ||
9 | |||
10 | Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com> | ||
11 | Upstream-Status: Pending | ||
12 | |||
13 | diff --git a/qemu/tests/cpuflags.py b/qemu/tests/cpuflags.py | ||
14 | index 7b2dca6..eecbf16 100644 | ||
15 | --- a/qemu/tests/cpuflags.py | ||
16 | +++ b/qemu/tests/cpuflags.py | ||
17 | @@ -11,6 +11,7 @@ from autotest.client.shared import error, utils | ||
18 | from virttest import qemu_vm, virt_vm | ||
19 | from virttest import utils_misc, utils_test, aexpect | ||
20 | from autotest.client.shared.syncdata import SyncData | ||
21 | +from provider import cpuflags | ||
22 | |||
23 | |||
24 | def run(test, params, env): | ||
25 | @@ -385,21 +386,6 @@ def run(test, params, env): | ||
26 | |||
27 | return set(online) - set(disabled_cpu) | ||
28 | |||
29 | - def install_cpuflags_test_on_vm(vm, dst_dir): | ||
30 | - """ | ||
31 | - Install stress to vm. | ||
32 | - | ||
33 | - :param vm: virtual machine. | ||
34 | - :param dst_dir: Installation path. | ||
35 | - """ | ||
36 | - session = vm.wait_for_login() | ||
37 | - vm.copy_files_to(cpuflags_src, dst_dir) | ||
38 | - session.cmd("sync") | ||
39 | - session.cmd("cd %s; make EXTRA_FLAGS='';" % | ||
40 | - os.path.join(dst_dir, "cpu_flags")) | ||
41 | - session.cmd("sync") | ||
42 | - session.close() | ||
43 | - | ||
44 | def check_cpuflags_work(vm, path, flags): | ||
45 | """ | ||
46 | Check which flags work. | ||
47 | @@ -433,7 +419,7 @@ def run(test, params, env): | ||
48 | """ | ||
49 | ret = False | ||
50 | install_path = "/tmp" | ||
51 | - install_cpuflags_test_on_vm(vm, install_path) | ||
52 | + cpuflags.install_cpuflags_util_on_vm(test, vm, install_path) | ||
53 | flags = check_cpuflags_work(vm, install_path, guest_flags) | ||
54 | dd_session = vm.wait_for_login() | ||
55 | stress_session = vm.wait_for_login() | ||
56 | @@ -614,7 +600,7 @@ def run(test, params, env): | ||
57 | logging.info("Check main instruction sets.") | ||
58 | |||
59 | install_path = "/tmp" | ||
60 | - install_cpuflags_test_on_vm(self.vm, install_path) | ||
61 | + cpuflags.install_cpuflags_util_on_vm(test, self.vm, install_path) | ||
62 | |||
63 | Flags = check_cpuflags_work(self.vm, install_path, | ||
64 | flags.all_possible_guest_flags) | ||
65 | @@ -815,7 +801,7 @@ def run(test, params, env): | ||
66 | (self.vm, _) = start_guest_with_cpuflags(cpuf_model, smp) | ||
67 | |||
68 | install_path = "/tmp" | ||
69 | - install_cpuflags_test_on_vm(self.vm, install_path) | ||
70 | + cpuflags.install_cpuflags_util_on_vm(test, self.vm, install_path) | ||
71 | flags = check_cpuflags_work(self.vm, install_path, | ||
72 | flags.guest_flags) | ||
73 | dd_session = self.vm.wait_for_login() | ||
74 | @@ -931,7 +917,7 @@ def run(test, params, env): | ||
75 | vm = env.get_vm("vm1") | ||
76 | session = vm.wait_for_login(timeout=self.login_timeout) | ||
77 | |||
78 | - install_cpuflags_test_on_vm(vm, install_path) | ||
79 | + cpuflags.install_cpuflags_util_on_vm(test, vm, install_path) | ||
80 | |||
81 | Flags = check_cpuflags_work(vm, install_path, | ||
82 | flags.all_possible_guest_flags) | ||
83 | @@ -1060,7 +1046,7 @@ def run(test, params, env): | ||
84 | vm = env.get_vm("vm1") | ||
85 | session = vm.wait_for_login(timeout=self.login_timeout) | ||
86 | |||
87 | - install_cpuflags_test_on_vm(vm, install_path) | ||
88 | + cpuflags.install_cpuflags_util_on_vm(test, vm, install_path) | ||
89 | |||
90 | Flags = check_cpuflags_work(vm, install_path, | ||
91 | flags.all_possible_guest_flags) | ||