[PATCH] tests/qtest: Pass down do_connect param in qtest_init_with_env()

Xiaoyao Li posted 1 patch 6 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250422120420.3068159-1-xiaoyao.li@intel.com
Maintainers: Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/libqtest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] tests/qtest: Pass down do_connect param in qtest_init_with_env()
Posted by Xiaoyao Li 6 months, 3 weeks ago
The @do_connect parameter of qtest_init_with_env() is not used. Fix it
by passing it down to qtest_init_with_env_and_capabilities() instead of
hard coding a true.

Fixes: 5357ef823a1f ("tests/qtest: defer connection")
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
 tests/qtest/libqtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index fad307d125aa..518710909c3e 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -597,7 +597,7 @@ QTestState *qtest_init_with_env_and_capabilities(const char *var,
 QTestState *qtest_init_with_env(const char *var, const char *extra_args,
                                 bool do_connect)
 {
-    return qtest_init_with_env_and_capabilities(var, extra_args, NULL, true);
+    return qtest_init_with_env_and_capabilities(var, extra_args, NULL, do_connect);
 }
 
 QTestState *qtest_init(const char *extra_args)
-- 
2.34.1
Re: [PATCH] tests/qtest: Pass down do_connect param in qtest_init_with_env()
Posted by Philippe Mathieu-Daudé 6 months, 3 weeks ago
On 22/4/25 14:04, Xiaoyao Li wrote:
> The @do_connect parameter of qtest_init_with_env() is not used. Fix it
> by passing it down to qtest_init_with_env_and_capabilities() instead of
> hard coding a true.
> 
> Fixes: 5357ef823a1f ("tests/qtest: defer connection")
> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> ---
>   tests/qtest/libqtest.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH] tests/qtest: Pass down do_connect param in qtest_init_with_env()
Posted by Steven Sistare 6 months, 3 weeks ago
On 4/22/2025 9:20 AM, Philippe Mathieu-Daudé wrote:
> On 22/4/25 14:04, Xiaoyao Li wrote:
>> The @do_connect parameter of qtest_init_with_env() is not used. Fix it
>> by passing it down to qtest_init_with_env_and_capabilities() instead of
>> hard coding a true.
>>
>> Fixes: 5357ef823a1f ("tests/qtest: defer connection")
>> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
>> ---
>>   tests/qtest/libqtest.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 

This is the same bug that Vladimir fixed:

https://lore.kernel.org/qemu-devel/20250410162250.329941-1-vsementsov@yandex-team.ru/

- Steve




Re: [PATCH] tests/qtest: Pass down do_connect param in qtest_init_with_env()
Posted by Xiaoyao Li 6 months, 3 weeks ago
On 4/22/2025 10:48 PM, Steven Sistare wrote:
> On 4/22/2025 9:20 AM, Philippe Mathieu-Daudé wrote:
>> On 22/4/25 14:04, Xiaoyao Li wrote:
>>> The @do_connect parameter of qtest_init_with_env() is not used. Fix it
>>> by passing it down to qtest_init_with_env_and_capabilities() instead of
>>> hard coding a true.
>>>
>>> Fixes: 5357ef823a1f ("tests/qtest: defer connection")
>>> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
>>> ---
>>>   tests/qtest/libqtest.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>
> 
> This is the same bug that Vladimir fixed:
> 
> https://lore.kernel.org/qemu-devel/20250410162250.329941-1- 
> vsementsov@yandex-team.ru/

Thanks for the info!

> - Steve
> 
> 
>