mbox series

[v5,00/18] tests/qtest: Enable running qtest on Windows

Message ID 20221006151927.2079583-1-bmeng.cn@gmail.com
Headers show
Series tests/qtest: Enable running qtest on Windows | expand

Message

Bin Meng Oct. 6, 2022, 3:19 p.m. UTC
In preparation to adding virtio-9p support on Windows, this series
enables running qtest on Windows, so that we can run the virtio-9p
tests on Windows to make sure it does not break accidently.

Changes in v5:
- Rebase on qemu/master
- Drop patches that are already merged
- Use g_autoptr(GError)
- Restore to v1 version which does not touch the posix implementation
- Replace sighandler_t with its actual definition, since it is not
  available on BSD hosts

Changes in v4:
- Update the error reporting by using the GError "error" argument
  of g_dir_make_tmp()
- Remove the const from tmpfs declaration

Changes in v3:
- Split to a separate patch
- Add a usleep(1) in the busy wait loop
- Drop the host test

Changes in v2:
- Use g_autofree to declare the variable
- Change to use g_mkdir()
- Change to use g_mkdir()
- Change to use g_mkdir()
- Introduce qemu_send_full() and use it
- Move the enabling of building qtests on Windows to a separate
  patch to keep bisectablity
- Call socket_init() unconditionally
- Add a missing CloseHandle() call
- Change to a busy wait after migration is canceled
- new patch: "io/channel-watch: Drop the unnecessary cast"
- Change the timeout limit to 90 minutes
- new patch: "tests/qtest: Enable qtest build on Windows"

Bin Meng (15):
  semihosting/arm-compat-semi: Avoid using hardcoded /tmp
  tcg: Avoid using hardcoded /tmp
  util/qemu-sockets: Use g_get_tmp_dir() to get the directory for
    temporary files
  tests/qtest: migration-test: Avoid using hardcoded /tmp
  block/vvfat: Unify the mkdir() call
  fsdev/virtfs-proxy-helper: Use g_mkdir()
  hw/usb: dev-mtp: Use g_mkdir()
  tests/qtest: libqtest: Install signal handler via signal()
  tests/qtest: Support libqtest to build and run on Windows
  tests/qtest: libqtest: Correct the timeout unit of blocking receive
    calls for win32
  io/channel-watch: Drop a superfluous '#ifdef WIN32'
  io/channel-watch: Drop the unnecessary cast
  io/channel-watch: Fix socket watch on Windows
  .gitlab-ci.d/windows.yml: Increase the timeout to 90 minutes
  tests/qtest: Enable qtest build on Windows

Xuzhou Cheng (3):
  accel/qtest: Support qtest accelerator for Windows
  tests/qtest: Use send/recv for socket communication
  tests/qtest: migration-test: Make sure QEMU process "to" exited after
    migration is canceled

 include/hw/core/cpu.h         |   1 +
 include/qemu/sockets.h        |   2 +
 accel/dummy-cpus.c            |  14 +++-
 block/vvfat.c                 |   9 +--
 fsdev/virtfs-proxy-helper.c   |   3 +-
 hw/usb/dev-mtp.c              |   4 +-
 io/channel-watch.c            |  12 +---
 semihosting/arm-compat-semi.c |   3 +-
 softmmu/cpus.c                |   9 +--
 tcg/tcg.c                     |   3 +-
 tests/qtest/libqmp.c          |   5 +-
 tests/qtest/libqtest.c        | 124 +++++++++++++++++++++++++++++-----
 tests/qtest/migration-test.c  |  14 ++--
 util/osdep.c                  |  33 +++++++++
 util/qemu-sockets.c           |   5 +-
 .gitlab-ci.d/windows.yml      |   4 +-
 accel/meson.build             |   1 +
 accel/qtest/meson.build       |   1 +
 tests/qtest/meson.build       |   6 --
 19 files changed, 194 insertions(+), 59 deletions(-)

Comments

Alex Bennée Oct. 6, 2022, 8:33 p.m. UTC | #1
Bin Meng <bmeng.cn@gmail.com> writes:

> In preparation to adding virtio-9p support on Windows, this series
> enables running qtest on Windows, so that we can run the virtio-9p
> tests on Windows to make sure it does not break accidently.

I'm happy to take this whole series through my testing/next however I
don't have working CI for the month so need to wait for my minutes to
reset. Have you done a full CI run* with this?

(*make sure any CI run is only on a repo forked from
https://gitlab.com/qemu-project as you won't get the discount cost
factor otherwise)

>
> Changes in v5:
> - Rebase on qemu/master
> - Drop patches that are already merged
> - Use g_autoptr(GError)
> - Restore to v1 version which does not touch the posix implementation
> - Replace sighandler_t with its actual definition, since it is not
>   available on BSD hosts
>
> Changes in v4:
> - Update the error reporting by using the GError "error" argument
>   of g_dir_make_tmp()
> - Remove the const from tmpfs declaration
>
> Changes in v3:
> - Split to a separate patch
> - Add a usleep(1) in the busy wait loop
> - Drop the host test
>
> Changes in v2:
> - Use g_autofree to declare the variable
> - Change to use g_mkdir()
> - Change to use g_mkdir()
> - Change to use g_mkdir()
> - Introduce qemu_send_full() and use it
> - Move the enabling of building qtests on Windows to a separate
>   patch to keep bisectablity
> - Call socket_init() unconditionally
> - Add a missing CloseHandle() call
> - Change to a busy wait after migration is canceled
> - new patch: "io/channel-watch: Drop the unnecessary cast"
> - Change the timeout limit to 90 minutes
> - new patch: "tests/qtest: Enable qtest build on Windows"
>
> Bin Meng (15):
>   semihosting/arm-compat-semi: Avoid using hardcoded /tmp
>   tcg: Avoid using hardcoded /tmp
>   util/qemu-sockets: Use g_get_tmp_dir() to get the directory for
>     temporary files
>   tests/qtest: migration-test: Avoid using hardcoded /tmp
>   block/vvfat: Unify the mkdir() call
>   fsdev/virtfs-proxy-helper: Use g_mkdir()
>   hw/usb: dev-mtp: Use g_mkdir()
>   tests/qtest: libqtest: Install signal handler via signal()
>   tests/qtest: Support libqtest to build and run on Windows
>   tests/qtest: libqtest: Correct the timeout unit of blocking receive
>     calls for win32
>   io/channel-watch: Drop a superfluous '#ifdef WIN32'
>   io/channel-watch: Drop the unnecessary cast
>   io/channel-watch: Fix socket watch on Windows
>   .gitlab-ci.d/windows.yml: Increase the timeout to 90 minutes
>   tests/qtest: Enable qtest build on Windows
>
> Xuzhou Cheng (3):
>   accel/qtest: Support qtest accelerator for Windows
>   tests/qtest: Use send/recv for socket communication
>   tests/qtest: migration-test: Make sure QEMU process "to" exited after
>     migration is canceled
>
>  include/hw/core/cpu.h         |   1 +
>  include/qemu/sockets.h        |   2 +
>  accel/dummy-cpus.c            |  14 +++-
>  block/vvfat.c                 |   9 +--
>  fsdev/virtfs-proxy-helper.c   |   3 +-
>  hw/usb/dev-mtp.c              |   4 +-
>  io/channel-watch.c            |  12 +---
>  semihosting/arm-compat-semi.c |   3 +-
>  softmmu/cpus.c                |   9 +--
>  tcg/tcg.c                     |   3 +-
>  tests/qtest/libqmp.c          |   5 +-
>  tests/qtest/libqtest.c        | 124 +++++++++++++++++++++++++++++-----
>  tests/qtest/migration-test.c  |  14 ++--
>  util/osdep.c                  |  33 +++++++++
>  util/qemu-sockets.c           |   5 +-
>  .gitlab-ci.d/windows.yml      |   4 +-
>  accel/meson.build             |   1 +
>  accel/qtest/meson.build       |   1 +
>  tests/qtest/meson.build       |   6 --
>  19 files changed, 194 insertions(+), 59 deletions(-)
Bin Meng Oct. 7, 2022, 5:31 a.m. UTC | #2
On Fri, Oct 7, 2022 at 4:35 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Bin Meng <bmeng.cn@gmail.com> writes:
>
> > In preparation to adding virtio-9p support on Windows, this series
> > enables running qtest on Windows, so that we can run the virtio-9p
> > tests on Windows to make sure it does not break accidently.
>
> I'm happy to take this whole series through my testing/next however I
> don't have working CI for the month so need to wait for my minutes to
> reset. Have you done a full CI run* with this?
>

Yes, gitlab CI passed.

> (*make sure any CI run is only on a repo forked from
> https://gitlab.com/qemu-project as you won't get the discount cost
> factor otherwise)
>

Regards,
Bin
Bin Meng Oct. 17, 2022, 3 p.m. UTC | #3
Hi Alex,

On Fri, Oct 7, 2022 at 1:31 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Fri, Oct 7, 2022 at 4:35 AM Alex Bennée <alex.bennee@linaro.org> wrote:
> >
> >
> > Bin Meng <bmeng.cn@gmail.com> writes:
> >
> > > In preparation to adding virtio-9p support on Windows, this series
> > > enables running qtest on Windows, so that we can run the virtio-9p
> > > tests on Windows to make sure it does not break accidently.
> >
> > I'm happy to take this whole series through my testing/next however I
> > don't have working CI for the month so need to wait for my minutes to
> > reset. Have you done a full CI run* with this?
> >
>
> Yes, gitlab CI passed.
>
> > (*make sure any CI run is only on a repo forked from
> > https://gitlab.com/qemu-project as you won't get the discount cost
> > factor otherwise)
> >

Patch 4 and 10 are already applied in the mainline by Thomas.

Daniel will queue patch 14, 15, 16.

Could you please help queue patch 1, 2, 3, 5, 6, 7, 9, 13 from this series?

I will rework the rest of the patches.

Regards,
Bin
Christian Schoenebeck Oct. 17, 2022, 4:40 p.m. UTC | #4
On Monday, October 17, 2022 5:00:56 PM CEST Bin Meng wrote:
> Hi Alex,
> 
> On Fri, Oct 7, 2022 at 1:31 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> > On Fri, Oct 7, 2022 at 4:35 AM Alex Bennée <alex.bennee@linaro.org> wrote:
> > > Bin Meng <bmeng.cn@gmail.com> writes:
> > > > In preparation to adding virtio-9p support on Windows, this series
> > > > enables running qtest on Windows, so that we can run the virtio-9p
> > > > tests on Windows to make sure it does not break accidently.
> > > 
> > > I'm happy to take this whole series through my testing/next however I
> > > don't have working CI for the month so need to wait for my minutes to
> > > reset. Have you done a full CI run* with this?
> > 
> > Yes, gitlab CI passed.
> > 
> > > (*make sure any CI run is only on a repo forked from
> > > https://gitlab.com/qemu-project as you won't get the discount cost
> > > factor otherwise)
> 
> Patch 4 and 10 are already applied in the mainline by Thomas.
> 
> Daniel will queue patch 14, 15, 16.
> 
> Could you please help queue patch 1, 2, 3, 5, 6, 7, 9, 13 from this series?

I already had patch 6 queued on my end:

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

Next 9p PR end of this week. But if somebody else is faster then I'll just
drop it later on.

Best regards,
Christian Schoenebeck
Alex Bennée Oct. 18, 2022, 3:59 p.m. UTC | #5
Bin Meng <bmeng.cn@gmail.com> writes:

> Hi Alex,
>
> On Fri, Oct 7, 2022 at 1:31 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>>
>> On Fri, Oct 7, 2022 at 4:35 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>> >
>> >
>> > Bin Meng <bmeng.cn@gmail.com> writes:
>> >
>> > > In preparation to adding virtio-9p support on Windows, this series
>> > > enables running qtest on Windows, so that we can run the virtio-9p
>> > > tests on Windows to make sure it does not break accidently.
>> >
>> > I'm happy to take this whole series through my testing/next however I
>> > don't have working CI for the month so need to wait for my minutes to
>> > reset. Have you done a full CI run* with this?
>> >
>>
>> Yes, gitlab CI passed.
>>
>> > (*make sure any CI run is only on a repo forked from
>> > https://gitlab.com/qemu-project as you won't get the discount cost
>> > factor otherwise)
>> >
>
> Patch 4 and 10 are already applied in the mainline by Thomas.
>
> Daniel will queue patch 14, 15, 16.
>
> Could you please help queue patch 1, 2, 3, 5, 6, 7, 9, 13 from this
> series?

I've queued those except 13 into my testing/next. There was a merge
failure so I guess a dependency on another patch?

>
> I will rework the rest of the patches.
>
> Regards,
> Bin
Bin Meng Oct. 19, 2022, 7:07 a.m. UTC | #6
On Wed, Oct 19, 2022 at 12:00 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Bin Meng <bmeng.cn@gmail.com> writes:
>
> > Hi Alex,
> >
> > On Fri, Oct 7, 2022 at 1:31 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >>
> >> On Fri, Oct 7, 2022 at 4:35 AM Alex Bennée <alex.bennee@linaro.org> wrote:
> >> >
> >> >
> >> > Bin Meng <bmeng.cn@gmail.com> writes:
> >> >
> >> > > In preparation to adding virtio-9p support on Windows, this series
> >> > > enables running qtest on Windows, so that we can run the virtio-9p
> >> > > tests on Windows to make sure it does not break accidently.
> >> >
> >> > I'm happy to take this whole series through my testing/next however I
> >> > don't have working CI for the month so need to wait for my minutes to
> >> > reset. Have you done a full CI run* with this?
> >> >
> >>
> >> Yes, gitlab CI passed.
> >>
> >> > (*make sure any CI run is only on a repo forked from
> >> > https://gitlab.com/qemu-project as you won't get the discount cost
> >> > factor otherwise)
> >> >
> >
> > Patch 4 and 10 are already applied in the mainline by Thomas.
> >
> > Daniel will queue patch 14, 15, 16.
> >
> > Could you please help queue patch 1, 2, 3, 5, 6, 7, 9, 13 from this
> > series?
>
> I've queued those except 13 into my testing/next. There was a merge
> failure so I guess a dependency on another patch?
>

Thank you Alex.

Indeed patch 13 depends on a previous patch. Please ignore. I will
rebase in the next version.

Regards,
Bin