[PATCH for-9.0 v3 0/2] qtest/virtio-9p-test.c: fix slow tests

Daniel Henrique Barboza posted 2 patches 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240327142011.805728-1-dbarboza@ventanamicro.com
Maintainers: Greg Kurz <groug@kaod.org>, Christian Schoenebeck <qemu_oss@crudebyte.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/virtio-9p-test.c | 32 +++++++++++---------------------
1 file changed, 11 insertions(+), 21 deletions(-)
[PATCH for-9.0 v3 0/2] qtest/virtio-9p-test.c: fix slow tests
Posted by Daniel Henrique Barboza 1 month ago
Hi,

In this new version we took a different approach after the discussions
we had in [1]. The tests are now untouched, and we're addressing the root
cause directly: the fact that we have a single temp dir for all the test
execution in qos-test.

We're now creating and cleaning temp dirs for each individual test by
calling virtio_9p_create_local_test_dir() in the .before callback for
the local 9p tests (assign_9p_local_driver()). In this same callback we
queue the cleanup function that will erase the created temp dir. The
cleanup will run after the test ran successfully.

This approach is similar to what other qtests do (in fact this design was
taken from vhost-user-test.c) so it's not like we're doing something
novel.

I kept the revert of the slow test gate because Gitlab seems to approve
it:

https://gitlab.com/danielhb/qemu/-/pipelines/1229836634

Feel free to take just patch 1 if we're not sure about re-enabling these
tests in Gitlab.


Changes from v3:
- patches 1 to 6: dropped
- patch 1 (new):
  - create and remove temporary dirs on each test
- v2 link: https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06335.html

[1] https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06400.html

Daniel Henrique Barboza (2):
  qtest/virtio-9p-test.c: create/remove temp dirs after each test
  qtest/virtio-9p-test.c: remove g_test_slow() gate

 tests/qtest/virtio-9p-test.c | 32 +++++++++++---------------------
 1 file changed, 11 insertions(+), 21 deletions(-)

-- 
2.44.0
Re: [PATCH for-9.0 v3 0/2] qtest/virtio-9p-test.c: fix slow tests
Posted by Christian Schoenebeck 1 month ago
On Wednesday, March 27, 2024 3:20:09 PM CET Daniel Henrique Barboza wrote:
> Hi,
> 
> In this new version we took a different approach after the discussions
> we had in [1]. The tests are now untouched, and we're addressing the root
> cause directly: the fact that we have a single temp dir for all the test
> execution in qos-test.
> 
> We're now creating and cleaning temp dirs for each individual test by
> calling virtio_9p_create_local_test_dir() in the .before callback for
> the local 9p tests (assign_9p_local_driver()). In this same callback we
> queue the cleanup function that will erase the created temp dir. The
> cleanup will run after the test ran successfully.
> 
> This approach is similar to what other qtests do (in fact this design was
> taken from vhost-user-test.c) so it's not like we're doing something
> novel.
> 
> I kept the revert of the slow test gate because Gitlab seems to approve
> it:
> 
> https://gitlab.com/danielhb/qemu/-/pipelines/1229836634
> 
> Feel free to take just patch 1 if we're not sure about re-enabling these
> tests in Gitlab.
> 
> 
> Changes from v3:
> - patches 1 to 6: dropped
> - patch 1 (new):
>   - create and remove temporary dirs on each test
> - v2 link: https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06335.html
> 
> [1] https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06400.html
> 
> Daniel Henrique Barboza (2):
>   qtest/virtio-9p-test.c: create/remove temp dirs after each test
>   qtest/virtio-9p-test.c: remove g_test_slow() gate
> 
>  tests/qtest/virtio-9p-test.c | 32 +++++++++++---------------------
>  1 file changed, 11 insertions(+), 21 deletions(-)

Queued on 9p.next:
https://github.com/cschoenebeck/qemu/commits/9p.next

Thanks!

/Christian
Re: [PATCH for-9.0 v3 0/2] qtest/virtio-9p-test.c: fix slow tests
Posted by Thomas Huth 1 month ago
On 27/03/2024 15.20, Daniel Henrique Barboza wrote:
> Hi,
> 
> In this new version we took a different approach after the discussions
> we had in [1]. The tests are now untouched, and we're addressing the root
> cause directly: the fact that we have a single temp dir for all the test
> execution in qos-test.
> 
> We're now creating and cleaning temp dirs for each individual test by
> calling virtio_9p_create_local_test_dir() in the .before callback for
> the local 9p tests (assign_9p_local_driver()). In this same callback we
> queue the cleanup function that will erase the created temp dir. The
> cleanup will run after the test ran successfully.
> 
> This approach is similar to what other qtests do (in fact this design was
> taken from vhost-user-test.c) so it's not like we're doing something
> novel.
> 
> I kept the revert of the slow test gate because Gitlab seems to approve
> it:
> 
> https://gitlab.com/danielhb/qemu/-/pipelines/1229836634
> 
> Feel free to take just patch 1 if we're not sure about re-enabling these
> tests in Gitlab.
> 
> 
> Changes from v3:
> - patches 1 to 6: dropped
> - patch 1 (new):
>    - create and remove temporary dirs on each test
> - v2 link: https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06335.html
> 
> [1] https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06400.html
> 
> Daniel Henrique Barboza (2):
>    qtest/virtio-9p-test.c: create/remove temp dirs after each test
>    qtest/virtio-9p-test.c: remove g_test_slow() gate
> 
>   tests/qtest/virtio-9p-test.c | 32 +++++++++++---------------------
>   1 file changed, 11 insertions(+), 21 deletions(-)


Works for me, too!

Tested-by: Thomas Huth <thuth@redhat.com>
Re: [PATCH for-9.0 v3 0/2] qtest/virtio-9p-test.c: fix slow tests
Posted by Christian Schoenebeck 1 month ago
On Wednesday, March 27, 2024 3:20:09 PM CET Daniel Henrique Barboza wrote:
> Hi,
> 
> In this new version we took a different approach after the discussions
> we had in [1]. The tests are now untouched, and we're addressing the root
> cause directly: the fact that we have a single temp dir for all the test
> execution in qos-test.
> 
> We're now creating and cleaning temp dirs for each individual test by
> calling virtio_9p_create_local_test_dir() in the .before callback for
> the local 9p tests (assign_9p_local_driver()). In this same callback we
> queue the cleanup function that will erase the created temp dir. The
> cleanup will run after the test ran successfully.
> 
> This approach is similar to what other qtests do (in fact this design was
> taken from vhost-user-test.c) so it's not like we're doing something
> novel.
> 
> I kept the revert of the slow test gate because Gitlab seems to approve
> it:
> 
> https://gitlab.com/danielhb/qemu/-/pipelines/1229836634
> 
> Feel free to take just patch 1 if we're not sure about re-enabling these
> tests in Gitlab.
> 
> 
> Changes from v3:
> - patches 1 to 6: dropped
> - patch 1 (new):
>   - create and remove temporary dirs on each test
> - v2 link: https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06335.html
> 
> [1] https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06400.html
> 
> Daniel Henrique Barboza (2):
>   qtest/virtio-9p-test.c: create/remove temp dirs after each test
>   qtest/virtio-9p-test.c: remove g_test_slow() gate
> 
>  tests/qtest/virtio-9p-test.c | 32 +++++++++++---------------------
>  1 file changed, 11 insertions(+), 21 deletions(-)
> 
> 

Awesome!

Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>

Are the riscv patches already on master? I.e. should I push those two patches
through my queue?

/Christian
Re: [PATCH for-9.0 v3 0/2] qtest/virtio-9p-test.c: fix slow tests
Posted by Daniel Henrique Barboza 1 month ago

On 3/27/24 15:53, Christian Schoenebeck wrote:
> On Wednesday, March 27, 2024 3:20:09 PM CET Daniel Henrique Barboza wrote:
>> Hi,
>>
>> In this new version we took a different approach after the discussions
>> we had in [1]. The tests are now untouched, and we're addressing the root
>> cause directly: the fact that we have a single temp dir for all the test
>> execution in qos-test.
>>
>> We're now creating and cleaning temp dirs for each individual test by
>> calling virtio_9p_create_local_test_dir() in the .before callback for
>> the local 9p tests (assign_9p_local_driver()). In this same callback we
>> queue the cleanup function that will erase the created temp dir. The
>> cleanup will run after the test ran successfully.
>>
>> This approach is similar to what other qtests do (in fact this design was
>> taken from vhost-user-test.c) so it's not like we're doing something
>> novel.
>>
>> I kept the revert of the slow test gate because Gitlab seems to approve
>> it:
>>
>> https://gitlab.com/danielhb/qemu/-/pipelines/1229836634
>>
>> Feel free to take just patch 1 if we're not sure about re-enabling these
>> tests in Gitlab.
>>
>>
>> Changes from v3:
>> - patches 1 to 6: dropped
>> - patch 1 (new):
>>    - create and remove temporary dirs on each test
>> - v2 link: https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06335.html
>>
>> [1] https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06400.html
>>
>> Daniel Henrique Barboza (2):
>>    qtest/virtio-9p-test.c: create/remove temp dirs after each test
>>    qtest/virtio-9p-test.c: remove g_test_slow() gate
>>
>>   tests/qtest/virtio-9p-test.c | 32 +++++++++++---------------------
>>   1 file changed, 11 insertions(+), 21 deletions(-)
>>
>>
> 
> Awesome!
> 
> Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
> 
> Are the riscv patches already on master? I.e. should I push those two patches
> through my queue?

Yes, they were pushed to master almost 2 months ago and Thomas got wind of this problem
at the start of this week.


Thanks,

Daniel

> 
> /Christian
> 
>
Re: [PATCH for-9.0 v3 0/2] qtest/virtio-9p-test.c: fix slow tests
Posted by Greg Kurz 1 month ago
On Wed, 27 Mar 2024 11:20:09 -0300
Daniel Henrique Barboza <dbarboza@ventanamicro.com> wrote:

> Hi,
> 
> In this new version we took a different approach after the discussions
> we had in [1]. The tests are now untouched, and we're addressing the root
> cause directly: the fact that we have a single temp dir for all the test
> execution in qos-test.
> 
> We're now creating and cleaning temp dirs for each individual test by
> calling virtio_9p_create_local_test_dir() in the .before callback for
> the local 9p tests (assign_9p_local_driver()). In this same callback we
> queue the cleanup function that will erase the created temp dir. The
> cleanup will run after the test ran successfully.
> 
> This approach is similar to what other qtests do (in fact this design was
> taken from vhost-user-test.c) so it's not like we're doing something
> novel.
> 
> I kept the revert of the slow test gate because Gitlab seems to approve
> it:
> 
> https://gitlab.com/danielhb/qemu/-/pipelines/1229836634
> 
> Feel free to take just patch 1 if we're not sure about re-enabling these
> tests in Gitlab.
> 
> 
> Changes from v3:
> - patches 1 to 6: dropped
> - patch 1 (new):
>   - create and remove temporary dirs on each test
> - v2 link: https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06335.html
> 
> [1] https://mail.gnu.org/archive/html/qemu-devel/2024-03/msg06400.html
> 
> Daniel Henrique Barboza (2):
>   qtest/virtio-9p-test.c: create/remove temp dirs after each test
>   qtest/virtio-9p-test.c: remove g_test_slow() gate
> 
>  tests/qtest/virtio-9p-test.c | 32 +++++++++++---------------------
>  1 file changed, 11 insertions(+), 21 deletions(-)
> 

Definitely better !

Full series,

Reviewed-by:Greg Kurz <groug@kaod.org>

Cheers,

-- 
Greg