[PATCH v5 12/13] tests/qtest/vhost-user-blk-test: use memory-backend-shm

Stefano Garzarella posted 13 patches 6 months ago
Maintainers: David Hildenbrand <david@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Raphael Norwitz <raphael@enfabrica.net>, "Michael S. Tsirkin" <mst@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Jason Wang <jasowang@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Coiby Xu <Coiby.Xu@gmail.com>, Laurent Vivier <lvivier@redhat.com>
There is a newer version of this series
[PATCH v5 12/13] tests/qtest/vhost-user-blk-test: use memory-backend-shm
Posted by Stefano Garzarella 6 months ago
`memory-backend-memfd` is available only on Linux while the new
`memory-backend-shm` can be used on any POSIX-compliant operating
system. Let's use it so we can run the test in multiple environments.

Acked-by: Thomas Huth <thuth@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
---
 tests/qtest/vhost-user-blk-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/vhost-user-blk-test.c b/tests/qtest/vhost-user-blk-test.c
index 117b9acd10..e945f6abf2 100644
--- a/tests/qtest/vhost-user-blk-test.c
+++ b/tests/qtest/vhost-user-blk-test.c
@@ -906,7 +906,7 @@ static void start_vhost_user_blk(GString *cmd_line, int vus_instances,
                            vhost_user_blk_bin);
 
     g_string_append_printf(cmd_line,
-            " -object memory-backend-memfd,id=mem,size=256M,share=on "
+            " -object memory-backend-shm,id=mem,size=256M,share=on "
             " -M memory-backend=mem -m 256M ");
 
     for (i = 0; i < vus_instances; i++) {
-- 
2.45.1


Re: [PATCH v5 12/13] tests/qtest/vhost-user-blk-test: use memory-backend-shm
Posted by David Hildenbrand 6 months ago
On 23.05.24 16:55, Stefano Garzarella wrote:
> `memory-backend-memfd` is available only on Linux while the new
> `memory-backend-shm` can be used on any POSIX-compliant operating
> system. Let's use it so we can run the test in multiple environments.
> 
> Acked-by: Thomas Huth <thuth@redhat.com>
> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
>   tests/qtest/vhost-user-blk-test.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qtest/vhost-user-blk-test.c b/tests/qtest/vhost-user-blk-test.c
> index 117b9acd10..e945f6abf2 100644
> --- a/tests/qtest/vhost-user-blk-test.c
> +++ b/tests/qtest/vhost-user-blk-test.c
> @@ -906,7 +906,7 @@ static void start_vhost_user_blk(GString *cmd_line, int vus_instances,
>                              vhost_user_blk_bin);
>   
>       g_string_append_printf(cmd_line,
> -            " -object memory-backend-memfd,id=mem,size=256M,share=on "
> +            " -object memory-backend-shm,id=mem,size=256M,share=on "

Can we simplifya nd drop the share=on?

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb


Re: [PATCH v5 12/13] tests/qtest/vhost-user-blk-test: use memory-backend-shm
Posted by Stefano Garzarella 6 months ago
On Thu, May 23, 2024 at 05:06:00PM GMT, David Hildenbrand wrote:
>On 23.05.24 16:55, Stefano Garzarella wrote:
>>`memory-backend-memfd` is available only on Linux while the new
>>`memory-backend-shm` can be used on any POSIX-compliant operating
>>system. Let's use it so we can run the test in multiple environments.
>>
>>Acked-by: Thomas Huth <thuth@redhat.com>
>>Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
>>Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
>>---
>>  tests/qtest/vhost-user-blk-test.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>diff --git a/tests/qtest/vhost-user-blk-test.c b/tests/qtest/vhost-user-blk-test.c
>>index 117b9acd10..e945f6abf2 100644
>>--- a/tests/qtest/vhost-user-blk-test.c
>>+++ b/tests/qtest/vhost-user-blk-test.c
>>@@ -906,7 +906,7 @@ static void start_vhost_user_blk(GString *cmd_line, int vus_instances,
>>                             vhost_user_blk_bin);
>>      g_string_append_printf(cmd_line,
>>-            " -object memory-backend-memfd,id=mem,size=256M,share=on "
>>+            " -object memory-backend-shm,id=mem,size=256M,share=on "
>
>Can we simplifya nd drop the share=on?

Good catch! I'll do in the next version!

>
>Reviewed-by: David Hildenbrand <david@redhat.com>

Thanks for the reviews,
Stefano