Skip to contentSkip to conversation

tests/functional/qemu_test/testcase: Fix mismatched quotations

PATCH In review Yodel Eldar 3 participants 3 messages Jan 6 – Jan 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/functional/qemu_test/testcase: Fix mismatched quotations

A debug string incorrectly mixes single-quotes with double-quotes, causing the variable within to be treated as a literal. Fix it.

---
 tests/functional/qemu_test/testcase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/functional/qemu_test/testcase.py +1 -1
index 58f2740100..ff86c9d187 100644
@@ -349,7 +349,7 @@ def require_netdev(self, netdevname):
         helptxt = run([self.qemu_bin, '-M', 'none', '-netdev', 'help'],
                       capture_output=True, check=True, encoding='utf8').stdout
         if helptxt.find('\n' + netdevname + '\n') < 0:
-            self.skipTest('no support for " + netdevname + " networking')
+            self.skipTest('no support for ' + netdevname + ' networking')
 
     def require_device(self, devicename):
         helptxt = run([self.qemu_bin, '-M', 'none', '-device', 'help'],
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Yodel Eldar

A debug string incorrectly mixes single-quotes with double-quotes, causing the variable within to be treated as a literal. Fix it.

---
  tests/functional/qemu_test/testcase.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tests/functional/qemu_test/testcase.py +0 -0
index 58f2740100..ff86c9d187 100644

tests/functional/qemu_test/testcase.py def require_netdev(self, netdevname): · line 352

Quoted 5 lines
tests/functional/qemu_test/testcase.py +1 -1
@@ -349,7 +349,7 @@ def require_netdev(self, netdevname):
          helptxt = run([self.qemu_bin, '-M', 'none', '-netdev', 'help'],
                        capture_output=True, check=True, encoding='utf8').stdout
          if helptxt.find('\n' + netdevname + '\n') < 0:
-            self.skipTest('no support for " + netdevname + " networking')
+            self.skipTest('no support for ' + netdevname + ' networking')

Ooops, good catch!

Reviewed-by on v1 1/1
#2 lore raw
In reply to Yodel Eldar
Quoted 4 lines · Yodel Eldar

A debug string incorrectly mixes single-quotes with double-quotes, causing the variable within to be treated as a literal. Fix it.

Quoted 17 lines
---
 tests/functional/qemu_test/testcase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/functional/qemu_test/testcase.py +1 -1
index 58f2740100..ff86c9d187 100644
@@ -349,7 +349,7 @@ def require_netdev(self, netdevname):
         helptxt = run([self.qemu_bin, '-M', 'none', '-netdev', 'help'],
                       capture_output=True, check=True, encoding='utf8').stdout
         if helptxt.find('\n' + netdevname + '\n') < 0:
-            self.skipTest('no support for " + netdevname + " networking')
+            self.skipTest('no support for ' + netdevname + ' networking')
 
     def require_device(self, devicename):
         helptxt = run([self.qemu_bin, '-M', 'none', '-device', 'help'],
Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro