[PATCH] ipmi-bt-test: force ipv4

Vladimir Sementsov-Ogievskiy posted 1 patch 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231018191123.1176602-1-vsementsov@yandex-team.ru
Maintainers: Corey Minyard <minyard@acm.org>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/ipmi-bt-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] ipmi-bt-test: force ipv4
Posted by Vladimir Sementsov-Ogievskiy 1 year, 1 month ago
We open ipv4 listening socket. But "localhost" in qemu parameters may
load to Qemu trying to connect with ipv6 and fail with "Connection
refused". Force ipv4 by using ipv4 ip address.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 tests/qtest/ipmi-bt-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/ipmi-bt-test.c b/tests/qtest/ipmi-bt-test.c
index ed431e34e6..383239bcd4 100644
--- a/tests/qtest/ipmi-bt-test.c
+++ b/tests/qtest/ipmi-bt-test.c
@@ -411,7 +411,7 @@ int main(int argc, char **argv)
     g_test_init(&argc, &argv, NULL);
 
     global_qtest = qtest_initf(
-        " -chardev socket,id=ipmi0,host=localhost,port=%d,reconnect=10"
+        " -chardev socket,id=ipmi0,host=127.0.0.1,port=%d,reconnect=10"
         " -device ipmi-bmc-extern,chardev=ipmi0,id=bmc0"
         " -device isa-ipmi-bt,bmc=bmc0", emu_port);
     qtest_irq_intercept_in(global_qtest, "ioapic");
-- 
2.34.1
Re: [PATCH] ipmi-bt-test: force ipv4
Posted by Corey Minyard 1 year, 1 month ago
On Wed, Oct 18, 2023 at 10:11:23PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> We open ipv4 listening socket. But "localhost" in qemu parameters may
> load to Qemu trying to connect with ipv6 and fail with "Connection
> refused". Force ipv4 by using ipv4 ip address.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
>  tests/qtest/ipmi-bt-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qtest/ipmi-bt-test.c b/tests/qtest/ipmi-bt-test.c
> index ed431e34e6..383239bcd4 100644
> --- a/tests/qtest/ipmi-bt-test.c
> +++ b/tests/qtest/ipmi-bt-test.c
> @@ -411,7 +411,7 @@ int main(int argc, char **argv)
>      g_test_init(&argc, &argv, NULL);
>  
>      global_qtest = qtest_initf(
> -        " -chardev socket,id=ipmi0,host=localhost,port=%d,reconnect=10"
> +        " -chardev socket,id=ipmi0,host=127.0.0.1,port=%d,reconnect=10"

Yeah, this make sense.

Acked-by: Corey Minyard <cminyard@mvista.com>

>          " -device ipmi-bmc-extern,chardev=ipmi0,id=bmc0"
>          " -device isa-ipmi-bt,bmc=bmc0", emu_port);
>      qtest_irq_intercept_in(global_qtest, "ioapic");
> -- 
> 2.34.1
>
Re: [PATCH] ipmi-bt-test: force ipv4
Posted by Thomas Huth 1 year, 1 month ago
On 18/10/2023 21.11, Vladimir Sementsov-Ogievskiy wrote:
> We open ipv4 listening socket. But "localhost" in qemu parameters may
> load to Qemu trying to connect with ipv6 and fail with "Connection
> refused". Force ipv4 by using ipv4 ip address.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
>   tests/qtest/ipmi-bt-test.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qtest/ipmi-bt-test.c b/tests/qtest/ipmi-bt-test.c
> index ed431e34e6..383239bcd4 100644
> --- a/tests/qtest/ipmi-bt-test.c
> +++ b/tests/qtest/ipmi-bt-test.c
> @@ -411,7 +411,7 @@ int main(int argc, char **argv)
>       g_test_init(&argc, &argv, NULL);
>   
>       global_qtest = qtest_initf(
> -        " -chardev socket,id=ipmi0,host=localhost,port=%d,reconnect=10"
> +        " -chardev socket,id=ipmi0,host=127.0.0.1,port=%d,reconnect=10"
>           " -device ipmi-bmc-extern,chardev=ipmi0,id=bmc0"
>           " -device isa-ipmi-bt,bmc=bmc0", emu_port);
>       qtest_irq_intercept_in(global_qtest, "ioapic");

Thanks, I'll queue it for my next pull request.

Acked-by: Thomas Huth <thuth@redhat.com>