[PATCH v3 0/3] unbreak non-tcg builds

Claudio Fontana posted 3 patches 3 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201013143806.14321-1-cfontana@suse.de
Maintainers: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Max Reitz <mreitz@redhat.com>, Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>, Juan Quintela <quintela@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Markus Armbruster <armbru@redhat.com>, Thomas Huth <thuth@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Peter Lieven <pl@kamp.de>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, Igor Mammedov <imammedo@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Fam Zheng <fam@euphon.net>, Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>, Jason Wang <jasowang@redhat.com>, Jason Dillaman <dillaman@redhat.com>
There is a newer version of this series
block/block-backend.c          |  9 ++--
block/io.c                     | 52 ++++++++++++------
block/iscsi.c                  |  5 +-
block/meson.build              |  3 +-
block/nfs.c                    |  6 +--
block/null.c                   |  4 +-
block/nvme.c                   |  6 +--
block/rbd.c                    |  5 +-
hw/ide/core.c                  |  8 +--
hw/ide/ioport.c                |  1 -
include/block/block.h          | 29 ++++++++++
migration/savevm.c             | 11 ++--
net/meson.build                |  3 +-
replay/meson.build             |  2 +-
replay/replay-events.c         | 20 +++----
replay/replay-input.c          |  4 +-
stubs/meson.build              |  1 -
stubs/replay-user.c            |  9 ----
stubs/replay.c                 | 96 ++++++++++++++++++++++++++++++++++
tests/Makefile.include         |  2 +-
tests/ptimer-test-stubs.c      |  5 --
tests/qtest/bios-tables-test.c | 10 ++++
tests/qtest/qmp-cmd-test.c     |  3 ++
ui/input.c                     | 12 ++++-
24 files changed, 223 insertions(+), 83 deletions(-)
delete mode 100644 stubs/replay-user.c
[PATCH v3 0/3] unbreak non-tcg builds
Posted by Claudio Fontana 3 years, 6 months ago
This series now unbreaks current non-tcg builds
(!CONFIG_TCG).

tests Makefiles need to avoid relying on all non-native
archs binaries to be present,

bios-tables-test needs to skip tests that are tcg-only,

and notably the replay framework needs to consider that
it might not be functional (or its code present at all)
without TCG.

Tested ok target x86_64-softmmu on x86_64 host with:

./configure --enable-tcg --disable-kvm
./configure --enable-kvm --disable-tcg
./configure --enable-tcg --enable-kvm

running make check-qtest

v2 => v3:

* do not alter the replay api, provide a block wrapper
instead to call into replay events handling
or the normal call flow depending on whether replay events are enabled.

v1: initial RFC


Claudio Fontana (2):
  qtest: unbreak non-TCG builds in bios-tables-test
  replay: do not build if TCG is not available

Paolo Bonzini (1):
  tests/Makefile.include: unbreak non-tcg builds

 block/block-backend.c          |  9 ++--
 block/io.c                     | 52 ++++++++++++------
 block/iscsi.c                  |  5 +-
 block/meson.build              |  3 +-
 block/nfs.c                    |  6 +--
 block/null.c                   |  4 +-
 block/nvme.c                   |  6 +--
 block/rbd.c                    |  5 +-
 hw/ide/core.c                  |  8 +--
 hw/ide/ioport.c                |  1 -
 include/block/block.h          | 29 ++++++++++
 migration/savevm.c             | 11 ++--
 net/meson.build                |  3 +-
 replay/meson.build             |  2 +-
 replay/replay-events.c         | 20 +++----
 replay/replay-input.c          |  4 +-
 stubs/meson.build              |  1 -
 stubs/replay-user.c            |  9 ----
 stubs/replay.c                 | 96 ++++++++++++++++++++++++++++++++++
 tests/Makefile.include         |  2 +-
 tests/ptimer-test-stubs.c      |  5 --
 tests/qtest/bios-tables-test.c | 10 ++++
 tests/qtest/qmp-cmd-test.c     |  3 ++
 ui/input.c                     | 12 ++++-
 24 files changed, 223 insertions(+), 83 deletions(-)
 delete mode 100644 stubs/replay-user.c

-- 
2.26.2


Re: [PATCH v3 0/3] unbreak non-tcg builds
Posted by Philippe Mathieu-Daudé 3 years, 6 months ago
On 10/13/20 4:38 PM, Claudio Fontana wrote:
> This series now unbreaks current non-tcg builds
> (!CONFIG_TCG).
> 
> tests Makefiles need to avoid relying on all non-native
> archs binaries to be present,
> 
> bios-tables-test needs to skip tests that are tcg-only,
> 
> and notably the replay framework needs to consider that
> it might not be functional (or its code present at all)
> without TCG.
> 
> Tested ok target x86_64-softmmu on x86_64 host with:
> 
> ./configure --enable-tcg --disable-kvm
> ./configure --enable-kvm --disable-tcg
> ./configure --enable-tcg --enable-kvm

If you want to avoid these configurations to bitrot,
consider covering them by adding Gitlab jobs :)))


Re: [PATCH v3 0/3] unbreak non-tcg builds
Posted by Claudio Fontana 3 years, 6 months ago
On 10/13/20 4:55 PM, Philippe Mathieu-Daudé wrote:
> On 10/13/20 4:38 PM, Claudio Fontana wrote:
>> This series now unbreaks current non-tcg builds
>> (!CONFIG_TCG).
>>
>> tests Makefiles need to avoid relying on all non-native
>> archs binaries to be present,
>>
>> bios-tables-test needs to skip tests that are tcg-only,
>>
>> and notably the replay framework needs to consider that
>> it might not be functional (or its code present at all)
>> without TCG.
>>
>> Tested ok target x86_64-softmmu on x86_64 host with:
>>
>> ./configure --enable-tcg --disable-kvm
>> ./configure --enable-kvm --disable-tcg
>> ./configure --enable-tcg --enable-kvm
> 
> If you want to avoid these configurations to bitrot,
> consider covering them by adding Gitlab jobs :)))
> 
> 

That would be, providing a patch to  .travis.yml right?

I guess -j parameter for make is automatically provided depending on infra resources?

Something like the following?

Ciao,

C

diff --git a/.travis.yml b/.travis.yml
index 1054ec5d29..49ec615ed8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -320,6 +320,19 @@ jobs:
         - TEST_CMD="make check-tcg"
         - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
 
+    # Check modular accelerator builds.
+    - name: "modular accelerator builds (x86_64-softmmu, tcg only)"
+      env:
+        - CONFIG="--disable-kvm --enable-tcg --target-list=x86_64-softmmu"
+        - TEST_BUILD_CMD="make"
+        - TEST_CMD="make check"
+
+    - name: "modular accelerator builds (x86_64-softmmu, kvm only)"
+      env:
+        - CONFIG="--enable-kvm --disable-tcg --target-list=x86_64-softmmu"
+        - TEST_BUILD_CMD="make"
+        - TEST_CMD="make check"
+
     - name: "[aarch64] GCC check-tcg"
       arch: arm64
       dist: focal

Re: [PATCH v3 0/3] unbreak non-tcg builds
Posted by Daniel P. Berrangé 3 years, 6 months ago
On Tue, Oct 13, 2020 at 06:47:42PM +0200, Claudio Fontana wrote:
> On 10/13/20 4:55 PM, Philippe Mathieu-Daudé wrote:
> > On 10/13/20 4:38 PM, Claudio Fontana wrote:
> >> This series now unbreaks current non-tcg builds
> >> (!CONFIG_TCG).
> >>
> >> tests Makefiles need to avoid relying on all non-native
> >> archs binaries to be present,
> >>
> >> bios-tables-test needs to skip tests that are tcg-only,
> >>
> >> and notably the replay framework needs to consider that
> >> it might not be functional (or its code present at all)
> >> without TCG.
> >>
> >> Tested ok target x86_64-softmmu on x86_64 host with:
> >>
> >> ./configure --enable-tcg --disable-kvm
> >> ./configure --enable-kvm --disable-tcg
> >> ./configure --enable-tcg --enable-kvm
> > 
> > If you want to avoid these configurations to bitrot,
> > consider covering them by adding Gitlab jobs :)))
> > 
> > 
> 
> That would be, providing a patch to  .travis.yml right?

Adding more jobs to Travis is discouraged. GitLab CI is our preferred
CI platform wherever possible. Others are only used where GitLab doesn't
support the required feature.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH v3 0/3] unbreak non-tcg builds
Posted by Claudio Fontana 3 years, 6 months ago
On 10/13/20 4:55 PM, Philippe Mathieu-Daudé wrote:
> On 10/13/20 4:38 PM, Claudio Fontana wrote:
>> This series now unbreaks current non-tcg builds
>> (!CONFIG_TCG).
>>
>> tests Makefiles need to avoid relying on all non-native
>> archs binaries to be present,
>>
>> bios-tables-test needs to skip tests that are tcg-only,
>>
>> and notably the replay framework needs to consider that
>> it might not be functional (or its code present at all)
>> without TCG.
>>
>> Tested ok target x86_64-softmmu on x86_64 host with:
>>
>> ./configure --enable-tcg --disable-kvm
>> ./configure --enable-kvm --disable-tcg
>> ./configure --enable-tcg --enable-kvm
> 
> If you want to avoid these configurations to bitrot,
> consider covering them by adding Gitlab jobs :)))
> 
> 

Hi Philippe and all,

latest master now has all the fixes discussed in these series, thanks also to Paolo's help with sorting out the stubs.

Already there is a new breakage though it seems, this time in qmp-cmd-test.

So adding CI coverage seems necessary.

In the .gitlab-ci.yml I see:

build-tcg-disabled:
[...]
    - ../configure --disable-tcg --audio-drv-list="" || { cat config.log meson-logs/meson-log.txt && exit 1; }

So is this supposed to be covered already?

I am confused also by the fact that it seems that suddently I see much "less" stuff in the gitlab CI, did I miss some infra discussion?

Thanks,

Claudio


Re: [PATCH v3 0/3] unbreak non-tcg builds
Posted by Claudio Fontana 3 years, 6 months ago
On 10/26/20 4:28 PM, Claudio Fontana wrote:
> On 10/13/20 4:55 PM, Philippe Mathieu-Daudé wrote:
>> On 10/13/20 4:38 PM, Claudio Fontana wrote:
>>> This series now unbreaks current non-tcg builds
>>> (!CONFIG_TCG).
>>>
>>> tests Makefiles need to avoid relying on all non-native
>>> archs binaries to be present,
>>>
>>> bios-tables-test needs to skip tests that are tcg-only,
>>>
>>> and notably the replay framework needs to consider that
>>> it might not be functional (or its code present at all)
>>> without TCG.
>>>
>>> Tested ok target x86_64-softmmu on x86_64 host with:
>>>
>>> ./configure --enable-tcg --disable-kvm
>>> ./configure --enable-kvm --disable-tcg
>>> ./configure --enable-tcg --enable-kvm
>>
>> If you want to avoid these configurations to bitrot,
>> consider covering them by adding Gitlab jobs :)))
>>
>>
> 
> Hi Philippe and all,
> 
> latest master now has all the fixes discussed in these series, thanks also to Paolo's help with sorting out the stubs.
> 
> Already there is a new breakage though it seems, this time in qmp-cmd-test.


Sorry, this is wrong. The changes are not in master yet, that's why stuff breaks (errors from replay qmp commands).


> 
> So adding CI coverage seems necessary.
> 

This is still probably a good idea.

Ciao,

C

> In the .gitlab-ci.yml I see:
> 
> build-tcg-disabled:
> [...]
>     - ../configure --disable-tcg --audio-drv-list="" || { cat config.log meson-logs/meson-log.txt && exit 1; }
> 
> So is this supposed to be covered already?
> 
> I am confused also by the fact that it seems that suddently I see much "less" stuff in the gitlab CI, did I miss some infra discussion?
> 
> Thanks,
> 
> Claudio
> 


Re: [PATCH v3 0/3] unbreak non-tcg builds
Posted by Claudio Fontana 3 years, 3 months ago
On 10/13/20 4:55 PM, Philippe Mathieu-Daudé wrote:
> On 10/13/20 4:38 PM, Claudio Fontana wrote:
>> This series now unbreaks current non-tcg builds
>> (!CONFIG_TCG).
>>
>> tests Makefiles need to avoid relying on all non-native
>> archs binaries to be present,
>>
>> bios-tables-test needs to skip tests that are tcg-only,
>>
>> and notably the replay framework needs to consider that
>> it might not be functional (or its code present at all)
>> without TCG.
>>
>> Tested ok target x86_64-softmmu on x86_64 host with:
>>
>> ./configure --enable-tcg --disable-kvm
>> ./configure --enable-kvm --disable-tcg
>> ./configure --enable-tcg --enable-kvm
> 
> If you want to avoid these configurations to bitrot,
> consider covering them by adding Gitlab jobs :)))
> 

Hello Philippe,

happy new year,

I am going back to look at the current code in master, slowly trying to get back a hold on things,
and I remember some time ago you suggested to keep testing "tools" builds,

with

./configure --disable-tcg --disable-kvm --enable-tools

but the drawback of the "tools-only" build is that currently one cannot run make check on it.

It fails with ERRORS in bios-tables-test and others.

Is it supposed to actually work? Is there any make check work that can be done without any accelerator?
I would assume so...

Thanks,

Claudio