[PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches

Thomas Huth posted 10 patches 2 years, 11 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210503104456.1036472-1-thuth@redhat.com
Maintainers: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Aurelien Jarno <aurelien@aurel32.net>, Wenchao Wang <wenchao.wang@intel.com>, Colin Xu <colin.xu@intel.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Roman Bolshakov <r.bolshakov@yadro.com>, Peter Maydell <peter.maydell@linaro.org>, Eric Blake <eblake@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Sunil Muthuswamy <sunilmut@microsoft.com>, Markus Armbruster <armbru@redhat.com>, Cameron Esfahani <dirty@apple.com>, Eduardo Habkost <ehabkost@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Willian Rampazzo <willianr@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Alex Bennée" <alex.bennee@linaro.org>
.gitlab-ci.d/containers.yml                        |  76 +-
.gitlab-ci.yml                                     | 110 +--
MAINTAINERS                                        |   8 -
default-configs/devices/moxie-softmmu.mak          |   5 -
default-configs/targets/moxie-softmmu.mak          |   2 -
disas/meson.build                                  |   1 -
disas/moxie.c                                      | 360 ---------
docs/devel/qgraph.rst                              |  58 ++
docs/system/deprecated.rst                         |   8 -
docs/system/removed-features.rst                   |   7 +
fpu/softfloat-specialize.c.inc                     |   2 +-
hw/Kconfig                                         |   1 -
hw/meson.build                                     |   1 -
hw/moxie/Kconfig                                   |   3 -
hw/moxie/meson.build                               |   4 -
hw/moxie/moxiesim.c                                | 157 ----
include/disas/dis-asm.h                            |   1 -
include/elf.h                                      |   3 -
include/exec/poison.h                              |   6 +-
include/hw/elf_ops.h                               |   8 -
include/sysemu/arch_init.h                         |   1 -
include/sysemu/hax.h                               |   4 +
include/sysemu/hvf.h                               |   4 +
include/sysemu/whpx.h                              |   4 +
meson.build                                        |   1 -
qapi/machine.json                                  |   2 +-
qapi/misc-target.json                              |   2 +-
softmmu/arch_init.c                                |   2 -
target/meson.build                                 |   1 -
target/moxie/cpu-param.h                           |  17 -
target/moxie/cpu.c                                 | 161 ----
target/moxie/cpu.h                                 | 123 ---
target/moxie/helper.c                              | 120 ---
target/moxie/helper.h                              |   5 -
target/moxie/machine.c                             |  19 -
target/moxie/machine.h                             |   1 -
target/moxie/meson.build                           |  14 -
target/moxie/mmu.c                                 |  32 -
target/moxie/mmu.h                                 |  19 -
target/moxie/translate.c                           | 892 ---------------------
tests/docker/dockerfiles/alpine.docker             |   1 +
tests/docker/dockerfiles/fedora-i386-cross.docker  |   1 +
tests/docker/dockerfiles/fedora-win32-cross.docker |   1 +
tests/docker/dockerfiles/fedora-win64-cross.docker |   1 +
tests/docker/dockerfiles/opensuse-leap.docker      |   1 +
tests/qtest/boot-serial-test.c                     |   8 -
tests/qtest/libqos/qgraph.c                        |   2 +-
tests/qtest/libqtest.c                             |   9 +-
tests/qtest/machine-none-test.c                    |   1 -
tests/qtest/meson.build                            |   2 -
util/compatfd.c                                    |   8 +-
51 files changed, 193 insertions(+), 2087 deletions(-)
delete mode 100644 default-configs/devices/moxie-softmmu.mak
delete mode 100644 default-configs/targets/moxie-softmmu.mak
delete mode 100644 disas/moxie.c
delete mode 100644 hw/moxie/Kconfig
delete mode 100644 hw/moxie/meson.build
delete mode 100644 hw/moxie/moxiesim.c
delete mode 100644 target/moxie/cpu-param.h
delete mode 100644 target/moxie/cpu.c
delete mode 100644 target/moxie/cpu.h
delete mode 100644 target/moxie/helper.c
delete mode 100644 target/moxie/helper.h
delete mode 100644 target/moxie/machine.c
delete mode 100644 target/moxie/machine.h
delete mode 100644 target/moxie/meson.build
delete mode 100644 target/moxie/mmu.c
delete mode 100644 target/moxie/mmu.h
delete mode 100644 target/moxie/translate.c
[PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Thomas Huth 2 years, 11 months ago
 Hi Peter,

the following changes since commit 53c5433e84e8935abed8e91d4a2eb813168a0ecf:

  Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210501' into staging (2021-05-02 12:02:46 +0100)

are available in the Git repository at:

  https://gitlab.com/thuth/qemu.git tags/pull-request-2021-05-03

for you to fetch changes up to 8f582fa290e5d5d0a00db23eaf1ab1bb3d3ae68d:

  util/compatfd.c: Replaced a malloc call with g_malloc. (2021-05-03 11:40:40 +0200)

----------------------------------------------------------------
* Removal of the deprecated moxie target
* Replace some YAML anchors by "extends" in the Gitlab-CI
* Some small improvements for using the qtests
* Some other small misc patches
----------------------------------------------------------------

Mahmoud Mandour (1):
      util/compatfd.c: Replaced a malloc call with g_malloc.

Philippe Mathieu-Daudé (3):
      gitlab-ci: Replace YAML anchors by extends (container_job)
      gitlab-ci: Replace YAML anchors by extends (native_build_job)
      gitlab-ci: Replace YAML anchors by extends (native_test_job)

Stefan Hajnoczi (3):
      libqos/qgraph: fix "UNAVAILBLE" typo
      docs/devel/qgraph: add troubleshooting information
      libqtest: refuse QTEST_QEMU_BINARY=qemu-kvm

Thomas Huth (3):
      Remove the deprecated moxie target
      tests/docker/dockerfiles: Add ccache to containers where it was missing
      include/sysemu: Poison all accelerator CONFIG switches in common code

 .gitlab-ci.d/containers.yml                        |  76 +-
 .gitlab-ci.yml                                     | 110 +--
 MAINTAINERS                                        |   8 -
 default-configs/devices/moxie-softmmu.mak          |   5 -
 default-configs/targets/moxie-softmmu.mak          |   2 -
 disas/meson.build                                  |   1 -
 disas/moxie.c                                      | 360 ---------
 docs/devel/qgraph.rst                              |  58 ++
 docs/system/deprecated.rst                         |   8 -
 docs/system/removed-features.rst                   |   7 +
 fpu/softfloat-specialize.c.inc                     |   2 +-
 hw/Kconfig                                         |   1 -
 hw/meson.build                                     |   1 -
 hw/moxie/Kconfig                                   |   3 -
 hw/moxie/meson.build                               |   4 -
 hw/moxie/moxiesim.c                                | 157 ----
 include/disas/dis-asm.h                            |   1 -
 include/elf.h                                      |   3 -
 include/exec/poison.h                              |   6 +-
 include/hw/elf_ops.h                               |   8 -
 include/sysemu/arch_init.h                         |   1 -
 include/sysemu/hax.h                               |   4 +
 include/sysemu/hvf.h                               |   4 +
 include/sysemu/whpx.h                              |   4 +
 meson.build                                        |   1 -
 qapi/machine.json                                  |   2 +-
 qapi/misc-target.json                              |   2 +-
 softmmu/arch_init.c                                |   2 -
 target/meson.build                                 |   1 -
 target/moxie/cpu-param.h                           |  17 -
 target/moxie/cpu.c                                 | 161 ----
 target/moxie/cpu.h                                 | 123 ---
 target/moxie/helper.c                              | 120 ---
 target/moxie/helper.h                              |   5 -
 target/moxie/machine.c                             |  19 -
 target/moxie/machine.h                             |   1 -
 target/moxie/meson.build                           |  14 -
 target/moxie/mmu.c                                 |  32 -
 target/moxie/mmu.h                                 |  19 -
 target/moxie/translate.c                           | 892 ---------------------
 tests/docker/dockerfiles/alpine.docker             |   1 +
 tests/docker/dockerfiles/fedora-i386-cross.docker  |   1 +
 tests/docker/dockerfiles/fedora-win32-cross.docker |   1 +
 tests/docker/dockerfiles/fedora-win64-cross.docker |   1 +
 tests/docker/dockerfiles/opensuse-leap.docker      |   1 +
 tests/qtest/boot-serial-test.c                     |   8 -
 tests/qtest/libqos/qgraph.c                        |   2 +-
 tests/qtest/libqtest.c                             |   9 +-
 tests/qtest/machine-none-test.c                    |   1 -
 tests/qtest/meson.build                            |   2 -
 util/compatfd.c                                    |   8 +-
 51 files changed, 193 insertions(+), 2087 deletions(-)
 delete mode 100644 default-configs/devices/moxie-softmmu.mak
 delete mode 100644 default-configs/targets/moxie-softmmu.mak
 delete mode 100644 disas/moxie.c
 delete mode 100644 hw/moxie/Kconfig
 delete mode 100644 hw/moxie/meson.build
 delete mode 100644 hw/moxie/moxiesim.c
 delete mode 100644 target/moxie/cpu-param.h
 delete mode 100644 target/moxie/cpu.c
 delete mode 100644 target/moxie/cpu.h
 delete mode 100644 target/moxie/helper.c
 delete mode 100644 target/moxie/helper.h
 delete mode 100644 target/moxie/machine.c
 delete mode 100644 target/moxie/machine.h
 delete mode 100644 target/moxie/meson.build
 delete mode 100644 target/moxie/mmu.c
 delete mode 100644 target/moxie/mmu.h
 delete mode 100644 target/moxie/translate.c


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Peter Maydell 2 years, 11 months ago
On Mon, 3 May 2021 at 11:45, Thomas Huth <thuth@redhat.com> wrote:
>
>  Hi Peter,
>
> the following changes since commit 53c5433e84e8935abed8e91d4a2eb813168a0ecf:
>
>   Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210501' into staging (2021-05-02 12:02:46 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/thuth/qemu.git tags/pull-request-2021-05-03
>
> for you to fetch changes up to 8f582fa290e5d5d0a00db23eaf1ab1bb3d3ae68d:
>
>   util/compatfd.c: Replaced a malloc call with g_malloc. (2021-05-03 11:40:40 +0200)
>
> ----------------------------------------------------------------
> * Removal of the deprecated moxie target
> * Replace some YAML anchors by "extends" in the Gitlab-CI
> * Some small improvements for using the qtests
> * Some other small misc patches

This fails to build as an incremental (not from-clean) build:

make: Entering directory '/home/ubuntu/qemu/build/all'
/usr/bin/ninja -v build.ninja && touch build.ninja.stamp
(GIT="git" "/home/ubuntu/qemu/scripts/git-submodule.sh" update
ui/keycodemapdb tests/fp/berkeley-testfloat-3
tests/fp/berkeley-softfloat-3 meson dtc capstone slirp roms/SLOF)
[0/1] /usr/bin/python3 /home/ubuntu/qemu/meson/meson.py --internal
regenerate /home/ubuntu/qemu /home/ubuntu/qemu/build/all --backend
ninja
The Meson build system
Version: 0.55.3
Source dir: /home/ubuntu/qemu
Build dir: /home/ubuntu/qemu/build/all
Build type: native build
Project name: qemu
Project version: 6.0.50
C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu
7.5.0-3ubuntu1~18.04) 7.5.0")
C linker for the host machine: cc ld.bfd 2.30
Host machine cpu family: s390x
Host machine cpu: s390x
../../meson.build:10: WARNING: Module unstable-keyval has no backwards
or forwards compatibility and might not exist in future releases.
Program sh found: YES
Program python3 found: YES (/usr/bin/python3)
[...]
Checking for function "system" : YES (cached)
Checking for function "preadv" : YES (cached)
Program scripts/minikconf.py found: YES
Configuring aarch64-softmmu-config-target.h using configuration
Configuring aarch64-softmmu-config-devices.mak with command
Reading depfile:
/home/ubuntu/qemu/build/all/meson-private/aarch64-softmmu-config-devices.mak.d
Configuring aarch64-softmmu-config-devices.h using configuration
[...]
Reading depfile:
/home/ubuntu/qemu/build/all/meson-private/mipsel-softmmu-config-devices.mak.d
Configuring mipsel-softmmu-config-devices.h using configuration

../../meson.build:1291:2: ERROR: Failed to load
/home/ubuntu/qemu/default-configs/targets/moxie-softmmu.mak: [Errno 2]
No such file or directory:
'/home/ubuntu/qemu/default-configs/targets/moxie-softmmu.mak'

A full log can be found at /home/ubuntu/qemu/build/all/meson-logs/meson-log.txt
FAILED: build.ninja
/usr/bin/python3 /home/ubuntu/qemu/meson/meson.py --internal
regenerate /home/ubuntu/qemu /home/ubuntu/qemu/build/all --backend
ninja
ninja: error: rebuilding 'build.ninja': subcommand failed
/usr/bin/ninja -d keepdepfile -v     all | cat
make  -C pc-bios/s390-ccw/ V="1" TARGET_DIR="pc-bios/s390-ccw/" all
make[1]: Entering directory '/home/ubuntu/qemu/build/all/pc-bios/s390-ccw'
make[1]: Leaving directory '/home/ubuntu/qemu/build/all/pc-bios/s390-ccw'
[0/1] /usr/bin/python3 /home/ubuntu/qemu/meson/meson.py --internal
regenerate /home/ubuntu/qemu /home/ubuntu/qemu/build/all --backend
ninja
[...]
Reading depfile:
/home/ubuntu/qemu/build/all/meson-private/mipsel-softmmu-config-devices.mak.d
Configuring mipsel-softmmu-config-devices.h using configuration

../../meson.build:1291:2: ERROR: Failed to load
/home/ubuntu/qemu/default-configs/targets/moxie-softmmu.mak: [Errno 2]
No such file or directory:
'/home/ubuntu/qemu/default-configs/targets/moxie-softmmu.mak'

A full log can be found at /home/ubuntu/qemu/build/all/meson-logs/meson-log.txt
FAILED: build.ninja
/usr/bin/python3 /home/ubuntu/qemu/meson/meson.py --internal
regenerate /home/ubuntu/qemu /home/ubuntu/qemu/build/all --backend
ninja
ninja: error: rebuilding 'build.ninja': subcommand failed
Makefile:152: recipe for target 'run-ninja' failed
make: *** [run-ninja] Error 1
make: Leaving directory '/home/ubuntu/qemu/build/all'


thanks
-- PMM

Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Thomas Huth 2 years, 11 months ago
On 05/05/2021 20.06, Peter Maydell wrote:
> On Mon, 3 May 2021 at 11:45, Thomas Huth <thuth@redhat.com> wrote:
>>
>>   Hi Peter,
>>
>> the following changes since commit 53c5433e84e8935abed8e91d4a2eb813168a0ecf:
>>
>>    Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210501' into staging (2021-05-02 12:02:46 +0100)
>>
>> are available in the Git repository at:
>>
>>    https://gitlab.com/thuth/qemu.git tags/pull-request-2021-05-03
>>
>> for you to fetch changes up to 8f582fa290e5d5d0a00db23eaf1ab1bb3d3ae68d:
>>
>>    util/compatfd.c: Replaced a malloc call with g_malloc. (2021-05-03 11:40:40 +0200)
>>
>> ----------------------------------------------------------------
>> * Removal of the deprecated moxie target
>> * Replace some YAML anchors by "extends" in the Gitlab-CI
>> * Some small improvements for using the qtests
>> * Some other small misc patches
> 
> This fails to build as an incremental (not from-clean) build:
[...]
> ../../meson.build:1291:2: ERROR: Failed to load
> /home/ubuntu/qemu/default-configs/targets/moxie-softmmu.mak: [Errno 2]
> No such file or directory:
> '/home/ubuntu/qemu/default-configs/targets/moxie-softmmu.mak'

D'oh! I think I can work-around the problem with a patch like
this on top:

diff a/configure b/configure
--- a/configure
+++ b/configure
@@ -1686,6 +1686,11 @@ fi
  
  for config in $mak_wilds; do
      target="$(basename "$config" .mak)"
+    if [ "$target" = "moxie-softmmu" ]; then
+        # This is a work-around to make incremental builds pass after
+        # moxie-softmmu has been removed. It can be removed later.
+        continue
+    fi
      if echo "$target_list_exclude" | grep -vq "$target"; then
          default_target_list="${default_target_list} $target"
      fi
diff a/default-configs/targets/moxie-softmmu.mak b/default-configs/targets/moxie-softmmu.mak
new file mode 100644
index 0000000000..23fd596b66
--- /dev/null
+++ b/default-configs/targets/moxie-softmmu.mak
@@ -0,0 +1,2 @@
+# This is just a dummy file to avoid that incremental builds are failing.
+# It can be removed as soon as all builders have been updated.

Does that look acceptable? If yes, I'll respin my PR with that
squashed into the moxie patch.

  Thomas


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Peter Maydell 2 years, 11 months ago
On Thu, 6 May 2021 at 08:01, Thomas Huth <thuth@redhat.com> wrote:
>
> On 05/05/2021 20.06, Peter Maydell wrote:
> > On Mon, 3 May 2021 at 11:45, Thomas Huth <thuth@redhat.com> wrote:
> >>
> >>   Hi Peter,
> >>
> >> the following changes since commit 53c5433e84e8935abed8e91d4a2eb813168a0ecf:
> >>
> >>    Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210501' into staging (2021-05-02 12:02:46 +0100)
> >>
> >> are available in the Git repository at:
> >>
> >>    https://gitlab.com/thuth/qemu.git tags/pull-request-2021-05-03
> >>
> >> for you to fetch changes up to 8f582fa290e5d5d0a00db23eaf1ab1bb3d3ae68d:
> >>
> >>    util/compatfd.c: Replaced a malloc call with g_malloc. (2021-05-03 11:40:40 +0200)
> >>
> >> ----------------------------------------------------------------
> >> * Removal of the deprecated moxie target
> >> * Replace some YAML anchors by "extends" in the Gitlab-CI
> >> * Some small improvements for using the qtests
> >> * Some other small misc patches
> >
> > This fails to build as an incremental (not from-clean) build:
> [...]
> > ../../meson.build:1291:2: ERROR: Failed to load
> > /home/ubuntu/qemu/default-configs/targets/moxie-softmmu.mak: [Errno 2]
> > No such file or directory:
> > '/home/ubuntu/qemu/default-configs/targets/moxie-softmmu.mak'
>
> D'oh! I think I can work-around the problem with a patch like
> this on top:
>
> diff a/configure b/configure
> --- a/configure
> +++ b/configure
> @@ -1686,6 +1686,11 @@ fi
>
>   for config in $mak_wilds; do
>       target="$(basename "$config" .mak)"
> +    if [ "$target" = "moxie-softmmu" ]; then
> +        # This is a work-around to make incremental builds pass after
> +        # moxie-softmmu has been removed. It can be removed later.
> +        continue
> +    fi
>       if echo "$target_list_exclude" | grep -vq "$target"; then
>           default_target_list="${default_target_list} $target"
>       fi
> diff a/default-configs/targets/moxie-softmmu.mak b/default-configs/targets/moxie-softmmu.mak
> new file mode 100644
> index 0000000000..23fd596b66
> --- /dev/null
> +++ b/default-configs/targets/moxie-softmmu.mak
> @@ -0,0 +1,2 @@
> +# This is just a dummy file to avoid that incremental builds are failing.
> +# It can be removed as soon as all builders have been updated.
>
> Does that look acceptable? If yes, I'll respin my PR with that
> squashed into the moxie patch.

Ugly, but I guess so. It would be nice to fix the underlying cause, though:
meson/ninja should just DTRT if we remove a target. We have a couple
of other target removals coming through as well...

thanks
-- PMM

Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Thomas Huth 2 years, 11 months ago
On 06/05/2021 09.38, Peter Maydell wrote:
> On Thu, 6 May 2021 at 08:01, Thomas Huth <thuth@redhat.com> wrote:
>>
>> On 05/05/2021 20.06, Peter Maydell wrote:
>>> On Mon, 3 May 2021 at 11:45, Thomas Huth <thuth@redhat.com> wrote:
>>>>
>>>>    Hi Peter,
>>>>
>>>> the following changes since commit 53c5433e84e8935abed8e91d4a2eb813168a0ecf:
>>>>
>>>>     Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210501' into staging (2021-05-02 12:02:46 +0100)
>>>>
>>>> are available in the Git repository at:
>>>>
>>>>     https://gitlab.com/thuth/qemu.git tags/pull-request-2021-05-03
>>>>
>>>> for you to fetch changes up to 8f582fa290e5d5d0a00db23eaf1ab1bb3d3ae68d:
>>>>
>>>>     util/compatfd.c: Replaced a malloc call with g_malloc. (2021-05-03 11:40:40 +0200)
>>>>
>>>> ----------------------------------------------------------------
>>>> * Removal of the deprecated moxie target
>>>> * Replace some YAML anchors by "extends" in the Gitlab-CI
>>>> * Some small improvements for using the qtests
>>>> * Some other small misc patches
>>>
>>> This fails to build as an incremental (not from-clean) build:
>> [...]
>>> ../../meson.build:1291:2: ERROR: Failed to load
>>> /home/ubuntu/qemu/default-configs/targets/moxie-softmmu.mak: [Errno 2]
>>> No such file or directory:
>>> '/home/ubuntu/qemu/default-configs/targets/moxie-softmmu.mak'
>>
>> D'oh! I think I can work-around the problem with a patch like
>> this on top:
>>
>> diff a/configure b/configure
>> --- a/configure
>> +++ b/configure
>> @@ -1686,6 +1686,11 @@ fi
>>
>>    for config in $mak_wilds; do
>>        target="$(basename "$config" .mak)"
>> +    if [ "$target" = "moxie-softmmu" ]; then
>> +        # This is a work-around to make incremental builds pass after
>> +        # moxie-softmmu has been removed. It can be removed later.
>> +        continue
>> +    fi
>>        if echo "$target_list_exclude" | grep -vq "$target"; then
>>            default_target_list="${default_target_list} $target"
>>        fi
>> diff a/default-configs/targets/moxie-softmmu.mak b/default-configs/targets/moxie-softmmu.mak
>> new file mode 100644
>> index 0000000000..23fd596b66
>> --- /dev/null
>> +++ b/default-configs/targets/moxie-softmmu.mak
>> @@ -0,0 +1,2 @@
>> +# This is just a dummy file to avoid that incremental builds are failing.
>> +# It can be removed as soon as all builders have been updated.
>>
>> Does that look acceptable? If yes, I'll respin my PR with that
>> squashed into the moxie patch.
> 
> Ugly, but I guess so. It would be nice to fix the underlying cause, though:
> meson/ninja should just DTRT if we remove a target. We have a couple
> of other target removals coming through as well...

Ok, after having another close look, I think the main problem here is that
"configure" does not get re-run, and thus a wrong set of TARGET_DIRS get
supplied to meson. I think this should fix it:

diff --git a/Makefile b/Makefile
index bcbbec71a1..3088502329 100644
--- a/Makefile
+++ b/Makefile
@@ -85,7 +85,8 @@ x := $(shell rm -rf meson-private meson-info meson-logs)
  endif
  
  # 1. ensure config-host.mak is up-to-date
-config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
+config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION \
+                $(SRC_PATH)/default-configs/targets
         @echo config-host.mak is out-of-date, running configure
         @if test -f meson-private/coredata.dat; then \
           ./config.status --skip-meson; \

I.e. re-run configure if somethings in default-configs/targets changed.
Does that look sane?

  Thomas


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Paolo Bonzini 2 years, 11 months ago
On 07/05/21 11:45, Thomas Huth wrote:
> 
> 
> diff --git a/Makefile b/Makefile
> index bcbbec71a1..3088502329 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -85,7 +85,8 @@ x := $(shell rm -rf meson-private meson-info meson-logs)
>   endif
> 
>   # 1. ensure config-host.mak is up-to-date
> -config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios 
> $(SRC_PATH)/VERSION
> +config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios 
> $(SRC_PATH)/VERSION \
> +                $(SRC_PATH)/default-configs/targets
>          @echo config-host.mak is out-of-date, running configure
>          @if test -f meson-private/coredata.dat; then \
>            ./config.status --skip-meson; \
> 
> I.e. re-run configure if somethings in default-configs/targets changed.
> Does that look sane?

I am not sure if using a directory is reliable (it's pre-existing for
pc-bios).  However you probably can use

# currently in tests/Makefile.include, move it to toplevel Makefile
TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets)))
config-host.mak: $(SRC_PATH)/configure $(TARGETS:%=default-configs/targets/%)

And then if a file goes missing it will trigger the rebuild of config-host.mak.

Paolo


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Thomas Huth 2 years, 11 months ago
On 07/05/2021 14.41, Paolo Bonzini wrote:
> On 07/05/21 11:45, Thomas Huth wrote:
>>
>>
>> diff --git a/Makefile b/Makefile
>> index bcbbec71a1..3088502329 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -85,7 +85,8 @@ x := $(shell rm -rf meson-private meson-info meson-logs)
>>   endif
>>
>>   # 1. ensure config-host.mak is up-to-date
>> -config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios 
>> $(SRC_PATH)/VERSION
>> +config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios 
>> $(SRC_PATH)/VERSION \
>> +                $(SRC_PATH)/default-configs/targets
>>          @echo config-host.mak is out-of-date, running configure
>>          @if test -f meson-private/coredata.dat; then \
>>            ./config.status --skip-meson; \
>>
>> I.e. re-run configure if somethings in default-configs/targets changed.
>> Does that look sane?
> 
> I am not sure if using a directory is reliable (it's pre-existing for
> pc-bios).  However you probably can use
> 
> # currently in tests/Makefile.include, move it to toplevel Makefile
> TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets)))
> config-host.mak: $(SRC_PATH)/configure $(TARGETS:%=default-configs/targets/%)
> 
> And then if a file goes missing it will trigger the rebuild of config-host.mak.

Sounds like an idea, too ... but I'm unsure whether it's doable due to the 
order of the statements there... TARGETS gets populated from ninja-targets, 
but ninja-targets gets set *after* the config-host.mak block ... would it be 
safe to move the config-host.mak block around?

  Thomas


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Philippe Mathieu-Daudé 2 years, 11 months ago
On 5/9/21 6:05 PM, Thomas Huth wrote:
> On 07/05/2021 14.41, Paolo Bonzini wrote:
>> On 07/05/21 11:45, Thomas Huth wrote:
>>>
>>>
>>> diff --git a/Makefile b/Makefile
>>> index bcbbec71a1..3088502329 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -85,7 +85,8 @@ x := $(shell rm -rf meson-private meson-info
>>> meson-logs)
>>>   endif
>>>
>>>   # 1. ensure config-host.mak is up-to-date
>>> -config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios
>>> $(SRC_PATH)/VERSION
>>> +config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios
>>> $(SRC_PATH)/VERSION \
>>> +                $(SRC_PATH)/default-configs/targets
>>>          @echo config-host.mak is out-of-date, running configure
>>>          @if test -f meson-private/coredata.dat; then \
>>>            ./config.status --skip-meson; \
>>>
>>> I.e. re-run configure if somethings in default-configs/targets changed.
>>> Does that look sane?
>>
>> I am not sure if using a directory is reliable (it's pre-existing for
>> pc-bios).  However you probably can use
>>
>> # currently in tests/Makefile.include, move it to toplevel Makefile
>> TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
>> $(ninja-targets)))
>> config-host.mak: $(SRC_PATH)/configure
>> $(TARGETS:%=default-configs/targets/%)
>>
>> And then if a file goes missing it will trigger the rebuild of
>> config-host.mak.
> 
> Sounds like an idea, too ... but I'm unsure whether it's doable due to
> the order of the statements there... TARGETS gets populated from
> ninja-targets, but ninja-targets gets set *after* the config-host.mak
> block ... would it be safe to move the config-host.mak block around?

Not sure I understood Paolo's suggestion, I tried:

-- >8 --
diff --git a/Makefile b/Makefile
index bcbbec71a1c..3ef3622228b 100644
--- a/Makefile
+++ b/Makefile
@@ -152,6 +152,10 @@ ifneq ($(filter $(ninja-targets), $(ninja-cmd-goals)),)
        +$(quiet-@)$(if $(MAKE.nq),@:, $(NINJA) -d keepdepfile \
           $(NINJAFLAGS) $(sort $(filter $(ninja-targets),
$(ninja-cmd-goals))) | cat)
 endif
+
+TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
$(ninja-targets)))
+config-host.mak: $(SRC_PATH)/configure
$(TARGETS:%=default-configs/targets/%)
+
 endif

 # Force configure to re-run if the API symbols are updated
---

But still get (after git pull this morning):

$ ninja qemu-system-ppc
[0/1] Regenerating build files.
...
meson.build:1303:2: ERROR: Failed to load
default-configs/targets/moxie-softmmu.mak: [Errno 2] No such file or
directory: 'default-configs/targets/moxie-softmmu.mak'
A full log can be found at meson-logs/meson-log.txt
FAILED: build.ninja

I'm keeping the directory unmodified in case you want me to try
other fixes.


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Thomas Huth 2 years, 11 months ago
On 14/05/2021 12.22, Philippe Mathieu-Daudé wrote:
> On 5/9/21 6:05 PM, Thomas Huth wrote:
>> On 07/05/2021 14.41, Paolo Bonzini wrote:
>>> On 07/05/21 11:45, Thomas Huth wrote:
>>>>
>>>>
>>>> diff --git a/Makefile b/Makefile
>>>> index bcbbec71a1..3088502329 100644
>>>> --- a/Makefile
>>>> +++ b/Makefile
>>>> @@ -85,7 +85,8 @@ x := $(shell rm -rf meson-private meson-info
>>>> meson-logs)
>>>>    endif
>>>>
>>>>    # 1. ensure config-host.mak is up-to-date
>>>> -config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios
>>>> $(SRC_PATH)/VERSION
>>>> +config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios
>>>> $(SRC_PATH)/VERSION \
>>>> +                $(SRC_PATH)/default-configs/targets
>>>>           @echo config-host.mak is out-of-date, running configure
>>>>           @if test -f meson-private/coredata.dat; then \
>>>>             ./config.status --skip-meson; \
>>>>
>>>> I.e. re-run configure if somethings in default-configs/targets changed.
>>>> Does that look sane?
>>>
>>> I am not sure if using a directory is reliable (it's pre-existing for
>>> pc-bios).  However you probably can use
>>>
>>> # currently in tests/Makefile.include, move it to toplevel Makefile
>>> TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
>>> $(ninja-targets)))
>>> config-host.mak: $(SRC_PATH)/configure
>>> $(TARGETS:%=default-configs/targets/%)
>>>
>>> And then if a file goes missing it will trigger the rebuild of
>>> config-host.mak.
>>
>> Sounds like an idea, too ... but I'm unsure whether it's doable due to
>> the order of the statements there... TARGETS gets populated from
>> ninja-targets, but ninja-targets gets set *after* the config-host.mak
>> block ... would it be safe to move the config-host.mak block around?
> 
> Not sure I understood Paolo's suggestion, I tried:
> 
> -- >8 --
> diff --git a/Makefile b/Makefile
> index bcbbec71a1c..3ef3622228b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -152,6 +152,10 @@ ifneq ($(filter $(ninja-targets), $(ninja-cmd-goals)),)
>          +$(quiet-@)$(if $(MAKE.nq),@:, $(NINJA) -d keepdepfile \
>             $(NINJAFLAGS) $(sort $(filter $(ninja-targets),
> $(ninja-cmd-goals))) | cat)
>   endif
> +
> +TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
> $(ninja-targets)))
> +config-host.mak: $(SRC_PATH)/configure
> $(TARGETS:%=default-configs/targets/%)
> +
>   endif
> 
>   # Force configure to re-run if the API symbols are updated
> ---
> 
> But still get (after git pull this morning):
> 
> $ ninja qemu-system-ppc
> [0/1] Regenerating build files.
> ...
> meson.build:1303:2: ERROR: Failed to load
> default-configs/targets/moxie-softmmu.mak: [Errno 2] No such file or
> directory: 'default-configs/targets/moxie-softmmu.mak'
> A full log can be found at meson-logs/meson-log.txt
> FAILED: build.ninja
> 
> I'm keeping the directory unmodified in case you want me to try
> other fixes.

If you run ninja directly, you certainly won't fix this issue by patching 
the "Makefile" ;-)

  Thomas


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Philippe Mathieu-Daudé 2 years, 11 months ago
On 5/14/21 12:25 PM, Thomas Huth wrote:
> On 14/05/2021 12.22, Philippe Mathieu-Daudé wrote:
>> On 5/9/21 6:05 PM, Thomas Huth wrote:
>>> On 07/05/2021 14.41, Paolo Bonzini wrote:
>>>> On 07/05/21 11:45, Thomas Huth wrote:
>>>>>
>>>>>
>>>>> diff --git a/Makefile b/Makefile
>>>>> index bcbbec71a1..3088502329 100644
>>>>> --- a/Makefile
>>>>> +++ b/Makefile
>>>>> @@ -85,7 +85,8 @@ x := $(shell rm -rf meson-private meson-info
>>>>> meson-logs)
>>>>>    endif
>>>>>
>>>>>    # 1. ensure config-host.mak is up-to-date
>>>>> -config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios
>>>>> $(SRC_PATH)/VERSION
>>>>> +config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios
>>>>> $(SRC_PATH)/VERSION \
>>>>> +                $(SRC_PATH)/default-configs/targets
>>>>>           @echo config-host.mak is out-of-date, running configure
>>>>>           @if test -f meson-private/coredata.dat; then \
>>>>>             ./config.status --skip-meson; \
>>>>>
>>>>> I.e. re-run configure if somethings in default-configs/targets
>>>>> changed.
>>>>> Does that look sane?
>>>>
>>>> I am not sure if using a directory is reliable (it's pre-existing for
>>>> pc-bios).  However you probably can use
>>>>
>>>> # currently in tests/Makefile.include, move it to toplevel Makefile
>>>> TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
>>>> $(ninja-targets)))
>>>> config-host.mak: $(SRC_PATH)/configure
>>>> $(TARGETS:%=default-configs/targets/%)
>>>>
>>>> And then if a file goes missing it will trigger the rebuild of
>>>> config-host.mak.
>>>
>>> Sounds like an idea, too ... but I'm unsure whether it's doable due to
>>> the order of the statements there... TARGETS gets populated from
>>> ninja-targets, but ninja-targets gets set *after* the config-host.mak
>>> block ... would it be safe to move the config-host.mak block around?
>>
>> Not sure I understood Paolo's suggestion, I tried:
>>
>> -- >8 --
>> diff --git a/Makefile b/Makefile
>> index bcbbec71a1c..3ef3622228b 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -152,6 +152,10 @@ ifneq ($(filter $(ninja-targets),
>> $(ninja-cmd-goals)),)
>>          +$(quiet-@)$(if $(MAKE.nq),@:, $(NINJA) -d keepdepfile \
>>             $(NINJAFLAGS) $(sort $(filter $(ninja-targets),
>> $(ninja-cmd-goals))) | cat)
>>   endif
>> +
>> +TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
>> $(ninja-targets)))
>> +config-host.mak: $(SRC_PATH)/configure
>> $(TARGETS:%=default-configs/targets/%)
>> +
>>   endif
>>
>>   # Force configure to re-run if the API symbols are updated
>> ---
>>
>> But still get (after git pull this morning):
>>
>> $ ninja qemu-system-ppc
>> [0/1] Regenerating build files.
>> ...
>> meson.build:1303:2: ERROR: Failed to load
>> default-configs/targets/moxie-softmmu.mak: [Errno 2] No such file or
>> directory: 'default-configs/targets/moxie-softmmu.mak'
>> A full log can be found at meson-logs/meson-log.txt
>> FAILED: build.ninja
>>
>> I'm keeping the directory unmodified in case you want me to try
>> other fixes.
> 
> If you run ninja directly, you certainly won't fix this issue by
> patching the "Makefile" ;-)

OK... Not sure how to detect it from ninja then.

For now I'm blowing this builddir and start with a fresh one.

If we want to reproduce to fix we can checkout before/after your
pull request tag. Eventually it will be automagically fixed when
we'll remove the next target :)

Regards,

Phil.


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Thomas Huth 2 years, 11 months ago
On 20/05/2021 04.40, Philippe Mathieu-Daudé wrote:
> On 5/14/21 12:25 PM, Thomas Huth wrote:
>> On 14/05/2021 12.22, Philippe Mathieu-Daudé wrote:
>>> On 5/9/21 6:05 PM, Thomas Huth wrote:
>>>> On 07/05/2021 14.41, Paolo Bonzini wrote:
>>>>> On 07/05/21 11:45, Thomas Huth wrote:
>>>>>>
>>>>>>
>>>>>> diff --git a/Makefile b/Makefile
>>>>>> index bcbbec71a1..3088502329 100644
>>>>>> --- a/Makefile
>>>>>> +++ b/Makefile
>>>>>> @@ -85,7 +85,8 @@ x := $(shell rm -rf meson-private meson-info
>>>>>> meson-logs)
>>>>>>     endif
>>>>>>
>>>>>>     # 1. ensure config-host.mak is up-to-date
>>>>>> -config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios
>>>>>> $(SRC_PATH)/VERSION
>>>>>> +config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios
>>>>>> $(SRC_PATH)/VERSION \
>>>>>> +                $(SRC_PATH)/default-configs/targets
>>>>>>            @echo config-host.mak is out-of-date, running configure
>>>>>>            @if test -f meson-private/coredata.dat; then \
>>>>>>              ./config.status --skip-meson; \
>>>>>>
>>>>>> I.e. re-run configure if somethings in default-configs/targets
>>>>>> changed.
>>>>>> Does that look sane?
>>>>>
>>>>> I am not sure if using a directory is reliable (it's pre-existing for
>>>>> pc-bios).  However you probably can use
>>>>>
>>>>> # currently in tests/Makefile.include, move it to toplevel Makefile
>>>>> TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
>>>>> $(ninja-targets)))
>>>>> config-host.mak: $(SRC_PATH)/configure
>>>>> $(TARGETS:%=default-configs/targets/%)
>>>>>
>>>>> And then if a file goes missing it will trigger the rebuild of
>>>>> config-host.mak.
>>>>
>>>> Sounds like an idea, too ... but I'm unsure whether it's doable due to
>>>> the order of the statements there... TARGETS gets populated from
>>>> ninja-targets, but ninja-targets gets set *after* the config-host.mak
>>>> block ... would it be safe to move the config-host.mak block around?
>>>
>>> Not sure I understood Paolo's suggestion, I tried:
>>>
>>> -- >8 --
>>> diff --git a/Makefile b/Makefile
>>> index bcbbec71a1c..3ef3622228b 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -152,6 +152,10 @@ ifneq ($(filter $(ninja-targets),
>>> $(ninja-cmd-goals)),)
>>>           +$(quiet-@)$(if $(MAKE.nq),@:, $(NINJA) -d keepdepfile \
>>>              $(NINJAFLAGS) $(sort $(filter $(ninja-targets),
>>> $(ninja-cmd-goals))) | cat)
>>>    endif
>>> +
>>> +TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
>>> $(ninja-targets)))
>>> +config-host.mak: $(SRC_PATH)/configure
>>> $(TARGETS:%=default-configs/targets/%)
>>> +
>>>    endif
>>>
>>>    # Force configure to re-run if the API symbols are updated
>>> ---
>>>
>>> But still get (after git pull this morning):
>>>
>>> $ ninja qemu-system-ppc
>>> [0/1] Regenerating build files.
>>> ...
>>> meson.build:1303:2: ERROR: Failed to load
>>> default-configs/targets/moxie-softmmu.mak: [Errno 2] No such file or
>>> directory: 'default-configs/targets/moxie-softmmu.mak'
>>> A full log can be found at meson-logs/meson-log.txt
>>> FAILED: build.ninja
>>>
>>> I'm keeping the directory unmodified in case you want me to try
>>> other fixes.
>>
>> If you run ninja directly, you certainly won't fix this issue by
>> patching the "Makefile" ;-)
> 
> OK... Not sure how to detect it from ninja then.

Every time you pull, there could be changes to the "configure" script which 
affect the build ... I guess you also won't notice those when you're only 
compiling with ninja? Thus at least after pulling from upstream, I think you 
have to type "make" once at least.

  Thomas


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Paolo Bonzini 2 years, 11 months ago
On 20/05/21 07:08, Thomas Huth wrote:
>> OK... Not sure how to detect it from ninja then.
> 
> Every time you pull, there could be changes to the "configure" script 
> which affect the build ... I guess you also won't notice those when 
> you're only compiling with ninja? Thus at least after pulling from 
> upstream, I think you have to type "make" once at least.

Yes, and using "ninja" directly is not supported.

Paolo


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Philippe Mathieu-Daudé 2 years, 11 months ago
On 5/20/21 9:43 AM, Paolo Bonzini wrote:
> On 20/05/21 07:08, Thomas Huth wrote:
>>> OK... Not sure how to detect it from ninja then.
>>
>> Every time you pull, there could be changes to the "configure" script
>> which affect the build ... I guess you also won't notice those when
>> you're only compiling with ninja? Thus at least after pulling from
>> upstream, I think you have to type "make" once at least.
> 
> Yes, and using "ninja" directly is not supported.

Unrelated to my issue, but I find it unfair to state "using
ninja directly is not supported" when the majority of the
QEMU developers don't have access to the Meson 0.57 bugfix.


Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Peter Maydell 2 years, 11 months ago
On Thu, 20 May 2021 at 14:06, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 5/20/21 9:43 AM, Paolo Bonzini wrote:
> > On 20/05/21 07:08, Thomas Huth wrote:
> >>> OK... Not sure how to detect it from ninja then.
> >>
> >> Every time you pull, there could be changes to the "configure" script
> >> which affect the build ... I guess you also won't notice those when
> >> you're only compiling with ninja? Thus at least after pulling from
> >> upstream, I think you have to type "make" once at least.
> >
> > Yes, and using "ninja" directly is not supported.
>
> Unrelated to my issue, but I find it unfair to state "using
> ninja directly is not supported" when the majority of the
> QEMU developers don't have access to the Meson 0.57 bugfix.

I dunno about "unfair". It's simply the case that the only way we document
to build QEMU is to run 'make'. Anything else might or might not work.
If there's an issue that we should be trying to fix by updating our
meson submodule, we should address it by making that update.

thanks
-- PMM

Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches
Posted by Eric Blake 2 years, 11 months ago
On 5/6/21 2:00 AM, Thomas Huth wrote:

> D'oh! I think I can work-around the problem with a patch like
> this on top:
> 
> diff a/configure b/configure
> --- a/configure
> +++ b/configure
> @@ -1686,6 +1686,11 @@ fi
>  
>  for config in $mak_wilds; do
>      target="$(basename "$config" .mak)"
> +    if [ "$target" = "moxie-softmmu" ]; then
> +        # This is a work-around to make incremental builds pass after
> +        # moxie-softmmu has been removed. It can be removed later.
> +        continue
> +    fi
>      if echo "$target_list_exclude" | grep -vq "$target"; then
>          default_target_list="${default_target_list} $target"
>      fi
> diff a/default-configs/targets/moxie-softmmu.mak
> b/default-configs/targets/moxie-softmmu.mak
> new file mode 100644
> index 0000000000..23fd596b66
> --- /dev/null
> +++ b/default-configs/targets/moxie-softmmu.mak
> @@ -0,0 +1,2 @@
> +# This is just a dummy file to avoid that incremental builds are failing.

s/to avoid that incremental builds are failing/to avoid incremental
build failures/

> +# It can be removed as soon as all builders have been updated.
> 
> Does that look acceptable? If yes, I'll respin my PR with that
> squashed into the moxie patch.
> 
>  Thomas
> 
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org