Skip to content

Commit

Permalink
tests/avocado/machine_s390_ccw_virtio.py: Fix SyntaxWarnings from pyt…
Browse files Browse the repository at this point in the history
…hon 3.12

Python 3.12 now warns about backslashes in strings that aren't used
for escaping a special character from Python. Silence the warning
by using raw strings here instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231113140721.46903-1-thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
  • Loading branch information
huth authored and philmd committed Nov 13, 2023
1 parent 0034d03 commit 0b2af47
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/avocado/machine_s390_ccw_virtio.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def wait_for_crw_reports(self):
dmesg_clear_count = 1
def clear_guest_dmesg(self):
exec_command_and_wait_for_pattern(self, 'dmesg -c > /dev/null; '
'echo dm_clear\ ' + str(self.dmesg_clear_count),
'dm_clear ' + str(self.dmesg_clear_count))
r'echo dm_clear\ ' + str(self.dmesg_clear_count),
r'dm_clear ' + str(self.dmesg_clear_count))
self.dmesg_clear_count += 1

def test_s390x_devices(self):
Expand Down Expand Up @@ -121,15 +121,15 @@ def test_s390x_devices(self):
'cat /sys/bus/ccw/devices/0.1.1111/cutype',
'3832/01')
exec_command_and_wait_for_pattern(self,
'cat /sys/bus/pci/devices/0005\:00\:00.0/subsystem_vendor',
'0x1af4')
r'cat /sys/bus/pci/devices/0005\:00\:00.0/subsystem_vendor',
r'0x1af4')
exec_command_and_wait_for_pattern(self,
'cat /sys/bus/pci/devices/0005\:00\:00.0/subsystem_device',
'0x0001')
r'cat /sys/bus/pci/devices/0005\:00\:00.0/subsystem_device',
r'0x0001')
# check fid propagation
exec_command_and_wait_for_pattern(self,
'cat /sys/bus/pci/devices/000a\:00\:00.0/function_id',
'0x0000000c')
r'cat /sys/bus/pci/devices/000a\:00\:00.0/function_id',
r'0x0000000c')
# add another device
self.clear_guest_dmesg()
self.vm.cmd('device_add', driver='virtio-net-ccw',
Expand Down Expand Up @@ -235,7 +235,7 @@ def test_s390x_fedora(self):
'while ! (dmesg | grep gpudrmfb) ; do sleep 1 ; done',
'virtio_gpudrmfb frame buffer device')
exec_command_and_wait_for_pattern(self,
'echo -e "\e[?25l" > /dev/tty0', ':/#')
r'echo -e "\e[?25l" > /dev/tty0', ':/#')
exec_command_and_wait_for_pattern(self, 'for ((i=0;i<250;i++)); do '
'echo " The qu ick fo x j ump s o ver a laz y d og" >> fox.txt;'
'done',
Expand Down

0 comments on commit 0b2af47

Please sign in to comment.