* [PATCH v3 01/36] gitlab: explicit set artifacts publishing criteria
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 02/36] gitlab: ensure coverage job also publishes meson log Alex Bennée
` (16 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
From: Daniel P. Berrangé <berrange@redhat.com>
If not set explicitly, gitlab assumes 'when: on_success" as the
publishing criteria for artifacts. This is reasonable if the
artifact is an output deliverable of the job. This is useless
if the artifact is a log file to be used for debugging job
failures.
This change makes the desired criteria explicit for every job
that publishes artifacts.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230623122100.1640995-2-alex.bennee@linaro.org>
Message-Id: <20230503145535.91325-2-berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.gitlab-ci.d/buildtest-template.yml | 4 +++-
.gitlab-ci.d/buildtest.yml | 2 ++
.gitlab-ci.d/crossbuild-template.yml | 1 +
.gitlab-ci.d/crossbuilds.yml | 2 ++
.gitlab-ci.d/opensbi.yml | 1 +
5 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index 5da61f4277..f3e39b7eb1 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -25,6 +25,7 @@
# rebuilding all the object files we skip in the artifacts
.native_build_artifact_template:
artifacts:
+ when: on_success
expire_in: 2 days
paths:
- build
@@ -53,6 +54,7 @@
extends: .common_test_job_template
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
+ when: always
expire_in: 7 days
paths:
- build/meson-logs/testlog.txt
@@ -68,7 +70,7 @@
policy: pull-push
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
- when: on_failure
+ when: always
expire_in: 7 days
paths:
- build/tests/results/latest/results.xml
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index aa833b62ca..24bba061cd 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -462,6 +462,7 @@ gcov:
coverage: /^\s*lines:\s*\d+.\d+\%/
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
+ when: on_success
expire_in: 2 days
reports:
coverage_report:
@@ -587,6 +588,7 @@ pages:
- make -C build install DESTDIR=$(pwd)/temp-install
- mv temp-install/usr/local/share/doc/qemu/* public/
artifacts:
+ when: on_success
paths:
- public
variables:
diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml
index 6efb0d2a54..d97611053b 100644
--- a/.gitlab-ci.d/crossbuild-template.yml
+++ b/.gitlab-ci.d/crossbuild-template.yml
@@ -55,6 +55,7 @@
.cross_test_artifacts:
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
+ when: always
expire_in: 7 days
paths:
- build/meson-logs/testlog.txt
diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml
index 1e0e6c7f2c..34f9df2be9 100644
--- a/.gitlab-ci.d/crossbuilds.yml
+++ b/.gitlab-ci.d/crossbuilds.yml
@@ -169,6 +169,7 @@ cross-win32-system:
CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu m68k-softmmu
microblazeel-softmmu mips64el-softmmu nios2-softmmu
artifacts:
+ when: on_success
paths:
- build/qemu-setup*.exe
@@ -184,6 +185,7 @@ cross-win64-system:
or1k-softmmu rx-softmmu sh4eb-softmmu sparc64-softmmu
tricore-softmmu xtensaeb-softmmu
artifacts:
+ when: on_success
paths:
- build/qemu-setup*.exe
diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml
index b4d7eef688..fd293e6c31 100644
--- a/.gitlab-ci.d/opensbi.yml
+++ b/.gitlab-ci.d/opensbi.yml
@@ -63,6 +63,7 @@ build-opensbi:
stage: build
needs: ['docker-opensbi']
artifacts:
+ when: on_success
paths: # 'artifacts.zip' will contains the following files:
- pc-bios/opensbi-riscv32-generic-fw_dynamic.bin
- pc-bios/opensbi-riscv64-generic-fw_dynamic.bin
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 02/36] gitlab: ensure coverage job also publishes meson log
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
2023-06-27 16:06 ` [PATCH v3 01/36] gitlab: explicit set artifacts publishing criteria Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 03/36] gitlab: reduce testing scope of check-gcov Alex Bennée
` (15 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
From: Daniel P. Berrangé <berrange@redhat.com>
The coverage job wants to publish a coverage report on success, but the
tests might fail and in that case we need the meson logs for debugging.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230623122100.1640995-3-alex.bennee@linaro.org>
Message-Id: <20230503145535.91325-3-berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.gitlab-ci.d/buildtest.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 24bba061cd..a8fd9a0c1f 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -462,9 +462,12 @@ gcov:
coverage: /^\s*lines:\s*\d+.\d+\%/
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
- when: on_success
+ when: always
expire_in: 2 days
+ paths:
+ - build/meson-logs/testlog.txt
reports:
+ junit: build/meson-logs/testlog.junit.xml
coverage_report:
coverage_format: cobertura
path: build/coverage.xml
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 03/36] gitlab: reduce testing scope of check-gcov
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
2023-06-27 16:06 ` [PATCH v3 01/36] gitlab: explicit set artifacts publishing criteria Alex Bennée
2023-06-27 16:06 ` [PATCH v3 02/36] gitlab: ensure coverage job also publishes meson log Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 04/36] docs/devel: remind developers to run CI container pipeline when updating images Alex Bennée
` (14 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
This keeps timing out on gitlab due to some qtests taking a long time.
As this is just ensuring the gcov machinery is working and not
attempting to be comprehensive lets skip qtest in this run.
Message-Id: <20230623122100.1640995-4-alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.gitlab-ci.d/buildtest.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index a8fd9a0c1f..77dc83a6be 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -454,7 +454,7 @@ gcov:
IMAGE: ubuntu2204
CONFIGURE_ARGS: --enable-gcov
TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
- MAKE_CHECK_ARGS: check
+ MAKE_CHECK_ARGS: check-unit check-softfloat
after_script:
- cd build
- gcovr --xml-pretty --exclude-unreachable-branches --print-summary
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 04/36] docs/devel: remind developers to run CI container pipeline when updating images
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (2 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 03/36] gitlab: reduce testing scope of check-gcov Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 05/36] tests/tcg: add mechanism to handle plugin arguments Alex Bennée
` (13 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov, Ani Sinha
From: Ani Sinha <anisinha@redhat.com>
When new dependencies and packages are added to containers, its important to
run CI container generation pipelines on gitlab to make sure that there are no
obvious conflicts between packages that are being added and those that are
already present. Running CI container pipelines will make sure that there are
no such breakages before we commit the change updating the containers. Add a
line in the documentation reminding developers to run the pipeline before
submitting the change. It will also ease the life of the maintainers.
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230506072012.10350-1-anisinha@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
docs/devel/testing.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 203facb417..8f18052ba7 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -485,6 +485,12 @@ first to contribute the mapping to the ``libvirt-ci`` project:
`CI <https://www.qemu.org/docs/master/devel/ci.html>`__ documentation
page on how to trigger gitlab CI pipelines on your change.
+ * Please also trigger gitlab container generation pipelines on your change
+ for as many OS distros as practical to make sure that there are no
+ obvious breakages when adding the new pre-requisite. Please see
+ `CI <https://www.qemu.org/docs/master/devel/ci.html>`__ documentation
+ page on how to trigger gitlab CI pipelines on your change.
+
For enterprise distros that default to old, end-of-life versions of the
Python runtime, QEMU uses a separate set of mappings that work with more
recent versions. These can be found in ``tests/lcitool/mappings.yml``.
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 05/36] tests/tcg: add mechanism to handle plugin arguments
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (3 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 04/36] docs/devel: remind developers to run CI container pipeline when updating images Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 06/36] qemu-keymap: properly check return from xkb_keymap_mod_get_index Alex Bennée
` (12 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
We recently missed a regression that should have been picked up by
check-tcg. This was because the libmem plugin is effectively a NOP if
the user doesn't specify the type to use.
Rather than changing the default behaviour add an additional expansion
so we can take this into account in future.
Message-Id: <20230623122100.1640995-6-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
tests/tcg/Makefile.target | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target
index 72876cc84e..2462c26000 100644
--- a/tests/tcg/Makefile.target
+++ b/tests/tcg/Makefile.target
@@ -169,13 +169,17 @@ extract-plugin = $(wordlist 2, 2, $(subst -with-, ,$1))
RUN_TESTS+=$(EXTRA_RUNS)
+# Some plugins need additional arguments above the default to fully
+# exercise things. We can define them on a per-test basis here.
+run-plugin-%-with-libmem.so: PLUGIN_ARGS=$(COMMA)inline=true$(COMMA)callback=true
+
ifeq ($(filter %-softmmu, $(TARGET)),)
run-%: %
$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<)
run-plugin-%:
$(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
- -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
+ -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@)$(PLUGIN_ARGS) \
-d plugin -D $*.pout \
$(call strip-plugin,$<))
else
@@ -189,7 +193,7 @@ run-plugin-%:
$(call run-test, $@, \
$(QEMU) -monitor none -display none \
-chardev file$(COMMA)path=$@.out$(COMMA)id=output \
- -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
+ -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@)$(PLUGIN_ARGS) \
-d plugin -D $*.pout \
$(QEMU_OPTS) $(call strip-plugin,$<))
endif
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 06/36] qemu-keymap: properly check return from xkb_keymap_mod_get_index
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (4 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 05/36] tests/tcg: add mechanism to handle plugin arguments Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 07/36] scripts/oss-fuzz: add a suppression for keymap Alex Bennée
` (11 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
We can return XKB_MOD_INVALID for AltGr which rightly gets flagged by
sanitisers as an overly wide shift attempt. Properly check the return
type and leave the bitmap as zero in that case. Tested output before
and after is unchanged with the gb and ara keymaps.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
---
qemu-keymap.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/qemu-keymap.c b/qemu-keymap.c
index 229866e004..8c80f7a4ed 100644
--- a/qemu-keymap.c
+++ b/qemu-keymap.c
@@ -140,6 +140,18 @@ static void usage(FILE *out)
names.options ?: "-");
}
+static xkb_mod_mask_t get_mod(struct xkb_keymap *map, const char *name)
+{
+ xkb_mod_index_t mod;
+ xkb_mod_mask_t mask = 0;
+
+ mod = xkb_keymap_mod_get_index(map, name);
+ if (mod != XKB_MOD_INVALID) {
+ mask = (1 << mod);
+ }
+ return mask;
+}
+
int main(int argc, char *argv[])
{
struct xkb_context *ctx;
@@ -215,14 +227,10 @@ int main(int argc, char *argv[])
mod, xkb_keymap_mod_get_name(map, mod));
}
- mod = xkb_keymap_mod_get_index(map, "Shift");
- shift = (1 << mod);
- mod = xkb_keymap_mod_get_index(map, "Control");
- ctrl = (1 << mod);
- mod = xkb_keymap_mod_get_index(map, "AltGr");
- altgr = (1 << mod);
- mod = xkb_keymap_mod_get_index(map, "NumLock");
- numlock = (1 << mod);
+ shift = get_mod(map, "Shift");
+ ctrl = get_mod(map, "Control");
+ altgr = get_mod(map, "AltGr");
+ numlock = get_mod(map, "NumLock");
state = xkb_state_new(map);
xkb_keymap_key_for_each(map, walk_map, state);
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 07/36] scripts/oss-fuzz: add a suppression for keymap
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (5 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 06/36] qemu-keymap: properly check return from xkb_keymap_mod_get_index Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 08/36] tests/qtests: clean-up and fix leak in generic_fuzz Alex Bennée
` (10 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
When updating to the latest fedora the santizer found more leaks
inside xkbmap:
FAILED: pc-bios/keymaps/ar
/builds/stsquad/qemu/build-oss-fuzz/qemu-keymap -f pc-bios/keymaps/ar -l ara
=================================================================
==3604==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1424 byte(s) in 1 object(s) allocated from:
#0 0x56316418ebec in __interceptor_calloc (/builds/stsquad/qemu/build-oss-fuzz/qemu-keymap+0x127bec) (BuildId: a2ad9da3190962acaa010fa8f44a9269f9081e1c)
#1 0x7f60d4dc067e (/lib64/libxkbcommon.so.0+0x1c67e) (BuildId: b243a34e4e58e6a30b93771c256268b114d34b80)
#2 0x7f60d4dc2137 in xkb_keymap_new_from_names (/lib64/libxkbcommon.so.0+0x1e137) (BuildId: b243a34e4e58e6a30b93771c256268b114d34b80)
#3 0x5631641ca50f in main /builds/stsquad/qemu/build-oss-fuzz/../qemu-keymap.c:215:11
and many more. As we can't do anything about the library add a
suppression to keep the CI going with what its meant to be doing.
Message-Id: <20230623122100.1640995-9-alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/oss-fuzz/lsan_suppressions.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/oss-fuzz/lsan_suppressions.txt b/scripts/oss-fuzz/lsan_suppressions.txt
index 02ec0a6ed5..7d90c280d0 100644
--- a/scripts/oss-fuzz/lsan_suppressions.txt
+++ b/scripts/oss-fuzz/lsan_suppressions.txt
@@ -1,2 +1,5 @@
# The tcmalloc on Fedora37 confuses things
leak:/lib64/libtcmalloc_minimal.so.4
+
+# libxkbcommon also leaks in qemu-keymap
+leak:/lib64/libxkbcommon.so.0
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 08/36] tests/qtests: clean-up and fix leak in generic_fuzz
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (6 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 07/36] scripts/oss-fuzz: add a suppression for keymap Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 09/36] tests/docker: add test-fuzz Alex Bennée
` (9 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
An update to the clang tooling detects more issues with the code
including a memory leak from the g_string_new() allocation. Clean up
the code to avoid the allocation and use ARRAY_SIZE while we are at
it.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/qtest/fuzz/generic_fuzz.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c
index c525d22951..d0a59f7475 100644
--- a/tests/qtest/fuzz/generic_fuzz.c
+++ b/tests/qtest/fuzz/generic_fuzz.c
@@ -954,17 +954,10 @@ static void register_generic_fuzz_targets(void)
.crossover = generic_fuzz_crossover
});
- GString *name;
- const generic_fuzz_config *config;
-
- for (int i = 0;
- i < sizeof(predefined_configs) / sizeof(generic_fuzz_config);
- i++) {
+ for (int i = 0; i < ARRAY_SIZE(predefined_configs); i++) {
config = predefined_configs + i;
- name = g_string_new("generic-fuzz");
- g_string_append_printf(name, "-%s", config->name);
fuzz_add_target(&(FuzzTarget){
- .name = name->str,
+ .name = g_strconcat("generic-fuzz-", config->name, NULL),
.description = "Predefined generic-fuzz config.",
.get_init_cmdline = generic_fuzz_predefined_config_cmdline,
.pre_fuzz = generic_pre_fuzz,
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 09/36] tests/docker: add test-fuzz
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (7 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 08/36] tests/qtests: clean-up and fix leak in generic_fuzz Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 10/36] Makefile: add lcitool-refresh to UNCHECKED_GOALS Alex Bennée
` (8 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
Running the fuzzer requires some hoop jumping and some problems only
show up in containers. This basically replicates the build-oss-fuzz
job from our CI so we can run in the same containers we use in CI.
Message-Id: <20230626215926.2522656-10-alex.bennee@linaro.org>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v3
- checkpatch cleanups
---
MAINTAINERS | 1 +
tests/docker/test-fuzz | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
create mode 100755 tests/docker/test-fuzz
diff --git a/MAINTAINERS b/MAINTAINERS
index e07746ac7d..3cfc389db0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3106,6 +3106,7 @@ R: Qiuhao Li <Qiuhao.Li@outlook.com>
S: Maintained
F: tests/qtest/fuzz/
F: tests/qtest/fuzz-*test.c
+F: tests/docker/test-fuzz
F: scripts/oss-fuzz/
F: hw/mem/sparse-mem.c
F: docs/devel/fuzzing.rst
diff --git a/tests/docker/test-fuzz b/tests/docker/test-fuzz
new file mode 100755
index 0000000000..7e506ae1f6
--- /dev/null
+++ b/tests/docker/test-fuzz
@@ -0,0 +1,28 @@
+#!/bin/bash -e
+#
+# Compile and check with oss-fuzz.
+#
+# Copyright (c) 2023 Linaro Ltd.
+#
+# Authors:
+# Alex Bennée <alex.bennee@linaro.org>
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+. common.rc
+
+requires_binary clang
+
+# the build script runs out of $src so we need to copy across
+cd "$BUILD_DIR"
+cp -a $QEMU_SRC .
+cd src
+mkdir build-oss-fuzz
+export LSAN_OPTIONS=suppressions=scripts/oss-fuzz/lsan_suppressions.txt
+env CC="clang" CXX="clang++" CFLAGS="-fsanitize=address" ./scripts/oss-fuzz/build.sh
+export ASAN_OPTIONS="fast_unwind_on_malloc=0"
+for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f | grep -v slirp); do
+ grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
+ echo Testing ${fuzzer} ... ;
+ "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
+done
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 10/36] Makefile: add lcitool-refresh to UNCHECKED_GOALS
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (8 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 09/36] tests/docker: add test-fuzz Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 11/36] tests/lcitool: update to latest version Alex Bennée
` (7 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
This is yet another make target you usually run in the top level of
the source directory.
Message-Id: <20230623122100.1640995-12-alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 804a5681e0..5d48dfac18 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,7 @@ quiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3)
UNCHECKED_GOALS := TAGS gtags cscope ctags dist \
help check-help print-% \
- docker docker-% vm-help vm-test vm-build-%
+ docker docker-% lcitool-refresh vm-help vm-test vm-build-%
all:
.PHONY: all clean distclean recurse-all dist msi FORCE
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 11/36] tests/lcitool: update to latest version
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (9 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 10/36] Makefile: add lcitool-refresh to UNCHECKED_GOALS Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 12/36] tests/lcitool: Bump fedora container versions Alex Bennée
` (6 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
We need this for the riscv64 and gcc-native mappings. As the older
alpine release has been dropped from the mappings we also need to bump
the version of alpine we use.
Message-Id: <20230623122100.1640995-13-alex.bennee@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/docker/dockerfiles/alpine.docker | 4 ++--
tests/lcitool/libvirt-ci | 2 +-
tests/lcitool/refresh | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker
index 0097637dca..43370f7b36 100644
--- a/tests/docker/dockerfiles/alpine.docker
+++ b/tests/docker/dockerfiles/alpine.docker
@@ -1,10 +1,10 @@
# THIS FILE WAS AUTO-GENERATED
#
-# $ lcitool dockerfile --layers all alpine-316 qemu
+# $ lcitool dockerfile --layers all alpine-318 qemu
#
# https://gitlab.com/libvirt/libvirt-ci
-FROM docker.io/library/alpine:3.16
+FROM docker.io/library/alpine:3.18
RUN apk update && \
apk upgrade && \
diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci
index c8971e90ac..b0f44f929a 160000
--- a/tests/lcitool/libvirt-ci
+++ b/tests/lcitool/libvirt-ci
@@ -1 +1 @@
-Subproject commit c8971e90ac169ee2b539c747f74d96c876debdf9
+Subproject commit b0f44f929a81c0a604fb7fbf8afc34d37ab0eae9
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index f1570b54df..5d36a62b10 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -115,7 +115,7 @@ try:
#
# Standard native builds
#
- generate_dockerfile("alpine", "alpine-316")
+ generate_dockerfile("alpine", "alpine-318")
generate_dockerfile("centos8", "centos-stream-8")
generate_dockerfile("debian-amd64", "debian-11",
trailer="".join(debian11_extras))
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 12/36] tests/lcitool: Bump fedora container versions
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (10 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 11/36] tests/lcitool: update to latest version Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 13/36] tests/lcitool: add an explicit gcc-native package Alex Bennée
` (5 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov, Erik Skultety
From: Erik Skultety <eskultet@redhat.com>
Fedora 37 -> 38
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230623122100.1640995-14-alex.bennee@linaro.org>
Message-Id: <c9b00e573a7a80fc6ce5c68595382f5c916a9195.1685528076.git.eskultet@redhat.com>
[AJB: Dropped alpine (in prev commit), reflow commit msg]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/docker/dockerfiles/fedora-win32-cross.docker | 4 ++--
tests/docker/dockerfiles/fedora-win64-cross.docker | 4 ++--
tests/docker/dockerfiles/fedora.docker | 4 ++--
tests/lcitool/refresh | 6 +++---
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
index dc72ae9cc9..a0a3cd9e5b 100644
--- a/tests/docker/dockerfiles/fedora-win32-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -1,10 +1,10 @@
# THIS FILE WAS AUTO-GENERATED
#
-# $ lcitool dockerfile --layers all --cross mingw32 fedora-37 qemu
+# $ lcitool dockerfile --layers all --cross mingw32 fedora-38 qemu
#
# https://gitlab.com/libvirt/libvirt-ci
-FROM registry.fedoraproject.org/fedora:37
+FROM registry.fedoraproject.org/fedora:38
RUN dnf install -y nosync && \
printf '#!/bin/sh\n\
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index 7eb4a5dba2..b6c1a6a339 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -1,10 +1,10 @@
# THIS FILE WAS AUTO-GENERATED
#
-# $ lcitool dockerfile --layers all --cross mingw64 fedora-37 qemu
+# $ lcitool dockerfile --layers all --cross mingw64 fedora-38 qemu
#
# https://gitlab.com/libvirt/libvirt-ci
-FROM registry.fedoraproject.org/fedora:37
+FROM registry.fedoraproject.org/fedora:38
RUN dnf install -y nosync && \
printf '#!/bin/sh\n\
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 3a69eefdda..8a35a17617 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -1,10 +1,10 @@
# THIS FILE WAS AUTO-GENERATED
#
-# $ lcitool dockerfile --layers all fedora-37 qemu
+# $ lcitool dockerfile --layers all fedora-38 qemu
#
# https://gitlab.com/libvirt/libvirt-ci
-FROM registry.fedoraproject.org/fedora:37
+FROM registry.fedoraproject.org/fedora:38
RUN dnf install -y nosync && \
printf '#!/bin/sh\n\
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index 5d36a62b10..5e06fb2cf5 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -119,7 +119,7 @@ try:
generate_dockerfile("centos8", "centos-stream-8")
generate_dockerfile("debian-amd64", "debian-11",
trailer="".join(debian11_extras))
- generate_dockerfile("fedora", "fedora-37")
+ generate_dockerfile("fedora", "fedora-38")
generate_dockerfile("opensuse-leap", "opensuse-leap-15")
generate_dockerfile("ubuntu2004", "ubuntu-2004")
generate_dockerfile("ubuntu2204", "ubuntu-2204")
@@ -169,12 +169,12 @@ try:
trailer=cross_build("s390x-linux-gnu-",
"s390x-softmmu,s390x-linux-user"))
- generate_dockerfile("fedora-win32-cross", "fedora-37",
+ generate_dockerfile("fedora-win32-cross", "fedora-38",
cross="mingw32",
trailer=cross_build("i686-w64-mingw32-",
"i386-softmmu"))
- generate_dockerfile("fedora-win64-cross", "fedora-37",
+ generate_dockerfile("fedora-win64-cross", "fedora-38",
cross="mingw64",
trailer=cross_build("x86_64-w64-mingw32-",
"x86_64-softmmu"))
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 13/36] tests/lcitool: add an explicit gcc-native package
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (11 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 12/36] tests/lcitool: Bump fedora container versions Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 14/36] tests/lcitool: introduce qemu-minimal Alex Bennée
` (4 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
We need a native compiler to build the hexagon codegen tools. In our
current images we already have a gcc as a side effect of a broken
dependency between gcovr and lcov but this will be fixed when we move
to bookworm. See
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987818 for details.
Update the packages while we are at it.
Message-Id: <20230623122100.1640995-15-alex.bennee@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/docker/dockerfiles/debian-amd64-cross.docker | 1 +
tests/docker/dockerfiles/debian-arm64-cross.docker | 1 +
tests/docker/dockerfiles/debian-armel-cross.docker | 1 +
tests/docker/dockerfiles/debian-armhf-cross.docker | 1 +
tests/docker/dockerfiles/debian-mips64el-cross.docker | 1 +
tests/docker/dockerfiles/debian-mipsel-cross.docker | 1 +
tests/docker/dockerfiles/debian-ppc64el-cross.docker | 1 +
tests/docker/dockerfiles/debian-s390x-cross.docker | 1 +
tests/docker/dockerfiles/fedora-win32-cross.docker | 1 +
tests/docker/dockerfiles/fedora-win64-cross.docker | 1 +
tests/lcitool/projects/qemu.yml | 1 +
11 files changed, 11 insertions(+)
diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/docker/dockerfiles/debian-amd64-cross.docker
index 40a2b6acc4..016c2321f1 100644
--- a/tests/docker/dockerfiles/debian-amd64-cross.docker
+++ b/tests/docker/dockerfiles/debian-amd64-cross.docker
@@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
exuberant-ctags \
findutils \
flex \
+ gcc \
gcovr \
gettext \
git \
diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
index c99300bbfa..3c114efa11 100644
--- a/tests/docker/dockerfiles/debian-arm64-cross.docker
+++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
@@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
exuberant-ctags \
findutils \
flex \
+ gcc \
gcovr \
gettext \
git \
diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker
index 5db5c78b31..dfbd47db89 100644
--- a/tests/docker/dockerfiles/debian-armel-cross.docker
+++ b/tests/docker/dockerfiles/debian-armel-cross.docker
@@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
exuberant-ctags \
findutils \
flex \
+ gcc \
gcovr \
gettext \
git \
diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker
index ae6600b25f..4e0084e896 100644
--- a/tests/docker/dockerfiles/debian-armhf-cross.docker
+++ b/tests/docker/dockerfiles/debian-armhf-cross.docker
@@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
exuberant-ctags \
findutils \
flex \
+ gcc \
gcovr \
gettext \
git \
diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker
index daa2d48e36..88adf333e9 100644
--- a/tests/docker/dockerfiles/debian-mips64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker
@@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
exuberant-ctags \
findutils \
flex \
+ gcc \
gcovr \
gettext \
git \
diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker
index 5af04e2054..256e8b5dfe 100644
--- a/tests/docker/dockerfiles/debian-mipsel-cross.docker
+++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker
@@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
exuberant-ctags \
findutils \
flex \
+ gcc \
gcovr \
gettext \
git \
diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
index 1eeba7fcab..4d19cd2bd7 100644
--- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
@@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
exuberant-ctags \
findutils \
flex \
+ gcc \
gcovr \
gettext \
git \
diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker
index 52e89a6dab..642bbde3d1 100644
--- a/tests/docker/dockerfiles/debian-s390x-cross.docker
+++ b/tests/docker/dockerfiles/debian-s390x-cross.docker
@@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
exuberant-ctags \
findutils \
flex \
+ gcc \
gcovr \
gettext \
git \
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
index a0a3cd9e5b..e3dfd68bed 100644
--- a/tests/docker/dockerfiles/fedora-win32-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -29,6 +29,7 @@ exec "$@"\n' > /usr/bin/nosync && \
diffutils \
findutils \
flex \
+ gcc \
gcovr \
git \
glib2-devel \
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index b6c1a6a339..0e15c9643a 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -29,6 +29,7 @@ exec "$@"\n' > /usr/bin/nosync && \
diffutils \
findutils \
flex \
+ gcc \
gcovr \
git \
glib2-devel \
diff --git a/tests/lcitool/projects/qemu.yml b/tests/lcitool/projects/qemu.yml
index 566db8313b..21fd3d2cf9 100644
--- a/tests/lcitool/projects/qemu.yml
+++ b/tests/lcitool/projects/qemu.yml
@@ -24,6 +24,7 @@ packages:
- fuse3
- g++
- gcc
+ - gcc-native
- gcovr
- gettext
- glib2
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 14/36] tests/lcitool: introduce qemu-minimal
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (12 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 13/36] tests/lcitool: add an explicit gcc-native package Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 15/36] tests/docker: convert riscv64-cross to lcitool Alex Bennée
` (3 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
This is a very bare bones set of dependencies for a minimal build of
QEMU. This will be useful for minimal cross-compile sanity check based
on things like Debian Sid where stuff isn't always in sync.
Message-Id: <20230623122100.1640995-16-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v2
- minor rewording
---
tests/lcitool/projects/qemu-minimal.yml | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 tests/lcitool/projects/qemu-minimal.yml
diff --git a/tests/lcitool/projects/qemu-minimal.yml b/tests/lcitool/projects/qemu-minimal.yml
new file mode 100644
index 0000000000..b60fec715c
--- /dev/null
+++ b/tests/lcitool/projects/qemu-minimal.yml
@@ -0,0 +1,23 @@
+# Very minimal set of qemu packages, used for minimal cross-compile sanity checks
+---
+packages:
+ - bash
+ - bc
+ - bison
+ - flex
+ - g++
+ - gcc
+ - gcc-native
+ - glib2
+ - glib2-native
+ - glib2-static
+ - libc-static
+ - libfdt
+ - libffi
+ - make
+ - meson
+ - ninja
+ - pixman
+ - pkg-config
+ - python3
+ - python3-venv
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 15/36] tests/docker: convert riscv64-cross to lcitool
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (13 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 14/36] tests/lcitool: introduce qemu-minimal Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 16/36] tests/avocado: update firmware to enable sbsa-ref/max Alex Bennée
` (2 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
We still need to base this on Debian Sid until riscv64 is promoted to
a release architecture (or another distro provides a full cross
compile target). We use the new qemu-minimal project description to
avoid bringing in all the extra dependencies because every extra
package is another chance for sid to fail.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.../dockerfiles/debian-riscv64-cross.docker | 119 +++++++++++-------
tests/lcitool/projects/qemu-minimal.yml | 4 +
tests/lcitool/refresh | 10 +-
3 files changed, 87 insertions(+), 46 deletions(-)
diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker b/tests/docker/dockerfiles/debian-riscv64-cross.docker
index 081404e014..a2d879ee1f 100644
--- a/tests/docker/dockerfiles/debian-riscv64-cross.docker
+++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker
@@ -1,54 +1,85 @@
+# THIS FILE WAS AUTO-GENERATED
#
-# Docker cross-compiler target for riscv64
+# $ lcitool dockerfile --layers all --cross riscv64 debian-sid qemu-minimal
#
-# Currently the only distro that gets close to cross compiling riscv64
-# images is Debian Sid (with unofficial ports). As this is a moving
-# target we keep the library list minimal and are aiming to migrate
-# from this hack as soon as we are able.
-#
-FROM docker.io/library/debian:sid-slim
+# https://gitlab.com/libvirt/libvirt-ci
-# Add ports
-RUN apt update && \
- DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
- DEBIAN_FRONTEND=noninteractive eatmydata apt update -yy && \
- DEBIAN_FRONTEND=noninteractive eatmydata apt upgrade -yy
-
-# Install common build utilities
-RUN DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \
- bison \
- bc \
- build-essential \
- ca-certificates \
- debian-ports-archive-keyring \
- dpkg-dev \
- flex \
- gettext \
- git \
- libglib2.0-dev \
- ninja-build \
- pkg-config \
- python3 \
- python3-venv
+FROM docker.io/library/debian:sid-slim
-# Add ports and riscv64 architecture
-RUN echo "deb http://ftp.ports.debian.org/debian-ports/ sid main" >> /etc/apt/sources.list
-RUN dpkg --add-architecture riscv64
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ apt-get update && \
+ apt-get install -y eatmydata && \
+ eatmydata apt-get dist-upgrade -y && \
+ eatmydata apt-get install --no-install-recommends -y \
+ bash \
+ bc \
+ bison \
+ ca-certificates \
+ ccache \
+ findutils \
+ flex \
+ gcc \
+ git \
+ libglib2.0-dev \
+ locales \
+ make \
+ meson \
+ ninja-build \
+ pkgconf \
+ python3 \
+ python3-venv \
+ sed \
+ tar && \
+ eatmydata apt-get autoremove -y && \
+ eatmydata apt-get autoclean -y && \
+ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
+ dpkg-reconfigure locales
-# Duplicate deb line as deb-src
-RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
+ENV LANG "en_US.UTF-8"
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
-RUN apt update && \
- DEBIAN_FRONTEND=noninteractive eatmydata \
- apt install -y --no-install-recommends \
- gcc-riscv64-linux-gnu \
- libc6-dev-riscv64-cross \
- libfdt-dev:riscv64 \
- libffi-dev:riscv64 \
- libglib2.0-dev:riscv64 \
- libpixman-1-dev:riscv64
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ dpkg --add-architecture riscv64 && \
+ eatmydata apt-get install debian-ports-archive-keyring && \
+ eatmydata echo 'deb http://ftp.ports.debian.org/debian-ports/ sid main' > /etc/apt/sources.list.d/ports.list && \
+ eatmydata echo 'deb http://ftp.ports.debian.org/debian-ports/ unreleased main' >> /etc/apt/sources.list.d/ports.list && \
+ eatmydata apt-get update && \
+ eatmydata apt-get dist-upgrade -y && \
+ eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
+ eatmydata apt-get install --no-install-recommends -y \
+ g++-riscv64-linux-gnu \
+ gcc-riscv64-linux-gnu \
+ libc6-dev:riscv64 \
+ libfdt-dev:riscv64 \
+ libffi-dev:riscv64 \
+ libglib2.0-dev:riscv64 \
+ libpixman-1-dev:riscv64 && \
+ eatmydata apt-get autoremove -y && \
+ eatmydata apt-get autoclean -y && \
+ mkdir -p /usr/local/share/meson/cross && \
+ printf "[binaries]\n\
+c = '/usr/bin/riscv64-linux-gnu-gcc'\n\
+ar = '/usr/bin/riscv64-linux-gnu-gcc-ar'\n\
+strip = '/usr/bin/riscv64-linux-gnu-strip'\n\
+pkgconfig = '/usr/bin/riscv64-linux-gnu-pkg-config'\n\
+\n\
+[host_machine]\n\
+system = 'linux'\n\
+cpu_family = 'riscv64'\n\
+cpu = 'riscv64'\n\
+endian = 'little'\n" > /usr/local/share/meson/cross/riscv64-linux-gnu && \
+ dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-c++ && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-g++ && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-gcc
-# Specify the cross prefix for this image (see tests/docker/common.rc)
+ENV ABI "riscv64-linux-gnu"
+ENV MESON_OPTS "--cross-file=riscv64-linux-gnu"
ENV QEMU_CONFIGURE_OPTS --cross-prefix=riscv64-linux-gnu-
ENV DEF_TARGET_LIST riscv64-softmmu,riscv64-linux-user
# As a final step configure the user (if env is defined)
diff --git a/tests/lcitool/projects/qemu-minimal.yml b/tests/lcitool/projects/qemu-minimal.yml
index b60fec715c..d44737dc1d 100644
--- a/tests/lcitool/projects/qemu-minimal.yml
+++ b/tests/lcitool/projects/qemu-minimal.yml
@@ -4,6 +4,8 @@ packages:
- bash
- bc
- bison
+ - ccache
+ - findutils
- flex
- g++
- gcc
@@ -21,3 +23,5 @@ packages:
- pkg-config
- python3
- python3-venv
+ - sed
+ - tar
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index 5e06fb2cf5..b54566edcc 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -63,12 +63,12 @@ add_user_mapping = [
" id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi\n"
]
-def generate_dockerfile(host, target, cross=None, trailer=None):
+def generate_dockerfile(host, target, project="qemu", cross=None, trailer=None):
filename = Path(src_dir, "tests", "docker", "dockerfiles", host + ".docker")
cmd = lcitool_cmd + ["dockerfile"]
if cross is not None:
cmd.extend(["--cross", cross])
- cmd.extend([target, "qemu"])
+ cmd.extend([target, project])
if trailer is not None:
trailer += "\n".join(add_user_mapping)
@@ -164,6 +164,12 @@ try:
trailer=cross_build("powerpc64le-linux-gnu-",
"ppc64-softmmu,ppc64-linux-user"))
+ generate_dockerfile("debian-riscv64-cross", "debian-sid",
+ project="qemu-minimal",
+ cross="riscv64",
+ trailer=cross_build("riscv64-linux-gnu-",
+ "riscv64-softmmu,riscv64-linux-user"))
+
generate_dockerfile("debian-s390x-cross", "debian-11",
cross="s390x",
trailer=cross_build("s390x-linux-gnu-",
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 16/36] tests/avocado: update firmware to enable sbsa-ref/max
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (14 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 15/36] tests/docker: convert riscv64-cross to lcitool Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:06 ` [PATCH v3 17/36] plugins: force slow path when plugins instrument memory ops Alex Bennée
2023-06-27 16:22 ` [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov
From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Update prebuilt firmware images to have TF-A with FEAT_FGT support
enabled. This allowed us to enable test for "max" cpu in sbsa-ref
machine.
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Message-Id: <20230530152240.79160-1-marcin.juszkiewicz@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v3
- re-enable for CI
---
tests/avocado/machine_aarch64_sbsaref.py | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py
index 0a79fa7ab6..cce6ef9f65 100644
--- a/tests/avocado/machine_aarch64_sbsaref.py
+++ b/tests/avocado/machine_aarch64_sbsaref.py
@@ -29,23 +29,23 @@ def fetch_firmware(self):
"""
Flash volumes generated using:
- - Fedora GNU Toolchain version 12.2.1 20220819 (Red Hat Cross 12.2.1-2)
+ - Fedora GNU Toolchain version 13.1.1 20230511 (Red Hat 13.1.1-2)
- Trusted Firmware-A
- https://github.com/ARM-software/arm-trusted-firmware/tree/5fdb2e54
+ https://github.com/ARM-software/arm-trusted-firmware/tree/c0d8ee38
- Tianocore EDK II
- https://github.com/tianocore/edk2/tree/494127613b
- https://github.com/tianocore/edk2-non-osi/tree/41876073
- https://github.com/tianocore/edk2-platforms/tree/8efa4f42
+ https://github.com/tianocore/edk2/tree/0f9283429dd4
+ https://github.com/tianocore/edk2-non-osi/tree/f0bb00937ad6
+ https://github.com/tianocore/edk2-platforms/tree/7880b92e2a04
"""
# Secure BootRom (TF-A code)
fs0_xz_url = (
- "https://fileserver.linaro.org/s/ATnSmq6k8SoXgbH/"
+ "https://fileserver.linaro.org/s/HrYMCjP7MEccjRP/"
"download/SBSA_FLASH0.fd.xz"
)
- fs0_xz_hash = "a210a09692bcbe0a3743ffd0df44e80e0c7ad8ab"
+ fs0_xz_hash = "447eff64a90b84ce47703c6ec41fbfc25befaaea"
tar_xz_path = self.fetch_asset(fs0_xz_url, asset_hash=fs0_xz_hash)
archive.extract(tar_xz_path, self.workdir)
fs0_path = os.path.join(self.workdir, "SBSA_FLASH0.fd")
@@ -93,15 +93,15 @@ def test_sbsaref_edk2_firmware(self):
# AP Trusted ROM
wait_for_console_pattern(self, "Booting Trusted Firmware")
- wait_for_console_pattern(self, "BL1: v2.8(release):v2.8")
+ wait_for_console_pattern(self, "BL1: v2.9(release):v2.9")
wait_for_console_pattern(self, "BL1: Booting BL2")
# Trusted Boot Firmware
- wait_for_console_pattern(self, "BL2: v2.8(release)")
+ wait_for_console_pattern(self, "BL2: v2.9(release)")
wait_for_console_pattern(self, "Booting BL31")
# EL3 Runtime Software
- wait_for_console_pattern(self, "BL31: v2.8(release)")
+ wait_for_console_pattern(self, "BL31: v2.9(release)")
# Non-trusted Firmware
wait_for_console_pattern(self, "UEFI firmware (version 1.0")
@@ -136,21 +136,18 @@ def boot_alpine_linux(self, cpu):
self.vm.launch()
wait_for_console_pattern(self, "Welcome to Alpine Linux 3.17")
- @skipUnless(os.getenv("AVOCADO_TIMEOUT_EXPECTED"), "Test might timeout")
def test_sbsaref_alpine_linux_cortex_a57(self):
"""
:avocado: tags=cpu:cortex-a57
"""
self.boot_alpine_linux("cortex-a57")
- @skipUnless(os.getenv("AVOCADO_TIMEOUT_EXPECTED"), "Test might timeout")
def test_sbsaref_alpine_linux_neoverse_n1(self):
"""
:avocado: tags=cpu:max
"""
self.boot_alpine_linux("neoverse-n1")
- @skip("requires TF-A update to handle FEAT_FGT")
def test_sbsaref_alpine_linux_max(self):
"""
:avocado: tags=cpu:max
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v3 17/36] plugins: force slow path when plugins instrument memory ops
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (15 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 16/36] tests/avocado: update firmware to enable sbsa-ref/max Alex Bennée
@ 2023-06-27 16:06 ` Alex Bennée
2023-06-27 16:22 ` [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:06 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Riku Voipio, Leonardo Bras, Wainer dos Santos Moschetta,
Leif Lindholm, Yanan Wang, Marcin Juszkiewicz, Bandan Das,
Beraldo Leal, Laurent Vivier, Marcel Apfelbaum, Bin Meng,
Daniel P. Berrangé, Alex Bennée, Stefan Hajnoczi,
Richard Henderson, Peter Maydell, Thomas Huth, Cleber Rosa,
Alexandre Iooss, Juan Quintela, Eduardo Habkost, Paolo Bonzini,
Qiuhao Li, Mahmoud Mandour, Peter Xu, Radoslaw Biernacki,
Darren Kenny, Laurent Vivier, Philippe Mathieu-Daudé,
Alexander Bulekov, Robert Henry, Aaron Lindsay
The lack of SVE memory instrumentation has been an omission in plugin
handling since it was introduced. Fortunately we can utilise the
probe_* functions to force all all memory access to follow the slow
path. We do this by checking the access type and presence of plugin
memory callbacks and if set return the TLB_MMIO flag.
We have to jump through a few hoops in user mode to re-use the flag
but it was the desired effect:
./qemu-system-aarch64 -display none -serial mon:stdio \
-M virt -cpu max -semihosting-config enable=on \
-kernel ./tests/tcg/aarch64-softmmu/memory-sve \
-plugin ./contrib/plugins/libexeclog.so,ifilter=st1w,afilter=0x40001808 -d plugin
gives (disas doesn't currently understand st1w):
0, 0x40001808, 0xe54342a0, ".byte 0xa0, 0x42, 0x43, 0xe5", store, 0x40213010, RAM, store, 0x40213014, RAM, store, 0x40213018, RAM
And for user-mode:
./qemu-aarch64 \
-plugin contrib/plugins/libexeclog.so,afilter=0x4007c0 \
-d plugin \
./tests/tcg/aarch64-linux-user/sha512-sve
gives:
1..10
ok 1 - do_test(&tests[i])
0, 0x4007c0, 0xa4004b80, ".byte 0x80, 0x4b, 0x00, 0xa4", load, 0x5500800370, load, 0x5500800371, load, 0x5500800372, load, 0x5500800373, load, 0x5500800374, load, 0x5500800375, load, 0x5500800376, load, 0x5500800377, load, 0x5500800378, load, 0x5500800379, load, 0x550080037a, load, 0x550080037b, load, 0x550080037c, load, 0x550080037d, load, 0x550080037e, load, 0x550080037f, load, 0x5500800380, load, 0x5500800381, load, 0x5500800382, load, 0x5500800383, load, 0x5500800384, load, 0x5500800385, load, 0x5500800386, lo
ad, 0x5500800387, load, 0x5500800388, load, 0x5500800389, load, 0x550080038a, load, 0x550080038b, load, 0x550080038c, load, 0x550080038d, load, 0x550080038e, load, 0x550080038f, load, 0x5500800390, load, 0x5500800391, load, 0x5500800392, load, 0x5500800393, load, 0x5500800394, load, 0x5500800395, load, 0x5500800396, load, 0x5500800397, load, 0x5500800398, load, 0x5500800399, load, 0x550080039a, load, 0x550080039b, load, 0x550080039c, load, 0x550080039d, load, 0x550080039e, load, 0x550080039f, load, 0x55008003a0, load, 0x55008003a1, load, 0x55008003a2, load, 0x55008003a3, load, 0x55008003a4, load, 0x55008003a5, load, 0x55008003a6, load, 0x55008003a7, load, 0x55008003a8, load, 0x55008003a9, load, 0x55008003aa, load, 0x55008003ab, load, 0x55008003ac, load, 0x55008003ad, load, 0x55008003ae, load, 0x55008003af
(4007c0 is the ld1b in the sha512-sve)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Cc: Robert Henry <robhenry@microsoft.com>
Cc: Aaron Lindsay <aaron@os.amperecomputing.com>
---
v2
- allow TLB_MMIO to appear in user-mode probe_access
v3
- checkpatch cleanups
---
include/exec/cpu-all.h | 2 +-
include/hw/core/cpu.h | 17 +++++++++++++++++
accel/tcg/cputlb.c | 5 ++++-
accel/tcg/user-exec.c | 8 ++++++--
target/arm/tcg/sve_helper.c | 4 ----
tests/tcg/aarch64/Makefile.target | 8 ++++++++
6 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 8018ce783e..472fe9ad9c 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -301,7 +301,7 @@ CPUArchState *cpu_copy(CPUArchState *env);
* be signaled by probe_access_flags().
*/
#define TLB_INVALID_MASK (1 << (TARGET_PAGE_BITS_MIN - 1))
-#define TLB_MMIO 0
+#define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 2))
#define TLB_WATCHPOINT 0
#else
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index eda0230a02..2be7c8f2d9 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -982,6 +982,23 @@ void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint);
void cpu_watchpoint_remove_all(CPUState *cpu, int mask);
#endif
+/**
+ * cpu_plugin_mem_cbs_enabled() - are plugin memory callbacks enabled?
+ * @cs: CPUState pointer
+ *
+ * The memory callbacks are installed if a plugin has instrumented an
+ * instruction for memory. This can be useful to know if you want to
+ * force a slow path for a series of memory accesses.
+ */
+static inline bool cpu_plugin_mem_cbs_enabled(const CPUState *cpu)
+{
+#ifdef CONFIG_PLUGIN
+ return !!cpu->plugin_mem_cbs;
+#else
+ return false;
+#endif
+}
+
/**
* cpu_get_address_space:
* @cpu: CPU to get address space from
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 5b51eff5a4..b1b9bf4b1d 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -1553,7 +1553,10 @@ static int probe_access_internal(CPUArchState *env, vaddr addr,
flags |= full->slow_flags[access_type];
/* Fold all "mmio-like" bits into TLB_MMIO. This is not RAM. */
- if (unlikely(flags & ~(TLB_WATCHPOINT | TLB_NOTDIRTY))) {
+ if (unlikely(flags & ~(TLB_WATCHPOINT | TLB_NOTDIRTY))
+ ||
+ (access_type != MMU_INST_FETCH &&
+ cpu_plugin_mem_cbs_enabled(env_cpu(env)))) {
*phost = NULL;
return TLB_MMIO;
}
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 8fbcbf9771..d95b875a6a 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -745,6 +745,10 @@ static int probe_access_internal(CPUArchState *env, vaddr addr,
if (guest_addr_valid_untagged(addr)) {
int page_flags = page_get_flags(addr);
if (page_flags & acc_flag) {
+ if ((acc_flag == PAGE_READ || acc_flag == PAGE_WRITE)
+ && cpu_plugin_mem_cbs_enabled(env_cpu(env))) {
+ return TLB_MMIO;
+ }
return 0; /* success */
}
maperr = !(page_flags & PAGE_VALID);
@@ -767,7 +771,7 @@ int probe_access_flags(CPUArchState *env, vaddr addr, int size,
g_assert(-(addr | TARGET_PAGE_MASK) >= size);
flags = probe_access_internal(env, addr, size, access_type, nonfault, ra);
- *phost = flags ? NULL : g2h(env_cpu(env), addr);
+ *phost = (flags & TLB_INVALID_MASK) ? NULL : g2h(env_cpu(env), addr);
return flags;
}
@@ -778,7 +782,7 @@ void *probe_access(CPUArchState *env, vaddr addr, int size,
g_assert(-(addr | TARGET_PAGE_MASK) >= size);
flags = probe_access_internal(env, addr, size, access_type, false, ra);
- g_assert(flags == 0);
+ g_assert((flags & ~TLB_MMIO) == 0);
return size ? g2h(env_cpu(env), addr) : NULL;
}
diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c
index 0097522470..7c103fc9f7 100644
--- a/target/arm/tcg/sve_helper.c
+++ b/target/arm/tcg/sve_helper.c
@@ -5688,9 +5688,6 @@ void sve_ldN_r(CPUARMState *env, uint64_t *vg, const target_ulong addr,
flags = info.page[0].flags | info.page[1].flags;
if (unlikely(flags != 0)) {
-#ifdef CONFIG_USER_ONLY
- g_assert_not_reached();
-#else
/*
* At least one page includes MMIO.
* Any bus operation can fail with cpu_transaction_failed,
@@ -5727,7 +5724,6 @@ void sve_ldN_r(CPUARMState *env, uint64_t *vg, const target_ulong addr,
memcpy(&env->vfp.zregs[(rd + i) & 31], &scratch[i], reg_max);
}
return;
-#endif
}
/* The entire operation is in RAM, on valid pages. */
diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
index 3430fd3cd8..cec1d4b287 100644
--- a/tests/tcg/aarch64/Makefile.target
+++ b/tests/tcg/aarch64/Makefile.target
@@ -91,6 +91,14 @@ sha512-vector: sha512.c
TESTS += sha512-vector
+ifneq ($(CROSS_CC_HAS_SVE),)
+sha512-sve: CFLAGS=-O3 -march=armv8.1-a+sve
+sha512-sve: sha512.c
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
+
+TESTS += sha512-sve
+endif
+
ifeq ($(HOST_GDB_SUPPORTS_ARCH),y)
GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR)
2023-06-27 16:06 [PATCH v3 00/36] maintainer omnibus: testing, fuzz, plugins, documentation (pre-PR) Alex Bennée
` (16 preceding siblings ...)
2023-06-27 16:06 ` [PATCH v3 17/36] plugins: force slow path when plugins instrument memory ops Alex Bennée
@ 2023-06-27 16:22 ` Alex Bennée
17 siblings, 0 replies; 19+ messages in thread
From: Alex Bennée @ 2023-06-27 16:22 UTC (permalink / raw)
To: Alex Bennée
Cc: qemu-devel, qemu-arm, Riku Voipio, Leonardo Bras,
Wainer dos Santos Moschetta, Leif Lindholm, Yanan Wang,
Marcin Juszkiewicz, Bandan Das, Beraldo Leal, Laurent Vivier,
Marcel Apfelbaum, Bin Meng, Daniel P. Berrangé,
Stefan Hajnoczi, Richard Henderson, Peter Maydell, Thomas Huth,
Cleber Rosa, Alexandre Iooss, Juan Quintela, Eduardo Habkost,
Paolo Bonzini, Qiuhao Li, Mahmoud Mandour, Peter Xu,
Radoslaw Biernacki, Darren Kenny, Laurent Vivier,
Philippe Mathieu-Daudé, Alexander Bulekov
Alex Bennée <alex.bennee@linaro.org> writes:
> As softfreeze is fast approaching I thought it would be work combining
> my various trees into an omnibus series to ease the review and
> merging.
>
Doh, apologies for double posting, this thread is incomplete. See:
https://patchew.org/QEMU/20230627160943.2956928-1-alex.bennee@linaro.org/
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 19+ messages in thread