[PATCH for-11.0 11/15] tests/functional/aarch64/test_virt_gpu: Fix style issues

Thomas Huth posted 15 patches 1 day, 4 hours ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Radoslaw Biernacki <rad@semihalf.com>, Peter Maydell <peter.maydell@linaro.org>, Leif Lindholm <leif.lindholm@oss.qualcomm.com>, Eric Auger <eric.auger@redhat.com>, Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>, Dmitry Osipenko <dmitry.osipenko@collabora.com>, "Cédric Le Goater" <clg@kaod.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Aurelien Jarno <aurelien@aurel32.net>, BALATON Zoltan <balaton@eik.bme.hu>, Glenn Miles <milesg@linux.ibm.com>, Nicholas Piggin <npiggin@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Zhao Liu <zhao1.liu@intel.com>
[PATCH for-11.0 11/15] tests/functional/aarch64/test_virt_gpu: Fix style issues
Posted by Thomas Huth 1 day, 4 hours ago
From: Thomas Huth <thuth@redhat.com>

Reshuffle the import statements according to the suggestions from pylint,
use lowercase letters for variable names, and drop some spaces that flake8
did not like.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/functional/aarch64/test_virt_gpu.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/functional/aarch64/test_virt_gpu.py b/tests/functional/aarch64/test_virt_gpu.py
index c26a1f20c65..6ed0e0fc1a9 100755
--- a/tests/functional/aarch64/test_virt_gpu.py
+++ b/tests/functional/aarch64/test_virt_gpu.py
@@ -9,16 +9,16 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-from qemu.machine.machine import VMLaunchFailure
+from re import search
+from subprocess import check_output, CalledProcessError
 
-from qemu_test import Asset
+from qemu_test import Asset, skipIfMissingCommands
 from qemu_test import exec_command_and_wait_for_pattern as ec_and_wait
-from qemu_test import skipIfMissingCommands
 
 from qemu_test.linuxkernel import LinuxKernelTest
 
-from re import search
-from subprocess import check_output, CalledProcessError
+from qemu.machine.machine import VMLaunchFailure
+
 
 class Aarch64VirtGPUMachine(LinuxKernelTest):
 
@@ -81,16 +81,16 @@ def _launch_virt_gpu(self, gpu_device):
         self.wait_for_console_pattern('buildroot login:')
         ec_and_wait(self, 'root', '#')
 
-    def _run_virt_weston_test(self, cmd, fail = None):
+    def _run_virt_weston_test(self, cmd, fail=None):
 
         # make it easier to detect successful return to shell
-        PS1 = 'RES=[$?] # '
-        OK_CMD = 'RES=[0] # '
+        ps1 = 'RES=[$?] # '
+        ok_cmd = 'RES=[0] # '
 
         ec_and_wait(self, 'export XDG_RUNTIME_DIR=/tmp', '#')
-        ec_and_wait(self, f"export PS1='{PS1}'", OK_CMD)
+        ec_and_wait(self, f"export PS1='{ps1}'", ok_cmd)
         full_cmd = f"weston -B headless --renderer gl --shell kiosk -- {cmd}"
-        ec_and_wait(self, full_cmd, OK_CMD, fail)
+        ec_and_wait(self, full_cmd, ok_cmd, fail)
 
     @skipIfMissingCommands('zstd')
     def test_aarch64_virt_with_virgl_gpu(self):
-- 
2.51.1