[PATCH] tests/functional/qemu_test/testcase: Fix mismatched quotations

Yodel Eldar posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260106220319.74785-1-yodel.eldar@yodel.dev
Maintainers: Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Daniel P. Berrangé" <berrange@redhat.com>
tests/functional/qemu_test/testcase.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] tests/functional/qemu_test/testcase: Fix mismatched quotations
Posted by Yodel Eldar 1 month ago
A debug string incorrectly mixes single-quotes with double-quotes,
causing the variable within to be treated as a literal. Fix it.

Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
---
 tests/functional/qemu_test/testcase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index 58f2740100..ff86c9d187 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -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'],
-- 
2.52.0
Re: [PATCH] tests/functional/qemu_test/testcase: Fix mismatched quotations
Posted by Alex Bennée 1 month ago
Yodel Eldar <yodel.eldar@yodel.dev> writes:

> A debug string incorrectly mixes single-quotes with double-quotes,
> causing the variable within to be treated as a literal. Fix it.
>
> Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  tests/functional/qemu_test/testcase.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
> index 58f2740100..ff86c9d187 100644
> --- a/tests/functional/qemu_test/testcase.py
> +++ b/tests/functional/qemu_test/testcase.py
> @@ -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'],

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH] tests/functional/qemu_test/testcase: Fix mismatched quotations
Posted by Thomas Huth 1 month ago
On 06/01/2026 23.03, Yodel Eldar wrote:
> A debug string incorrectly mixes single-quotes with double-quotes,
> causing the variable within to be treated as a literal. Fix it.
> 
> Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
> ---
>   tests/functional/qemu_test/testcase.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
> index 58f2740100..ff86c9d187 100644
> --- a/tests/functional/qemu_test/testcase.py
> +++ b/tests/functional/qemu_test/testcase.py
> @@ -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: Thomas Huth <thuth@redhat.com>