From 9162967ca5285f5ae4968288ff2a4d2eb72f2904 Mon Sep 17 00:00:00 2001 From: Satheesh Rajendran Date: Mon, 19 Aug 2019 13:58:20 +0530 Subject: [PATCH 1/5] tests.acceptance.avocado_qemu: Add support for powerpc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Current acceptance test will not run properly in powerpc environment due qemu target is different from arch, this usually matches, except with bi-endian architectures like ppc64. uname would return `ppc64` or `ppc64le` based `big` or `little` endian but qemu `target` is always `ppc64`. Let's handle it. Reviewed-by: Cédric Le Goater Signed-off-by: Satheesh Rajendran Message-Id: <20190819082820.14817-1-sathnaga@linux.vnet.ibm.com> Reviewed-by: David Gibson Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index aee5d820ed..bd41e0443c 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -39,6 +39,9 @@ def pick_default_qemu_bin(arch=None): """ if arch is None: arch = os.uname()[4] + # qemu binary path does not match arch for powerpc, handle it + if 'ppc64le' in arch: + arch = 'ppc64' qemu_bin_relative_path = os.path.join("%s-softmmu" % arch, "qemu-system-%s" % arch) if is_readable_executable_file(qemu_bin_relative_path): From 9f672f9c0f364b7e6731a9c18e5410840969f7b9 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Fri, 7 Jun 2019 11:22:17 -0400 Subject: [PATCH 2/5] tests/requirements.txt: pin paramiko version requirement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's a good practice (I'd really say a must) to pin as much as possible of the software versions used during test, so let's apply that to paramiko. According to https://pypi.org/project/paramiko/, 2.4.2 is the latest released version. It's also easily obtainable on systems such as Fedora 30. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607152223.9467-3-crosa@redhat.com> Signed-off-by: Cleber Rosa --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 3ae0e29ad7..bd1f7590ed 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,4 +2,4 @@ # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 avocado-framework==68.0 -paramiko +paramiko==2.4.2 From 7a408b99764b99a188d5c5115ab235e5470d68c9 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Fri, 7 Jun 2019 11:22:18 -0400 Subject: [PATCH 3/5] Acceptance tests: drop left over usage of ":avocado: enable" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 9531d26c10 removed all of ":avocado: enable" tags, but then a new entry was added with the introduction of migration.py. Let's remove it for consistency. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607152223.9467-4-crosa@redhat.com> Signed-off-by: Cleber Rosa --- tests/acceptance/migration.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py index 6115cf6c24..a44c1ae58f 100644 --- a/tests/acceptance/migration.py +++ b/tests/acceptance/migration.py @@ -17,9 +17,6 @@ class Migration(Test): - """ - :avocado: enable - """ timeout = 10 From 83fa3bc301e767caca06b4f4f994a483b6bab5c5 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Fri, 7 Jun 2019 11:22:19 -0400 Subject: [PATCH 4/5] Boot Linux Console Test: add a test for ppc64 + pseries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just like the previous tests, boots a Linux kernel on a ppc64 target using the pseries machine. Signed-off-by: Cleber Rosa CC: Daniel P. Berrangé Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20190607152223.9467-5-crosa@redhat.com> Signed-off-by: Cleber Rosa --- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index caf0a1f8fa..92b00927d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -232,7 +232,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu,ppc64-softmmu" - TEST_CMD="make check-acceptance" after_failure: - cat tests/results/latest/job.log diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 32159503e9..2504ef0150 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -354,3 +354,22 @@ def test_alpha_clipper(self): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_ppc64_pseries(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + """ + kernel_url = ('https://download.fedoraproject.org/pub/fedora-secondary/' + 'releases/29/Everything/ppc64le/os/ppc/ppc64/vmlinuz') + kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + + self.vm.set_machine('pseries') + self.vm.set_console() + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) From 41a7af1ce0d50cfd06f8d329d97fb53e142c7df6 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Fri, 7 Jun 2019 11:22:21 -0400 Subject: [PATCH 5/5] VNC Acceptance test: simplify test names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test name is composed of the class name and method name, so it looks like there's some redundancy here that we can eliminate. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607152223.9467-7-crosa@redhat.com> Signed-off-by: Cleber Rosa --- tests/acceptance/vnc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py index 064ceabcc1..3f40bc2be1 100644 --- a/tests/acceptance/vnc.py +++ b/tests/acceptance/vnc.py @@ -34,7 +34,7 @@ def test_no_vnc_change_password(self): self.assertEqual(set_password_response['error']['desc'], 'Could not set password') - def test_vnc_change_password_requires_a_password(self): + def test_change_password_requires_a_password(self): self.vm.add_args('-nodefaults', '-S', '-vnc', ':0') self.vm.launch() self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled']) @@ -48,7 +48,7 @@ def test_vnc_change_password_requires_a_password(self): self.assertEqual(set_password_response['error']['desc'], 'Could not set password') - def test_vnc_change_password(self): + def test_change_password(self): self.vm.add_args('-nodefaults', '-S', '-vnc', ':0,password') self.vm.launch() self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled'])