All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/31] various fixes (testing, plugins, gitdm)
@ 2023-03-18 11:46 Alex Bennée
  2023-03-18 11:46 ` [PULL 01/31] tests/avocado: update AArch64 tests to Alpine 3.17.2 Alex Bennée
                   ` (11 more replies)
  0 siblings, 12 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Alex Bennée

The following changes since commit 74c581b6452394e591f13beba9fea2ec0688e2f5:

  Merge tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-17 14:22:01 +0000)

are available in the Git repository at:

  https://gitlab.com/stsquad/qemu.git tags/pull-for-8.0-170323-4

for you to fetch changes up to 4f2c431acd43d0aa505494229d05fa343762f272:

  qtests: avoid printing comments before g_test_init() (2023-03-17
  17:50:19 +0000)

You can see my CI run on the branch here:

  https://gitlab.com/stsquad/qemu/-/pipelines/810271620

The failures:

  FreeBSD's time out on a migration test
  Centos8 Stream because my private runner needs more disk space

----------------------------------------------------------------
Misc fixes for 8.0 (testing, plugins, gitdm)

  - update Alpine image used for testing images
  - include libslirp in custom runner build env
  - update gitlab-runner recipe for CentOS
  - update docker calls for better caching behaviour
  - document some plugin callbacks
  - don't use tags to define drives for lkft baseline tests
  - fix missing clear of plugin_mem_cbs
  - fix iotests to report individual results
  - update the gitdm metadata for contributors
  - avoid printing comments before g_test_init()

----------------------------------------------------------------
Alex Bennée (14):
      tests/docker: all add DOCKER_BUILDKIT to RUNC environment
      scripts/ci: add libslirp-devel to build-environment
      scripts/ci: update gitlab-runner playbook to handle CentOS
      gitlab: update centos-8-stream job
      include/qemu: add documentation for memory callbacks
      tests/tcg: add some help output for running individual tests
      tests/avocado: don't use tags to define drive
      contrib/gitdm: Add ASPEED Technology to the domain map
      contrib/gitdm: Add SYRMIA to the domain map
      contrib/gitdm: add Amazon to the domain map
      contrib/gitdm: add Alibaba to the domain-map
      contrib/gitdm: add revng to domain map
      contrib/gitdm: add more individual contributors
      contrib/gitdm: add group map for AMD

Daniel P. Berrangé (9):
      iotests: explicitly pass source/build dir to 'check' command
      iotests: allow test discovery before building
      iotests: strip subdir path when listing tests
      iotests: print TAP protocol version when reporting tests
      iotests: connect stdin to /dev/null when running tests
      iotests: always use a unique sub-directory per test
      iotests: register each I/O test separately with meson
      iotests: remove the check-block.sh script
      qtests: avoid printing comments before g_test_init()

Marcin Juszkiewicz (1):
      tests/avocado: update AArch64 tests to Alpine 3.17.2

Richard Henderson (7):
      tcg: Clear plugin_mem_cbs on TB exit
      tcg: Drop plugin_gen_disable_mem_helpers from tcg_gen_exit_tb
      include/qemu/plugin: Remove QEMU_PLUGIN_ASSERT
      *: Add missing includes of qemu/error-report.h
      *: Add missing includes of qemu/plugin.h
      include/qemu: Split out plugin-event.h
      include/qemu/plugin: Inline qemu_plugin_disable_mem_helpers

 include/hw/core/cpu.h                              |  2 +-
 include/qemu/plugin-event.h                        | 26 ++++++++++
 include/qemu/plugin.h                              | 27 +++-------
 include/qemu/qemu-plugin.h                         | 47 +++++++++++++++--
 include/user/syscall-trace.h                       |  1 +
 accel/accel-softmmu.c                              |  2 +-
 accel/tcg/cpu-exec-common.c                        |  3 ++
 accel/tcg/cpu-exec.c                               |  5 +-
 block/monitor/block-hmp-cmds.c                     |  1 +
 cpu.c                                              |  1 +
 dump/dump.c                                        |  1 +
 dump/win_dump.c                                    |  1 +
 gdbstub/gdbstub.c                                  |  1 +
 hw/arm/collie.c                                    |  2 +
 hw/arm/cubieboard.c                                |  1 +
 hw/arm/musicpal.c                                  |  2 +
 hw/arm/npcm7xx_boards.c                            |  2 +
 hw/arm/nseries.c                                   |  2 +
 hw/arm/omap_sx1.c                                  |  2 +
 hw/arm/orangepi.c                                  |  1 +
 hw/arm/palm.c                                      |  2 +
 hw/core/loader.c                                   |  1 +
 hw/core/machine-smp.c                              |  2 +
 hw/i386/kvm/xen_evtchn.c                           |  1 +
 hw/i386/kvm/xen_xenstore.c                         |  1 +
 hw/i386/sgx.c                                      |  1 +
 hw/intc/apic.c                                     |  1 +
 hw/loongarch/acpi-build.c                          |  1 +
 hw/loongarch/virt.c                                |  2 +
 hw/m68k/next-cube.c                                |  1 +
 hw/m68k/q800.c                                     |  1 +
 hw/m68k/virt.c                                     |  1 +
 hw/mem/memory-device.c                             |  1 +
 hw/mem/sparse-mem.c                                |  1 +
 hw/openrisc/boot.c                                 |  1 +
 hw/ppc/ppc4xx_sdram.c                              |  1 +
 hw/ppc/spapr_softmmu.c                             |  2 +
 hw/riscv/opentitan.c                               |  1 +
 hw/riscv/shakti_c.c                                |  1 +
 hw/riscv/virt-acpi-build.c                         |  1 +
 hw/vfio/display.c                                  |  1 +
 hw/vfio/igd.c                                      |  1 +
 hw/vfio/migration.c                                |  1 +
 linux-user/elfload.c                               |  1 +
 linux-user/exit.c                                  |  1 +
 linux-user/syscall.c                               |  1 +
 migration/dirtyrate.c                              |  1 +
 migration/exec.c                                   |  1 +
 plugins/core.c                                     | 11 ----
 target/i386/cpu.c                                  |  1 +
 target/i386/host-cpu.c                             |  1 +
 target/i386/kvm/xen-emu.c                          |  1 +
 target/i386/sev.c                                  |  1 +
 target/i386/whpx/whpx-apic.c                       |  1 +
 target/mips/cpu.c                                  |  1 +
 target/s390x/cpu-sysemu.c                          |  1 +
 target/s390x/cpu_models.c                          |  1 +
 target/s390x/diag.c                                |  2 +
 tcg/tcg-op.c                                       |  1 -
 tests/qtest/migration-test.c                       | 10 ++--
 .../custom-runners/centos-stream-8-x86_64.yml      | 18 +++----
 contrib/gitdm/domain-map                           |  8 ++-
 contrib/gitdm/group-map-alibaba                    |  7 +++
 contrib/gitdm/group-map-amd                        |  8 +++
 contrib/gitdm/group-map-individuals                |  4 ++
 gitdm.config                                       |  2 +
 .../ci/org.centos/stream/8/build-environment.yml   |  1 +
 scripts/ci/setup/gitlab-runner.yml                 | 20 +++++++-
 tests/avocado/machine_aarch64_virt.py              |  8 +--
 tests/avocado/tuxrun_baselines.py                  | 60 +++++++++-------------
 tests/check-block.sh                               | 43 ----------------
 tests/docker/Makefile.include                      |  2 +-
 tests/qemu-iotests/check                           | 30 +++++++++--
 tests/qemu-iotests/meson.build                     | 35 ++++++++++---
 tests/qemu-iotests/testenv.py                      | 20 ++++----
 tests/qemu-iotests/testrunner.py                   | 43 +++++-----------
 tests/tcg/Makefile.target                          |  7 +++
 ui/cocoa.m                                         |  1 +
 78 files changed, 316 insertions(+), 195 deletions(-)
 create mode 100644 include/qemu/plugin-event.h
 create mode 100644 contrib/gitdm/group-map-alibaba
 create mode 100644 contrib/gitdm/group-map-amd
 delete mode 100755 tests/check-block.sh

-- 
2.39.2



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PULL 01/31] tests/avocado: update AArch64 tests to Alpine 3.17.2
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-18 11:46 ` [PULL 02/31] tests/docker: all add DOCKER_BUILDKIT to RUNC environment Alex Bennée
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marcin Juszkiewicz, Philippe Mathieu-Daudé,
	Alex Bennée, Cleber Rosa, Wainer dos Santos Moschetta,
	Beraldo Leal, open list:Virt

From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

To test Alpine boot on SBSA-Ref target we need Alpine Linux
'standard' image as 'virt' one lacks kernel modules.

So to minimalize Avocado cache I move test to 'standard' image.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230302191146.1790560-1-marcin.juszkiewicz@linaro.org>
Message-Id: <20230315174331.2959-2-alex.bennee@linaro.org>

diff --git a/tests/avocado/machine_aarch64_virt.py b/tests/avocado/machine_aarch64_virt.py
index 25dab8dc00..a90dc6ff4b 100644
--- a/tests/avocado/machine_aarch64_virt.py
+++ b/tests/avocado/machine_aarch64_virt.py
@@ -38,11 +38,11 @@ def test_alpine_virt_tcg_gic_max(self):
         :avocado: tags=accel:tcg
         """
         iso_url = ('https://dl-cdn.alpinelinux.org/'
-                   'alpine/v3.16/releases/aarch64/'
-                   'alpine-virt-3.16.3-aarch64.iso')
+                   'alpine/v3.17/releases/aarch64/'
+                   'alpine-standard-3.17.2-aarch64.iso')
 
         # Alpine use sha256 so I recalculated this myself
-        iso_sha1 = '0683bc089486d55c91bf6607d5ecb93925769bc0'
+        iso_sha1 = '76284fcd7b41fe899b0c2375ceb8470803eea839'
         iso_path = self.fetch_asset(iso_url, asset_hash=iso_sha1)
 
         self.vm.set_console()
@@ -65,7 +65,7 @@ def test_alpine_virt_tcg_gic_max(self):
         self.vm.add_args('-object', 'rng-random,id=rng0,filename=/dev/urandom')
 
         self.vm.launch()
-        self.wait_for_console_pattern('Welcome to Alpine Linux 3.16')
+        self.wait_for_console_pattern('Welcome to Alpine Linux 3.17')
 
 
     def common_aarch64_virt(self, machine):
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PULL 02/31] tests/docker: all add DOCKER_BUILDKIT to RUNC environment
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
  2023-03-18 11:46 ` [PULL 01/31] tests/avocado: update AArch64 tests to Alpine 3.17.2 Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-18 11:46 ` [PULL 03/31] scripts/ci: add libslirp-devel to build-environment Alex Bennée
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Fabiano Rosas,
	Richard Henderson, Thomas Huth, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Beraldo Leal

It seems we also need to pass DOCKER_BUILDKIT as an argument to docker
itself to get the full benefit of caching.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Suggested-by: Fabiano Rosas <farosas@suse.de>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230315174331.2959-3-alex.bennee@linaro.org>

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 54ed77f671..9401525325 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -39,7 +39,7 @@ docker-qemu-src: $(DOCKER_SRC_COPY)
 # General rule for building docker images.
 docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 	  $(call quiet-command,			\
-		$(RUNC) build				\
+		DOCKER_BUILDKIT=1 $(RUNC) build		\
 		$(if $V,,--quiet)			\
 		$(if $(NOCACHE),--no-cache,		\
 			$(if $(DOCKER_REGISTRY),--cache-from $(DOCKER_REGISTRY)/qemu/$*)) \
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PULL 03/31] scripts/ci: add libslirp-devel to build-environment
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
  2023-03-18 11:46 ` [PULL 01/31] tests/avocado: update AArch64 tests to Alpine 3.17.2 Alex Bennée
  2023-03-18 11:46 ` [PULL 02/31] tests/docker: all add DOCKER_BUILDKIT to RUNC environment Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-18 11:46 ` [PULL 04/31] scripts/ci: update gitlab-runner playbook to handle CentOS Alex Bennée
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Thomas Huth,
	Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Beraldo Leal

Without libslip enabled we won't have user networking which means the
KVM tests won't run.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230315174331.2959-4-alex.bennee@linaro.org>

diff --git a/scripts/ci/org.centos/stream/8/build-environment.yml b/scripts/ci/org.centos/stream/8/build-environment.yml
index 0d094d70c3..1ead77e2cb 100644
--- a/scripts/ci/org.centos/stream/8/build-environment.yml
+++ b/scripts/ci/org.centos/stream/8/build-environment.yml
@@ -55,6 +55,7 @@
           - librados-devel
           - librbd-devel
           - libseccomp-devel
+          - libslirp-devel
           - libssh-devel
           - libxkbcommon-devel
           - lzo-devel
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PULL 04/31] scripts/ci: update gitlab-runner playbook to handle CentOS
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
                   ` (2 preceding siblings ...)
  2023-03-18 11:46 ` [PULL 03/31] scripts/ci: add libslirp-devel to build-environment Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-18 11:46 ` [PULL 05/31] gitlab: update centos-8-stream job Alex Bennée
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Philippe Mathieu-Daudé,
	Thomas Huth, Wainer dos Santos Moschetta, Beraldo Leal

This was broken when we moved to using the pre-built packages as we
didn't take care to ensure we used RPMs where required.

NB: I could never get this to complete on my test setup but I suspect
this was down to network connectivity and timeouts while downloading.

Fixes: 69c4befba1 (scripts/ci: update gitlab-runner playbook to use latest runner)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230315174331.2959-5-alex.bennee@linaro.org>

diff --git a/scripts/ci/setup/gitlab-runner.yml b/scripts/ci/setup/gitlab-runner.yml
index 95d4199c03..1a1b270ff2 100644
--- a/scripts/ci/setup/gitlab-runner.yml
+++ b/scripts/ci/setup/gitlab-runner.yml
@@ -48,13 +48,29 @@
     - debug:
         msg: gitlab-runner arch is {{ gitlab_runner_arch }}
 
-    - name: Download the matching gitlab-runner
+    - name: Download the matching gitlab-runner (DEB)
       get_url:
         dest: "/root/"
         url: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-runner_{{ gitlab_runner_arch }}.deb"
+      when:
+        - ansible_facts['distribution'] == 'Ubuntu'
+
+    - name: Download the matching gitlab-runner (RPM)
+      get_url:
+        dest: "/root/"
+        url: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_{{ gitlab_runner_arch }}.rpm"
+      when:
+        - ansible_facts['distribution'] == 'CentOS'
 
-    - name: Install gitlab-runner via package manager
+    - name: Install gitlab-runner via package manager (DEB)
       apt: deb="/root/gitlab-runner_{{ gitlab_runner_arch }}.deb"
+      when:
+        - ansible_facts['distribution'] == 'Ubuntu'
+
+    - name: Install gitlab-runner via package manager (RPM)
+      yum: name="/root/gitlab-runner_{{ gitlab_runner_arch }}.rpm"
+      when:
+        - ansible_facts['distribution'] == 'CentOS'
 
     - name: Register the gitlab-runner
       command: "/usr/bin/gitlab-runner register --non-interactive --url {{ gitlab_runner_server_url }} --registration-token {{ gitlab_runner_registration_token }} --executor shell --tag-list {{ ansible_facts[\"architecture\"] }},{{ ansible_facts[\"distribution\"]|lower }}_{{ ansible_facts[\"distribution_version\"] }} --description '{{ ansible_facts[\"distribution\"] }} {{ ansible_facts[\"distribution_version\"] }} {{ ansible_facts[\"architecture\"] }} ({{ ansible_facts[\"os_family\"] }})'"
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PULL 05/31] gitlab: update centos-8-stream job
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
                   ` (3 preceding siblings ...)
  2023-03-18 11:46 ` [PULL 04/31] scripts/ci: update gitlab-runner playbook to handle CentOS Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-20 14:44   ` Philippe Mathieu-Daudé
  2023-03-18 11:46 ` [PULL 06/31] include/qemu: add documentation for memory callbacks Alex Bennée
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Thomas Huth,
	Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Beraldo Leal

A couple of clean-ups here:

  - inherit from the custom runners job for artefacts
  - call check-avocado directly
  - add some comments to the top about setup

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230315174331.2959-6-alex.bennee@linaro.org>

diff --git a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml b/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml
index 068b0c4335..367424db78 100644
--- a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml
+++ b/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml
@@ -1,4 +1,9 @@
+# All centos-stream-8 jobs should run successfully in an environment
+# setup by the scripts/ci/setup/stream/8/build-environment.yml task
+# "Installation of extra packages to build QEMU"
+
 centos-stream-8-x86_64:
+ extends: .custom_runner_template
  allow_failure: true
  needs: []
  stage: build
@@ -8,15 +13,6 @@ centos-stream-8-x86_64:
  rules:
  - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
  - if: "$CENTOS_STREAM_8_x86_64_RUNNER_AVAILABLE"
- artifacts:
-   name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
-   when: on_failure
-   expire_in: 7 days
-   paths:
-     - build/tests/results/latest/results.xml
-     - build/tests/results/latest/test-results
-   reports:
-     junit: build/tests/results/latest/results.xml
  before_script:
  - JOBS=$(expr $(nproc) + 1)
  script:
@@ -25,6 +21,4 @@ centos-stream-8-x86_64:
  - ../scripts/ci/org.centos/stream/8/x86_64/configure
    || { cat config.log meson-logs/meson-log.txt; exit 1; }
  - make -j"$JOBS"
- - make NINJA=":" check
-   || { cat meson-logs/testlog.txt; exit 1; } ;
- - ../scripts/ci/org.centos/stream/8/x86_64/test-avocado
+ - make NINJA=":" check check-avocado
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PULL 06/31] include/qemu: add documentation for memory callbacks
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
                   ` (4 preceding siblings ...)
  2023-03-18 11:46 ` [PULL 05/31] gitlab: update centos-8-stream job Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-18 11:46 ` [PULL 07/31] tests/tcg: add some help output for running individual tests Alex Bennée
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Richard Henderson, Thomas Huth

Some API documentation was missed, rectify that.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1497
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230315174331.2959-7-alex.bennee@linaro.org>

diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index d0e9d03adf..50a9957279 100644
--- a/include/qemu/qemu-plugin.h
+++ b/include/qemu/qemu-plugin.h
@@ -481,17 +481,56 @@ uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr);
  */
 const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h);
 
-typedef void
-(*qemu_plugin_vcpu_mem_cb_t)(unsigned int vcpu_index,
-                             qemu_plugin_meminfo_t info, uint64_t vaddr,
-                             void *userdata);
+/**
+ * typedef qemu_plugin_vcpu_mem_cb_t - memory callback function type
+ * @vcpu_index: the executing vCPU
+ * @info: an opaque handle for further queries about the memory
+ * @vaddr: the virtual address of the transaction
+ * @userdata: any user data attached to the callback
+ */
+typedef void (*qemu_plugin_vcpu_mem_cb_t) (unsigned int vcpu_index,
+                                           qemu_plugin_meminfo_t info,
+                                           uint64_t vaddr,
+                                           void *userdata);
 
+/**
+ * qemu_plugin_register_vcpu_mem_cb() - register memory access callback
+ * @insn: handle for instruction to instrument
+ * @cb: callback of type qemu_plugin_vcpu_mem_cb_t
+ * @flags: (currently unused) callback flags
+ * @rw: monitor reads, writes or both
+ * @userdata: opaque pointer for userdata
+ *
+ * This registers a full callback for every memory access generated by
+ * an instruction. If the instruction doesn't access memory no
+ * callback will be made.
+ *
+ * The callback reports the vCPU the access took place on, the virtual
+ * address of the access and a handle for further queries. The user
+ * can attach some userdata to the callback for additional purposes.
+ *
+ * Other execution threads will continue to execute during the
+ * callback so the plugin is responsible for ensuring it doesn't get
+ * confused by making appropriate use of locking if required.
+ */
 void qemu_plugin_register_vcpu_mem_cb(struct qemu_plugin_insn *insn,
                                       qemu_plugin_vcpu_mem_cb_t cb,
                                       enum qemu_plugin_cb_flags flags,
                                       enum qemu_plugin_mem_rw rw,
                                       void *userdata);
 
+/**
+ * qemu_plugin_register_vcpu_mem_inline() - register an inline op to any memory access
+ * @insn: handle for instruction to instrument
+ * @rw: apply to reads, writes or both
+ * @op: the op, of type qemu_plugin_op
+ * @ptr: pointer memory for the op
+ * @imm: immediate data for @op
+ *
+ * This registers a inline op every memory access generated by the
+ * instruction. This provides for a lightweight but not thread-safe
+ * way of counting the number of operations done.
+ */
 void qemu_plugin_register_vcpu_mem_inline(struct qemu_plugin_insn *insn,
                                           enum qemu_plugin_mem_rw rw,
                                           enum qemu_plugin_op op, void *ptr,
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PULL 07/31] tests/tcg: add some help output for running individual tests
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
                   ` (5 preceding siblings ...)
  2023-03-18 11:46 ` [PULL 06/31] include/qemu: add documentation for memory callbacks Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-18 11:46 ` [PULL 08/31] tests/avocado: don't use tags to define drive Alex Bennée
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Richard Henderson, Thomas Huth,
	Philippe Mathieu-Daudé

So you can do:

  cd tests/tcg/aarch64-linux-user
  make -f ../Makefile.target help

To see the list of tests. You can then run each one individually.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230315174331.2959-8-alex.bennee@linaro.org>

diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target
index a3b0aaf8af..8318caf924 100644
--- a/tests/tcg/Makefile.target
+++ b/tests/tcg/Makefile.target
@@ -201,3 +201,10 @@ clean:
 
 distclean:
 	rm -f config-cc.mak config-target.mak ../config-$(TARGET).mak
+
+.PHONY: help
+help:
+	@echo "TCG tests help $(TARGET_NAME)"
+	@echo "Built with $(CC)"
+	@echo "Available tests:"
+	@$(foreach t,$(RUN_TESTS),echo "  $t";)
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PULL 08/31] tests/avocado: don't use tags to define drive
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
                   ` (6 preceding siblings ...)
  2023-03-18 11:46 ` [PULL 07/31] tests/tcg: add some help output for running individual tests Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-18 11:46 ` [PULL 09/31] tcg: Clear plugin_mem_cbs on TB exit Alex Bennée
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, David Woodhouse,
	Philippe Mathieu-Daudé,
	Thomas Huth, Wainer dos Santos Moschetta, Beraldo Leal,
	Cleber Rosa

We are abusing the avocado tags which are intended to provide test
selection metadata to provide parameters to our test. This works OK up
until the point you need to have ,'s in the field as this is the tag
separator character which is the case for a number of the drive
parameters. Fix this by making drive a parameter to the common helper
function.

Fixes: 267fe57c23 (tests: add tuxrun baseline test to avocado)
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230315174331.2959-11-alex.bennee@linaro.org>

diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py
index 30aaefc1d3..c3fb67f5dc 100644
--- a/tests/avocado/tuxrun_baselines.py
+++ b/tests/avocado/tuxrun_baselines.py
@@ -67,9 +67,6 @@ def setUp(self):
         # The name of the kernel Image file
         self.image = self.get_tag('image', "Image")
 
-        # The block device drive type
-        self.drive = self.get_tag('drive', "virtio-blk-device")
-
         self.root = self.get_tag('root', "vda")
 
         # Occasionally we need extra devices to hook things up
@@ -99,7 +96,7 @@ def fetch_tuxrun_assets(self, dt=None):
 
         return (kernel_image, self.workdir + "/rootfs.ext4", dtb)
 
-    def prepare_run(self, kernel, disk, dtb=None, console_index=0):
+    def prepare_run(self, kernel, disk, drive, dtb=None, console_index=0):
         """
         Setup to run and add the common parameters to the system
         """
@@ -121,10 +118,8 @@ def prepare_run(self, kernel, disk, dtb=None, console_index=0):
         if self.extradev:
             self.vm.add_args('-device', self.extradev)
 
-        # Some machines already define a drive device
-        if self.drive != "none":
-            self.vm.add_args('-device',
-                             f"{self.drive},drive=hd0")
+        self.vm.add_args('-device',
+                         f"{drive},drive=hd0")
 
         # Some machines need an explicit DTB
         if dtb:
@@ -154,7 +149,9 @@ def run_tuxtest_tests(self, haltmsg):
         else:
             self.vm.wait()
 
-    def common_tuxrun(self, dt=None, haltmsg="reboot: System halted",
+    def common_tuxrun(self, dt=None,
+                      drive="virtio-blk-device",
+                      haltmsg="reboot: System halted",
                       console_index=0):
         """
         Common path for LKFT tests. Unless we need to do something
@@ -163,7 +160,7 @@ def common_tuxrun(self, dt=None, haltmsg="reboot: System halted",
         """
         (kernel, disk, dtb) = self.fetch_tuxrun_assets(dt)
 
-        self.prepare_run(kernel, disk, dtb, console_index)
+        self.prepare_run(kernel, disk, drive, dtb, console_index)
         self.vm.launch()
         self.run_tuxtest_tests(haltmsg)
 
@@ -206,11 +203,11 @@ def test_armv5(self):
         :avocado: tags=machine:versatilepb
         :avocado: tags=tuxboot:armv5
         :avocado: tags=image:zImage
-        :avocado: tags=drive:virtio-blk-pci
         :avocado: tags=console:ttyAMA0
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun(dt="versatile-pb.dtb")
+        self.common_tuxrun(drive="virtio-blk-pci",
+                           dt="versatile-pb.dtb")
 
     def test_armv7(self):
         """
@@ -244,10 +241,9 @@ def test_i386(self):
         :avocado: tags=machine:q35
         :avocado: tags=tuxboot:i386
         :avocado: tags=image:bzImage
-        :avocado: tags=drive:virtio-blk-pci
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="virtio-blk-pci")
 
     def test_mips32(self):
         """
@@ -257,11 +253,10 @@ def test_mips32(self):
         :avocado: tags=endian:big
         :avocado: tags=tuxboot:mips32
         :avocado: tags=image:vmlinux
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=root:sda
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
 
     def test_mips32el(self):
         """
@@ -270,11 +265,10 @@ def test_mips32el(self):
         :avocado: tags=cpu:mips32r6-generic
         :avocado: tags=tuxboot:mips32el
         :avocado: tags=image:vmlinux
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=root:sda
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
 
     @skip("QEMU currently broken") # regression against stable QEMU
     def test_mips64(self):
@@ -284,11 +278,10 @@ def test_mips64(self):
         :avocado: tags=tuxboot:mips64
         :avocado: tags=endian:big
         :avocado: tags=image:vmlinux
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=root:sda
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
 
     def test_mips64el(self):
         """
@@ -296,11 +289,10 @@ def test_mips64el(self):
         :avocado: tags=machine:malta
         :avocado: tags=tuxboot:mips64el
         :avocado: tags=image:vmlinux
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=root:sda
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
 
     def test_ppc32(self):
         """
@@ -309,10 +301,9 @@ def test_ppc32(self):
         :avocado: tags=cpu:e500mc
         :avocado: tags=tuxboot:ppc32
         :avocado: tags=image:uImage
-        :avocado: tags=drive:virtio-blk-pci
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="virtio-blk-pci")
 
     def test_ppc64(self):
         """
@@ -324,10 +315,9 @@ def test_ppc64(self):
         :avocado: tags=tuxboot:ppc64
         :avocado: tags=image:vmlinux
         :avocado: tags=extradev:driver=spapr-vscsi
-        :avocado: tags=drive:scsi-hd
         :avocado: tags=root:sda
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="scsi-hd")
 
     def test_ppc64le(self):
         """
@@ -338,10 +328,9 @@ def test_ppc64le(self):
         :avocado: tags=tuxboot:ppc64le
         :avocado: tags=image:vmlinux
         :avocado: tags=extradev:driver=spapr-vscsi
-        :avocado: tags=drive:scsi-hd
         :avocado: tags=root:sda
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="scsi-hd")
 
     def test_riscv32(self):
         """
@@ -365,10 +354,10 @@ def test_s390(self):
         :avocado: tags=endian:big
         :avocado: tags=tuxboot:s390
         :avocado: tags=image:bzImage
-        :avocado: tags=drive:virtio-blk-ccw
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun(haltmsg="Requesting system halt")
+        self.common_tuxrun(drive="virtio-blk-ccw",
+                           haltmsg="Requesting system halt")
 
     # Note: some segfaults caused by unaligned userspace access
     @skipIf(os.getenv('GITLAB_CI'), 'Skipping unstable test on GitLab')
@@ -380,7 +369,6 @@ def test_sh4(self):
         :avocado: tags=tuxboot:sh4
         :avocado: tags=image:zImage
         :avocado: tags=root:sda
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=console:ttySC1
         """
         # The test is currently too unstable to do much in userspace
@@ -388,7 +376,9 @@ def test_sh4(self):
         (kernel, disk, dtb) = self.fetch_tuxrun_assets()
 
         # the console comes on the second serial port
-        self.prepare_run(kernel, disk, console_index=1)
+        self.prepare_run(kernel, disk,
+                         "driver=ide-hd,bus=ide.0,unit=0",
+                         console_index=1)
         self.vm.launch()
 
         self.wait_for_console_pattern("Welcome to TuxTest")
@@ -404,10 +394,9 @@ def test_sparc64(self):
         :avocado: tags=tuxboot:sparc64
         :avocado: tags=image:vmlinux
         :avocado: tags=root:sda
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
 
     def test_x86_64(self):
         """
@@ -417,7 +406,6 @@ def test_x86_64(self):
         :avocado: tags=tuxboot:x86_64
         :avocado: tags=image:bzImage
         :avocado: tags=root:sda
-        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
         :avocado: tags=shutdown:nowait
         """
-        self.common_tuxrun()
+        self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0")
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PULL 09/31] tcg: Clear plugin_mem_cbs on TB exit
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
                   ` (7 preceding siblings ...)
  2023-03-18 11:46 ` [PULL 08/31] tests/avocado: don't use tags to define drive Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-18 11:46 ` [PULL 10/31] tcg: Drop plugin_gen_disable_mem_helpers from tcg_gen_exit_tb Alex Bennée
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Richard Henderson, Alex Bennée, Paolo Bonzini

From: Richard Henderson <richard.henderson@linaro.org>

Do this in cpu_tb_exec (normal exit) and cpu_loop_exit (exception),
adjacent to where we reset can_do_io.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1381
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230310195252.210956-2-richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230315174331.2959-12-alex.bennee@linaro.org>

diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c
index c7bc8c6efa..176ea57281 100644
--- a/accel/tcg/cpu-exec-common.c
+++ b/accel/tcg/cpu-exec-common.c
@@ -65,6 +65,8 @@ void cpu_loop_exit(CPUState *cpu)
 {
     /* Undo the setting in cpu_tb_exec.  */
     cpu->can_do_io = 1;
+    /* Undo any setting in generated code.  */
+    qemu_plugin_disable_mem_helpers(cpu);
     siglongjmp(cpu->jmp_env, 1);
 }
 
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 56aaf58b9d..c815f2dbfd 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -459,6 +459,7 @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int *tb_exit)
     qemu_thread_jit_execute();
     ret = tcg_qemu_tb_exec(env, tb_ptr);
     cpu->can_do_io = 1;
+    qemu_plugin_disable_mem_helpers(cpu);
     /*
      * TODO: Delay swapping back to the read-write region of the TB
      * until we actually need to modify the TB.  The read-only copy,
@@ -526,7 +527,6 @@ static void cpu_exec_exit(CPUState *cpu)
     if (cc->tcg_ops->cpu_exec_exit) {
         cc->tcg_ops->cpu_exec_exit(cpu);
     }
-    QEMU_PLUGIN_ASSERT(cpu->plugin_mem_cbs == NULL);
 }
 
 void cpu_exec_step_atomic(CPUState *cpu)
@@ -580,7 +580,6 @@ void cpu_exec_step_atomic(CPUState *cpu)
             qemu_mutex_unlock_iothread();
         }
         assert_no_pages_locked();
-        qemu_plugin_disable_mem_helpers(cpu);
     }
 
     /*
@@ -1004,7 +1003,6 @@ cpu_exec_loop(CPUState *cpu, SyncClocks *sc)
 
             cpu_loop_exec_tb(cpu, tb, pc, &last_tb, &tb_exit);
 
-            QEMU_PLUGIN_ASSERT(cpu->plugin_mem_cbs == NULL);
             /* Try to align the host and virtual clocks
                if the guest is in advance */
             align_clocks(sc, cpu);
@@ -1029,7 +1027,6 @@ static int cpu_exec_setjmp(CPUState *cpu, SyncClocks *sc)
         if (qemu_mutex_iothread_locked()) {
             qemu_mutex_unlock_iothread();
         }
-        qemu_plugin_disable_mem_helpers(cpu);
 
         assert_no_pages_locked();
     }
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PULL 10/31] tcg: Drop plugin_gen_disable_mem_helpers from tcg_gen_exit_tb
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
                   ` (8 preceding siblings ...)
  2023-03-18 11:46 ` [PULL 09/31] tcg: Clear plugin_mem_cbs on TB exit Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-18 11:46 ` [PULL 11/31] include/qemu/plugin: Remove QEMU_PLUGIN_ASSERT Alex Bennée
  2023-03-20 13:42 ` [PULL 00/31] various fixes (testing, plugins, gitdm) Peter Maydell
  11 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Richard Henderson, Alex Bennée

From: Richard Henderson <richard.henderson@linaro.org>

Now that we call qemu_plugin_disable_mem_helpers in cpu_tb_exec,
we don't need to do this in generated code as well.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230310195252.210956-3-richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230315174331.2959-13-alex.bennee@linaro.org>

diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index ddab20a6a6..3136cef81a 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -2808,7 +2808,6 @@ void tcg_gen_exit_tb(const TranslationBlock *tb, unsigned idx)
         tcg_debug_assert(idx == TB_EXIT_REQUESTED);
     }
 
-    plugin_gen_disable_mem_helpers();
     tcg_gen_op1i(INDEX_op_exit_tb, val);
 }
 
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PULL 11/31] include/qemu/plugin: Remove QEMU_PLUGIN_ASSERT
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
                   ` (9 preceding siblings ...)
  2023-03-18 11:46 ` [PULL 10/31] tcg: Drop plugin_gen_disable_mem_helpers from tcg_gen_exit_tb Alex Bennée
@ 2023-03-18 11:46 ` Alex Bennée
  2023-03-20 13:42 ` [PULL 00/31] various fixes (testing, plugins, gitdm) Peter Maydell
  11 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-18 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Richard Henderson, Alex Bennée

From: Richard Henderson <richard.henderson@linaro.org>

This macro is no longer used.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230310195252.210956-4-richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230315174331.2959-14-alex.bennee@linaro.org>

diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index fb338ba576..e0ebedef84 100644
--- a/include/qemu/plugin.h
+++ b/include/qemu/plugin.h
@@ -59,8 +59,6 @@ get_plugin_meminfo_rw(qemu_plugin_meminfo_t i)
 #ifdef CONFIG_PLUGIN
 extern QemuOptsList qemu_plugin_opts;
 
-#define QEMU_PLUGIN_ASSERT(cond) g_assert(cond)
-
 static inline void qemu_plugin_add_opts(void)
 {
     qemu_add_opts(&qemu_plugin_opts);
@@ -252,8 +250,6 @@ void qemu_plugin_user_postfork(bool is_child);
 
 #else /* !CONFIG_PLUGIN */
 
-#define QEMU_PLUGIN_ASSERT(cond)
-
 static inline void qemu_plugin_add_opts(void)
 { }
 
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PULL 00/31] various fixes (testing, plugins, gitdm)
  2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
                   ` (10 preceding siblings ...)
  2023-03-18 11:46 ` [PULL 11/31] include/qemu/plugin: Remove QEMU_PLUGIN_ASSERT Alex Bennée
@ 2023-03-20 13:42 ` Peter Maydell
  2023-03-20 14:15   ` Daniel P. Berrangé
  11 siblings, 1 reply; 20+ messages in thread
From: Peter Maydell @ 2023-03-20 13:42 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel

On Sat, 18 Mar 2023 at 11:46, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> The following changes since commit 74c581b6452394e591f13beba9fea2ec0688e2f5:
>
>   Merge tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-17 14:22:01 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/stsquad/qemu.git tags/pull-for-8.0-170323-4
>
> for you to fetch changes up to 4f2c431acd43d0aa505494229d05fa343762f272:
>
>   qtests: avoid printing comments before g_test_init() (2023-03-17
>   17:50:19 +0000)
>
> You can see my CI run on the branch here:
>
>   https://gitlab.com/stsquad/qemu/-/pipelines/810271620
>
> The failures:
>
>   FreeBSD's time out on a migration test
>   Centos8 Stream because my private runner needs more disk space
>
> ----------------------------------------------------------------
> Misc fixes for 8.0 (testing, plugins, gitdm)
>
>   - update Alpine image used for testing images
>   - include libslirp in custom runner build env
>   - update gitlab-runner recipe for CentOS
>   - update docker calls for better caching behaviour
>   - document some plugin callbacks
>   - don't use tags to define drives for lkft baseline tests
>   - fix missing clear of plugin_mem_cbs
>   - fix iotests to report individual results
>   - update the gitdm metadata for contributors
>   - avoid printing comments before g_test_init()
>

This seems to consistently fail an avocado test on the
centos-stream-8-x86_64 job:
(21/51) tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64:
ERROR: ConnectError: Failed to establish session: EOFError\n Exit
code: 1\n Command: ./qemu-system-x86_64 -display none -vga none
-chardev socket,id=mon,fd=17 -mon chardev=mon,mode=control -machine
x-remote -nodefaults -device lsi53c895a,id=lsi1 -object x-remote-o...
(0.10 s)

https://gitlab.com/qemu-project/qemu/-/jobs/3962028269
https://gitlab.com/qemu-project/qemu/-/jobs/3965134190



The iotests also don't seem to pass on the OpenBSD VM after this;
which test fails varies from run to run but the common factor
is a complaint about running out of disk space:



719/774 qemu:block / io-qcow2-177
           ERROR           4.21s   exit status 1
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
stderr:
--- /home/qemu/qemu-test.8HLwgo/src/tests/qemu-iotests/177.out
+++ /home/qemu/qemu-test.8HLwgo/build/scratch/qcow2-file-177/177.out.bad
@@ -5,8 +5,7 @@
 wrote 134217728/134217728 bytes at offset 0
 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
-wrote 134217728/134217728 bytes at offset 0
-128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+write failed: No space left on device

 == constrained alignment and max-transfer ==
 wrote 131072/131072 bytes at offset 1000
@@ -27,22 +26,27 @@
 30 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)


(etc)

and in another run

stderr:
--- /home/qemu/qemu-test.ZfU510/src/tests/qemu-iotests/040.out
+++ /home/qemu/qemu-test.ZfU510/build/scratch/qcow2-file-040/040.out.bad
@@ -1,5 +1,54 @@
-.................................................................
+................................EE...............................
+======================================================================
+ERROR: testIntermediateReadErrorReport (__main__.TestErrorHandling)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
line 433, in launch
+    self._launch()
+  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
line 460, in _launch
+    self._pre_launch()
+  File "/home/qemu/qemu-test.ZfU510/src/tests/qemu-iotests/iotests.py",
line 837, in _pre_launch
+    super()._pre_launch()
+  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/qtest.py",
line 142, in _pre_launch
+    super()._pre_launch()
+  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
line 358, in _pre_launch
+    self._qemu_log_path = os.path.join(self.log_dir, self._name + ".log")
+  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
line 905, in log_dir
+    return self.temp_dir
+  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
line 886, in temp_dir
+    self._temp_dir = tempfile.mkdtemp(prefix="qemu-machine-",
+  File "/usr/local/lib/python3.9/tempfile.py", line 363, in mkdtemp
+    _os.mkdir(file, 0o700)
+OSError: [Errno 28] No space left on device:
'/home/qemu/qemu-test.ZfU510/build/scratch/qcow2-file-040/qemu-machine-g_v0pby3'
+
+The above exception was the direct cause of the following exception:
+
+Traceback (most recent call last):
+  File "/home/qemu/qemu-test.ZfU510/src/tests/qemu-iotests/040", line
472, in setUp
+    self.vm.launch()
+  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
line 446, in launch
+    raise VMLaunchFailure(
+qemu.machine.machine.VMLaunchFailure: OSError: [Errno 28] No space
left on device:
'/home/qemu/qemu-test.ZfU510/build/scratch/qcow2-file-040/qemu-machine-g_v0pby3'
+       Command:
+       Output: None
+

The host machine (hackbox) doesn't seem to have disk space issues
so presumably the iotests want to use too much disk space for
whatever the image size is that the tests/vm infrastructure
creates ?

thanks
-- PMM


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PULL 00/31] various fixes (testing, plugins, gitdm)
  2023-03-20 13:42 ` [PULL 00/31] various fixes (testing, plugins, gitdm) Peter Maydell
@ 2023-03-20 14:15   ` Daniel P. Berrangé
  2023-03-20 14:43     ` Philippe Mathieu-Daudé
  2023-03-22 12:47     ` Daniel P. Berrangé
  0 siblings, 2 replies; 20+ messages in thread
From: Daniel P. Berrangé @ 2023-03-20 14:15 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Alex Bennée, qemu-devel

On Mon, Mar 20, 2023 at 01:42:46PM +0000, Peter Maydell wrote:
> On Sat, 18 Mar 2023 at 11:46, Alex Bennée <alex.bennee@linaro.org> wrote:
> >
> > The following changes since commit 74c581b6452394e591f13beba9fea2ec0688e2f5:
> >
> >   Merge tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-17 14:22:01 +0000)
> >
> > are available in the Git repository at:
> >
> >   https://gitlab.com/stsquad/qemu.git tags/pull-for-8.0-170323-4
> >
> > for you to fetch changes up to 4f2c431acd43d0aa505494229d05fa343762f272:
> >
> >   qtests: avoid printing comments before g_test_init() (2023-03-17
> >   17:50:19 +0000)
> >
> > You can see my CI run on the branch here:
> >
> >   https://gitlab.com/stsquad/qemu/-/pipelines/810271620
> >
> > The failures:
> >
> >   FreeBSD's time out on a migration test
> >   Centos8 Stream because my private runner needs more disk space
> >
> > ----------------------------------------------------------------
> > Misc fixes for 8.0 (testing, plugins, gitdm)
> >
> >   - update Alpine image used for testing images
> >   - include libslirp in custom runner build env
> >   - update gitlab-runner recipe for CentOS
> >   - update docker calls for better caching behaviour
> >   - document some plugin callbacks
> >   - don't use tags to define drives for lkft baseline tests
> >   - fix missing clear of plugin_mem_cbs
> >   - fix iotests to report individual results
> >   - update the gitdm metadata for contributors
> >   - avoid printing comments before g_test_init()
> >
> 
> This seems to consistently fail an avocado test on the
> centos-stream-8-x86_64 job:
> (21/51) tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64:
> ERROR: ConnectError: Failed to establish session: EOFError\n Exit
> code: 1\n Command: ./qemu-system-x86_64 -display none -vga none
> -chardev socket,id=mon,fd=17 -mon chardev=mon,mode=control -machine
> x-remote -nodefaults -device lsi53c895a,id=lsi1 -object x-remote-o...
> (0.10 s)
> 
> https://gitlab.com/qemu-project/qemu/-/jobs/3962028269
> https://gitlab.com/qemu-project/qemu/-/jobs/3965134190
> 
> 
> 
> The iotests also don't seem to pass on the OpenBSD VM after this;
> which test fails varies from run to run but the common factor
> is a complaint about running out of disk space:

This must be caused by the change in the way we register the
iotests with meson, as I don't see any other interesting changes
in this series.

At a high level we have four scenarios we're testing

 qcow2 + quick
 raw  + slow
 qed + thorough
 vmdk + thorough
 vpc + thorough

Previously each scenario was serialized wrt other scenarios, but
within a scenario things run in parallel. So we could have more
parallelization than we did in the past.

They were also serialized wrt any other tests QEMU runs.

IIUC, we skip any 'slow' and 'thorough' tests by default

  add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
  add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
  add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])


so in practice we should only be runing the qcow2 + quick
tests, not the raw/qed/vmdk/vpc tests.

So the change in parallelism is that we can potentially run the
block I/O tests in parallel with unit tests. Maybe parallel with
avocado tests too, I'm not sure ?


> 
> 
> 
> 719/774 qemu:block / io-qcow2-177
>            ERROR           4.21s   exit status 1
> ――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
> stderr:
> --- /home/qemu/qemu-test.8HLwgo/src/tests/qemu-iotests/177.out
> +++ /home/qemu/qemu-test.8HLwgo/build/scratch/qcow2-file-177/177.out.bad
> @@ -5,8 +5,7 @@
>  wrote 134217728/134217728 bytes at offset 0
>  128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
>  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
> backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
> -wrote 134217728/134217728 bytes at offset 0
> -128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +write failed: No space left on device
> 
>  == constrained alignment and max-transfer ==
>  wrote 131072/131072 bytes at offset 1000
> @@ -27,22 +26,27 @@
>  30 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> 
> 
> (etc)
> 
> and in another run
> 
> stderr:
> --- /home/qemu/qemu-test.ZfU510/src/tests/qemu-iotests/040.out
> +++ /home/qemu/qemu-test.ZfU510/build/scratch/qcow2-file-040/040.out.bad
> @@ -1,5 +1,54 @@
> -.................................................................
> +................................EE...............................
> +======================================================================
> +ERROR: testIntermediateReadErrorReport (__main__.TestErrorHandling)
> +----------------------------------------------------------------------
> +Traceback (most recent call last):
> +  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
> line 433, in launch
> +    self._launch()
> +  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
> line 460, in _launch
> +    self._pre_launch()
> +  File "/home/qemu/qemu-test.ZfU510/src/tests/qemu-iotests/iotests.py",
> line 837, in _pre_launch
> +    super()._pre_launch()
> +  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/qtest.py",
> line 142, in _pre_launch
> +    super()._pre_launch()
> +  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
> line 358, in _pre_launch
> +    self._qemu_log_path = os.path.join(self.log_dir, self._name + ".log")
> +  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
> line 905, in log_dir
> +    return self.temp_dir
> +  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
> line 886, in temp_dir
> +    self._temp_dir = tempfile.mkdtemp(prefix="qemu-machine-",
> +  File "/usr/local/lib/python3.9/tempfile.py", line 363, in mkdtemp
> +    _os.mkdir(file, 0o700)
> +OSError: [Errno 28] No space left on device:
> '/home/qemu/qemu-test.ZfU510/build/scratch/qcow2-file-040/qemu-machine-g_v0pby3'
> +
> +The above exception was the direct cause of the following exception:
> +
> +Traceback (most recent call last):
> +  File "/home/qemu/qemu-test.ZfU510/src/tests/qemu-iotests/040", line
> 472, in setUp
> +    self.vm.launch()
> +  File "/home/qemu/qemu-test.ZfU510/src/python/qemu/machine/machine.py",
> line 446, in launch
> +    raise VMLaunchFailure(
> +qemu.machine.machine.VMLaunchFailure: OSError: [Errno 28] No space
> left on device:
> '/home/qemu/qemu-test.ZfU510/build/scratch/qcow2-file-040/qemu-machine-g_v0pby3'
> +       Command:
> +       Output: None
> +
> 
> The host machine (hackbox) doesn't seem to have disk space issues
> so presumably the iotests want to use too much disk space for
> whatever the image size is that the tests/vm infrastructure
> creates ?
> 
> thanks
> -- PMM
> 

With 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 :|



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PULL 00/31] various fixes (testing, plugins, gitdm)
  2023-03-20 14:15   ` Daniel P. Berrangé
@ 2023-03-20 14:43     ` Philippe Mathieu-Daudé
  2023-03-20 14:56       ` Daniel P. Berrangé
  2023-03-22 12:47     ` Daniel P. Berrangé
  1 sibling, 1 reply; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-20 14:43 UTC (permalink / raw)
  To: Daniel P. Berrangé, Peter Maydell
  Cc: Alex Bennée, qemu-devel, Thomas Huth, Cleber Rosa

On 20/3/23 15:15, Daniel P. Berrangé wrote:
> On Mon, Mar 20, 2023 at 01:42:46PM +0000, Peter Maydell wrote:
>> On Sat, 18 Mar 2023 at 11:46, Alex Bennée <alex.bennee@linaro.org> wrote:
>>>
>>> The following changes since commit 74c581b6452394e591f13beba9fea2ec0688e2f5:
>>>
>>>    Merge tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-17 14:22:01 +0000)
>>>
>>> are available in the Git repository at:
>>>
>>>    https://gitlab.com/stsquad/qemu.git tags/pull-for-8.0-170323-4
>>>
>>> for you to fetch changes up to 4f2c431acd43d0aa505494229d05fa343762f272:
>>>
>>>    qtests: avoid printing comments before g_test_init() (2023-03-17
>>>    17:50:19 +0000)
>>>
>>> You can see my CI run on the branch here:
>>>
>>>    https://gitlab.com/stsquad/qemu/-/pipelines/810271620
>>>
>>> The failures:
>>>
>>>    FreeBSD's time out on a migration test
>>>    Centos8 Stream because my private runner needs more disk space
>>>
>>> ----------------------------------------------------------------
>>> Misc fixes for 8.0 (testing, plugins, gitdm)
>>>
>>>    - update Alpine image used for testing images
>>>    - include libslirp in custom runner build env
>>>    - update gitlab-runner recipe for CentOS
>>>    - update docker calls for better caching behaviour
>>>    - document some plugin callbacks
>>>    - don't use tags to define drives for lkft baseline tests
>>>    - fix missing clear of plugin_mem_cbs
>>>    - fix iotests to report individual results
>>>    - update the gitdm metadata for contributors
>>>    - avoid printing comments before g_test_init()
>>>
>>
>> This seems to consistently fail an avocado test on the
>> centos-stream-8-x86_64 job:
>> (21/51) tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64:
>> ERROR: ConnectError: Failed to establish session: EOFError\n Exit
>> code: 1\n Command: ./qemu-system-x86_64 -display none -vga none
>> -chardev socket,id=mon,fd=17 -mon chardev=mon,mode=control -machine
>> x-remote -nodefaults -device lsi53c895a,id=lsi1 -object x-remote-o...
>> (0.10 s)
>>
>> https://gitlab.com/qemu-project/qemu/-/jobs/3962028269
>> https://gitlab.com/qemu-project/qemu/-/jobs/3965134190
>>
>>
>>
>> The iotests also don't seem to pass on the OpenBSD VM after this;
>> which test fails varies from run to run but the common factor
>> is a complaint about running out of disk space:
> 
> This must be caused by the change in the way we register the
> iotests with meson, as I don't see any other interesting changes
> in this series.

See "05/31 gitlab: update centos-8-stream job", now we call
'make check-avocado' instead of 
scripts/ci/org.centos/stream/8/x86_64/test-avocado.

Per commit d7c2e2b3f4 ("Jobs based on custom runners: add CentOS
Stream 8"):

   The components of this custom job are:

     I) OS build environment setup code:

        - additions to the existing "build-environment.yml" playbook
          that can be used to set up CentOS/EL 8 systems.

        - a CentOS Stream 8 specific "build-environment.yml" playbook
          that adds to the generic one.

    II) QEMU build configuration: a script that will produce binaries
        with features as similar as possible to the ones built and
        packaged on CentOS stream 8.

   III) Scripts that define the minimum amount of testing that the
        binaries built with the given configuration (point II) under the
        given OS build environment (point I) should be subjected to.

Is this host machine (hackbox) installed exactly as per
build-environment.yml?

> At a high level we have four scenarios we're testing
> 
>   qcow2 + quick
>   raw  + slow
>   qed + thorough
>   vmdk + thorough
>   vpc + thorough
> 
> Previously each scenario was serialized wrt other scenarios, but
> within a scenario things run in parallel. So we could have more
> parallelization than we did in the past.
> 
> They were also serialized wrt any other tests QEMU runs.
> 
> IIUC, we skip any 'slow' and 'thorough' tests by default
> 
>    add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
>    add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
>    add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
> 
> 
> so in practice we should only be runing the qcow2 + quick
> tests, not the raw/qed/vmdk/vpc tests.
> 
> So the change in parallelism is that we can potentially run the
> block I/O tests in parallel with unit tests. Maybe parallel with
> avocado tests too, I'm not sure ?


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PULL 05/31] gitlab: update centos-8-stream job
  2023-03-18 11:46 ` [PULL 05/31] gitlab: update centos-8-stream job Alex Bennée
@ 2023-03-20 14:44   ` Philippe Mathieu-Daudé
  2023-03-20 17:11     ` Alex Bennée
  0 siblings, 1 reply; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-20 14:44 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: peter.maydell, Thomas Huth, Wainer dos Santos Moschetta, Beraldo Leal

On 18/3/23 12:46, Alex Bennée wrote:
> A couple of clean-ups here:
> 
>    - inherit from the custom runners job for artefacts

"artifacts"

>    - call check-avocado directly
>    - add some comments to the top about setup
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Message-Id: <20230315174331.2959-6-alex.bennee@linaro.org>
> 
> diff --git a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml b/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml
> index 068b0c4335..367424db78 100644
> --- a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml
> +++ b/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml
> @@ -1,4 +1,9 @@
> +# All centos-stream-8 jobs should run successfully in an environment
> +# setup by the scripts/ci/setup/stream/8/build-environment.yml task
> +# "Installation of extra packages to build QEMU"
> +
>   centos-stream-8-x86_64:
> + extends: .custom_runner_template
>    allow_failure: true
>    needs: []
>    stage: build
> @@ -8,15 +13,6 @@ centos-stream-8-x86_64:
>    rules:
>    - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
>    - if: "$CENTOS_STREAM_8_x86_64_RUNNER_AVAILABLE"
> - artifacts:
> -   name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
> -   when: on_failure
> -   expire_in: 7 days
> -   paths:
> -     - build/tests/results/latest/results.xml
> -     - build/tests/results/latest/test-results
> -   reports:
> -     junit: build/tests/results/latest/results.xml
>    before_script:
>    - JOBS=$(expr $(nproc) + 1)
>    script:
> @@ -25,6 +21,4 @@ centos-stream-8-x86_64:
>    - ../scripts/ci/org.centos/stream/8/x86_64/configure
>      || { cat config.log meson-logs/meson-log.txt; exit 1; }
>    - make -j"$JOBS"
> - - make NINJA=":" check
> -   || { cat meson-logs/testlog.txt; exit 1; } ;
> - - ../scripts/ci/org.centos/stream/8/x86_64/test-avocado
> + - make NINJA=":" check check-avocado

Missing removing scripts/ci/org.centos/stream/8/x86_64/test-avocado
along with this patch.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PULL 00/31] various fixes (testing, plugins, gitdm)
  2023-03-20 14:43     ` Philippe Mathieu-Daudé
@ 2023-03-20 14:56       ` Daniel P. Berrangé
  2023-03-20 15:00         ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 20+ messages in thread
From: Daniel P. Berrangé @ 2023-03-20 14:56 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Alex Bennée, qemu-devel, Thomas Huth, Cleber Rosa

On Mon, Mar 20, 2023 at 03:43:07PM +0100, Philippe Mathieu-Daudé wrote:
> On 20/3/23 15:15, Daniel P. Berrangé wrote:
> > On Mon, Mar 20, 2023 at 01:42:46PM +0000, Peter Maydell wrote:
> > > On Sat, 18 Mar 2023 at 11:46, Alex Bennée <alex.bennee@linaro.org> wrote:
> > > > 
> > > > The following changes since commit 74c581b6452394e591f13beba9fea2ec0688e2f5:
> > > > 
> > > >    Merge tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-17 14:22:01 +0000)
> > > > 
> > > > are available in the Git repository at:
> > > > 
> > > >    https://gitlab.com/stsquad/qemu.git tags/pull-for-8.0-170323-4
> > > > 
> > > > for you to fetch changes up to 4f2c431acd43d0aa505494229d05fa343762f272:
> > > > 
> > > >    qtests: avoid printing comments before g_test_init() (2023-03-17
> > > >    17:50:19 +0000)
> > > > 
> > > > You can see my CI run on the branch here:
> > > > 
> > > >    https://gitlab.com/stsquad/qemu/-/pipelines/810271620
> > > > 
> > > > The failures:
> > > > 
> > > >    FreeBSD's time out on a migration test
> > > >    Centos8 Stream because my private runner needs more disk space
> > > > 
> > > > ----------------------------------------------------------------
> > > > Misc fixes for 8.0 (testing, plugins, gitdm)
> > > > 
> > > >    - update Alpine image used for testing images
> > > >    - include libslirp in custom runner build env
> > > >    - update gitlab-runner recipe for CentOS
> > > >    - update docker calls for better caching behaviour
> > > >    - document some plugin callbacks
> > > >    - don't use tags to define drives for lkft baseline tests
> > > >    - fix missing clear of plugin_mem_cbs
> > > >    - fix iotests to report individual results
> > > >    - update the gitdm metadata for contributors
> > > >    - avoid printing comments before g_test_init()
> > > > 
> > > 
> > > This seems to consistently fail an avocado test on the
> > > centos-stream-8-x86_64 job:
> > > (21/51) tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64:
> > > ERROR: ConnectError: Failed to establish session: EOFError\n Exit
> > > code: 1\n Command: ./qemu-system-x86_64 -display none -vga none
> > > -chardev socket,id=mon,fd=17 -mon chardev=mon,mode=control -machine
> > > x-remote -nodefaults -device lsi53c895a,id=lsi1 -object x-remote-o...
> > > (0.10 s)
> > > 
> > > https://gitlab.com/qemu-project/qemu/-/jobs/3962028269
> > > https://gitlab.com/qemu-project/qemu/-/jobs/3965134190
> > > 
> > > 
> > > 
> > > The iotests also don't seem to pass on the OpenBSD VM after this;
> > > which test fails varies from run to run but the common factor
> > > is a complaint about running out of disk space:
> > 
> > This must be caused by the change in the way we register the
> > iotests with meson, as I don't see any other interesting changes
> > in this series.
> 
> See "05/31 gitlab: update centos-8-stream job", now we call
> 'make check-avocado' instead of
> scripts/ci/org.centos/stream/8/x86_64/test-avocado.

I was referring to Peter's comment about the OpenBSD Vms showing
failures wrt out of disk space. That won't be connected to any
change to the centos 8 job

With 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 :|



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PULL 00/31] various fixes (testing, plugins, gitdm)
  2023-03-20 14:56       ` Daniel P. Berrangé
@ 2023-03-20 15:00         ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 20+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-20 15:00 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Peter Maydell, Alex Bennée, qemu-devel, Thomas Huth, Cleber Rosa

On 20/3/23 15:56, Daniel P. Berrangé wrote:
> On Mon, Mar 20, 2023 at 03:43:07PM +0100, Philippe Mathieu-Daudé wrote:
>> On 20/3/23 15:15, Daniel P. Berrangé wrote:
>>> On Mon, Mar 20, 2023 at 01:42:46PM +0000, Peter Maydell wrote:
>>>> On Sat, 18 Mar 2023 at 11:46, Alex Bennée <alex.bennee@linaro.org> wrote:
>>>>>
>>>>> The following changes since commit 74c581b6452394e591f13beba9fea2ec0688e2f5:
>>>>>
>>>>>     Merge tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-17 14:22:01 +0000)
>>>>>
>>>>> are available in the Git repository at:
>>>>>
>>>>>     https://gitlab.com/stsquad/qemu.git tags/pull-for-8.0-170323-4
>>>>>
>>>>> for you to fetch changes up to 4f2c431acd43d0aa505494229d05fa343762f272:
>>>>>
>>>>>     qtests: avoid printing comments before g_test_init() (2023-03-17
>>>>>     17:50:19 +0000)
>>>>>
>>>>> You can see my CI run on the branch here:
>>>>>
>>>>>     https://gitlab.com/stsquad/qemu/-/pipelines/810271620
>>>>>
>>>>> The failures:
>>>>>
>>>>>     FreeBSD's time out on a migration test
>>>>>     Centos8 Stream because my private runner needs more disk space
>>>>>
>>>>> ----------------------------------------------------------------
>>>>> Misc fixes for 8.0 (testing, plugins, gitdm)
>>>>>
>>>>>     - update Alpine image used for testing images
>>>>>     - include libslirp in custom runner build env
>>>>>     - update gitlab-runner recipe for CentOS
>>>>>     - update docker calls for better caching behaviour
>>>>>     - document some plugin callbacks
>>>>>     - don't use tags to define drives for lkft baseline tests
>>>>>     - fix missing clear of plugin_mem_cbs
>>>>>     - fix iotests to report individual results
>>>>>     - update the gitdm metadata for contributors
>>>>>     - avoid printing comments before g_test_init()
>>>>>
>>>>
>>>> This seems to consistently fail an avocado test on the
>>>> centos-stream-8-x86_64 job:
>>>> (21/51) tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64:
>>>> ERROR: ConnectError: Failed to establish session: EOFError\n Exit
>>>> code: 1\n Command: ./qemu-system-x86_64 -display none -vga none
>>>> -chardev socket,id=mon,fd=17 -mon chardev=mon,mode=control -machine
>>>> x-remote -nodefaults -device lsi53c895a,id=lsi1 -object x-remote-o...
>>>> (0.10 s)
>>>>
>>>> https://gitlab.com/qemu-project/qemu/-/jobs/3962028269
>>>> https://gitlab.com/qemu-project/qemu/-/jobs/3965134190
>>>>
>>>>
>>>>
>>>> The iotests also don't seem to pass on the OpenBSD VM after this;
>>>> which test fails varies from run to run but the common factor
>>>> is a complaint about running out of disk space:
>>>
>>> This must be caused by the change in the way we register the
>>> iotests with meson, as I don't see any other interesting changes
>>> in this series.
>>
>> See "05/31 gitlab: update centos-8-stream job", now we call
>> 'make check-avocado' instead of
>> scripts/ci/org.centos/stream/8/x86_64/test-avocado.
> 
> I was referring to Peter's comment about the OpenBSD Vms showing
> failures wrt out of disk space. That won't be connected to any
> change to the centos 8 job

): I really need more coffee



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PULL 05/31] gitlab: update centos-8-stream job
  2023-03-20 14:44   ` Philippe Mathieu-Daudé
@ 2023-03-20 17:11     ` Alex Bennée
  0 siblings, 0 replies; 20+ messages in thread
From: Alex Bennée @ 2023-03-20 17:11 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, peter.maydell, Thomas Huth,
	Wainer dos Santos Moschetta, Beraldo Leal


Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On 18/3/23 12:46, Alex Bennée wrote:
>> A couple of clean-ups here:
>>    - inherit from the custom runners job for artefacts
>
> "artifacts"
>
>>    - call check-avocado directly
>>    - add some comments to the top about setup
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>> Message-Id: <20230315174331.2959-6-alex.bennee@linaro.org>
>> diff --git a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml
>> b/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml
>> index 068b0c4335..367424db78 100644
>> --- a/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml
>> +++ b/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml
>> @@ -1,4 +1,9 @@
>> +# All centos-stream-8 jobs should run successfully in an environment
>> +# setup by the scripts/ci/setup/stream/8/build-environment.yml task
>> +# "Installation of extra packages to build QEMU"
>> +
>>   centos-stream-8-x86_64:
>> + extends: .custom_runner_template
>>    allow_failure: true
>>    needs: []
>>    stage: build
>> @@ -8,15 +13,6 @@ centos-stream-8-x86_64:
>>    rules:
>>    - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
>>    - if: "$CENTOS_STREAM_8_x86_64_RUNNER_AVAILABLE"
>> - artifacts:
>> -   name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
>> -   when: on_failure
>> -   expire_in: 7 days
>> -   paths:
>> -     - build/tests/results/latest/results.xml
>> -     - build/tests/results/latest/test-results
>> -   reports:
>> -     junit: build/tests/results/latest/results.xml
>>    before_script:
>>    - JOBS=$(expr $(nproc) + 1)
>>    script:
>> @@ -25,6 +21,4 @@ centos-stream-8-x86_64:
>>    - ../scripts/ci/org.centos/stream/8/x86_64/configure
>>      || { cat config.log meson-logs/meson-log.txt; exit 1; }
>>    - make -j"$JOBS"
>> - - make NINJA=":" check
>> -   || { cat meson-logs/testlog.txt; exit 1; } ;
>> - - ../scripts/ci/org.centos/stream/8/x86_64/test-avocado
>> + - make NINJA=":" check check-avocado
>
> Missing removing scripts/ci/org.centos/stream/8/x86_64/test-avocado
> along with this patch.

Given the failure running check-avocado maybe I should drop this part of
the change. I was aiming for increasing coverage but perhaps we should
stick with the limited cross section of tests?

Anyway I'm re-building my Centos8 Stream box now with more disk space to
see if I can see whats going wrong.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PULL 00/31] various fixes (testing, plugins, gitdm)
  2023-03-20 14:15   ` Daniel P. Berrangé
  2023-03-20 14:43     ` Philippe Mathieu-Daudé
@ 2023-03-22 12:47     ` Daniel P. Berrangé
  1 sibling, 0 replies; 20+ messages in thread
From: Daniel P. Berrangé @ 2023-03-22 12:47 UTC (permalink / raw)
  To: Peter Maydell, Alex Bennée, qemu-devel

On Mon, Mar 20, 2023 at 02:15:19PM +0000, Daniel P. Berrangé wrote:
> On Mon, Mar 20, 2023 at 01:42:46PM +0000, Peter Maydell wrote:
> > On Sat, 18 Mar 2023 at 11:46, Alex Bennée <alex.bennee@linaro.org> wrote:
> > >
> > > The following changes since commit 74c581b6452394e591f13beba9fea2ec0688e2f5:
> > >
> > >   Merge tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-03-17 14:22:01 +0000)
> > >
> > > are available in the Git repository at:
> > >
> > >   https://gitlab.com/stsquad/qemu.git tags/pull-for-8.0-170323-4
> > >
> > > for you to fetch changes up to 4f2c431acd43d0aa505494229d05fa343762f272:
> > >
> > >   qtests: avoid printing comments before g_test_init() (2023-03-17
> > >   17:50:19 +0000)
> > >
> > > You can see my CI run on the branch here:
> > >
> > >   https://gitlab.com/stsquad/qemu/-/pipelines/810271620
> > >
> > > The failures:
> > >
> > >   FreeBSD's time out on a migration test
> > >   Centos8 Stream because my private runner needs more disk space
> > >
> > > ----------------------------------------------------------------
> > > Misc fixes for 8.0 (testing, plugins, gitdm)
> > >
> > >   - update Alpine image used for testing images
> > >   - include libslirp in custom runner build env
> > >   - update gitlab-runner recipe for CentOS
> > >   - update docker calls for better caching behaviour
> > >   - document some plugin callbacks
> > >   - don't use tags to define drives for lkft baseline tests
> > >   - fix missing clear of plugin_mem_cbs
> > >   - fix iotests to report individual results
> > >   - update the gitdm metadata for contributors
> > >   - avoid printing comments before g_test_init()
> > >

snip

> > The iotests also don't seem to pass on the OpenBSD VM after this;
> > which test fails varies from run to run but the common factor
> > is a complaint about running out of disk space:
> 
> This must be caused by the change in the way we register the
> iotests with meson, as I don't see any other interesting changes
> in this series.

snip

> So the change in parallelism is that we can potentially run the
> block I/O tests in parallel with unit tests. Maybe parallel with
> avocado tests too, I'm not sure ?

So the increased parallelism was the trigger, but the root cause is
in the VM. The openbsd image, despite being 20 GB in size, only
has 3.5 GB available for /home. The rest is wasted on assignments
to other partitions we're not even using :-( I've proposed a patch
to create a saner partitioning scheme

  https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg05613.html

I could reproduce the ENOSPC easily myself, and after applying this
series above, the ENOSPC unsurprisingly goes away.

With 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 :|



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-03-22 12:48 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18 11:46 [PULL 00/31] various fixes (testing, plugins, gitdm) Alex Bennée
2023-03-18 11:46 ` [PULL 01/31] tests/avocado: update AArch64 tests to Alpine 3.17.2 Alex Bennée
2023-03-18 11:46 ` [PULL 02/31] tests/docker: all add DOCKER_BUILDKIT to RUNC environment Alex Bennée
2023-03-18 11:46 ` [PULL 03/31] scripts/ci: add libslirp-devel to build-environment Alex Bennée
2023-03-18 11:46 ` [PULL 04/31] scripts/ci: update gitlab-runner playbook to handle CentOS Alex Bennée
2023-03-18 11:46 ` [PULL 05/31] gitlab: update centos-8-stream job Alex Bennée
2023-03-20 14:44   ` Philippe Mathieu-Daudé
2023-03-20 17:11     ` Alex Bennée
2023-03-18 11:46 ` [PULL 06/31] include/qemu: add documentation for memory callbacks Alex Bennée
2023-03-18 11:46 ` [PULL 07/31] tests/tcg: add some help output for running individual tests Alex Bennée
2023-03-18 11:46 ` [PULL 08/31] tests/avocado: don't use tags to define drive Alex Bennée
2023-03-18 11:46 ` [PULL 09/31] tcg: Clear plugin_mem_cbs on TB exit Alex Bennée
2023-03-18 11:46 ` [PULL 10/31] tcg: Drop plugin_gen_disable_mem_helpers from tcg_gen_exit_tb Alex Bennée
2023-03-18 11:46 ` [PULL 11/31] include/qemu/plugin: Remove QEMU_PLUGIN_ASSERT Alex Bennée
2023-03-20 13:42 ` [PULL 00/31] various fixes (testing, plugins, gitdm) Peter Maydell
2023-03-20 14:15   ` Daniel P. Berrangé
2023-03-20 14:43     ` Philippe Mathieu-Daudé
2023-03-20 14:56       ` Daniel P. Berrangé
2023-03-20 15:00         ` Philippe Mathieu-Daudé
2023-03-22 12:47     ` Daniel P. Berrangé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.