mbox series

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

Message ID 20201013143806.14321-1-cfontana@suse.de (mailing list archive)
Headers show
Series unbreak non-tcg builds | expand

Message

Claudio Fontana Oct. 13, 2020, 2:38 p.m. UTC
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

Comments

Philippe Mathieu-Daudé Oct. 13, 2020, 2:55 p.m. UTC | #1
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 :)))
Claudio Fontana Oct. 13, 2020, 4:47 p.m. UTC | #2
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
Claudio Fontana Oct. 26, 2020, 3:28 p.m. UTC | #3
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
Claudio Fontana Oct. 26, 2020, 3:34 p.m. UTC | #4
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
>
Claudio Fontana Jan. 10, 2021, 5:51 p.m. UTC | #5
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