* [PATCH v2 0/6] maintainer omnibus: testing, fuzz, plugins, documentation
@ 2023-06-26 20:25 Alex Bennée
2023-06-26 20:25 ` [PATCH v2 1/6] gitlab: explicit set artifacts publishing criteria Alex Bennée
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Alex Bennée @ 2023-06-26 20:25 UTC (permalink / raw)
To: qemu-devel
Cc: Qiuhao Li, Philippe Mathieu-Daudé, Stefan Hajnoczi,
Juan Quintela, Marcin Juszkiewicz, Daniel P. Berrangé,
Eduardo Habkost, Alexandre Iooss, Peter Xu, Yanan Wang,
Mahmoud Mandour, Peter Maydell, Bin Meng, Marcel Apfelbaum,
Beraldo Leal, Richard Henderson, Leif Lindholm, Paolo Bonzini,
Thomas Huth, Riku Voipio, Cleber Rosa, Alexander Bulekov,
Alex Bennée, Radoslaw Biernacki, Bandan Das, Leonardo Bras,
qemu-arm, Darren Kenny, Wainer dos Santos Moschetta,
Laurent Vivier
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.
The testing updates exposed a number of latent leaks that confused the
oss-fuzz jobs (hence the test-fuzz addition to help debug that). This
also includes some minor plugin updates and finally some documentation
updates that clean-up and expose the QOM and QDEV APIs which are so
core to emulating anything in QEMU.
v2
- applied a bunch of review tags
- added missing doc suggestions from Paolo
- tweaked the plugin fix for CI
The following patches need review:
- qemu-keymap: properly check return from xkb_keymap_mod_get_index
Alex Bennée (3):
gitlab: reduce testing scope of check-gcov
tests/tcg: add mechanism to handle plugin arguments
qemu-keymap: properly check return from xkb_keymap_mod_get_index
Ani Sinha (1):
docs/devel: remind developers to run CI container pipeline when
updating images
Daniel P. Berrangé (2):
gitlab: explicit set artifacts publishing criteria
gitlab: ensure coverage job also publishes meson log
docs/devel/testing.rst | 6 ++++++
qemu-keymap.c | 24 ++++++++++++++++--------
.gitlab-ci.d/buildtest-template.yml | 4 +++-
.gitlab-ci.d/buildtest.yml | 7 ++++++-
.gitlab-ci.d/crossbuild-template.yml | 1 +
.gitlab-ci.d/crossbuilds.yml | 2 ++
.gitlab-ci.d/opensbi.yml | 1 +
tests/tcg/Makefile.target | 8 ++++++--
8 files changed, 41 insertions(+), 12 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/6] gitlab: explicit set artifacts publishing criteria
2023-06-26 20:25 [PATCH v2 0/6] maintainer omnibus: testing, fuzz, plugins, documentation Alex Bennée
@ 2023-06-26 20:25 ` Alex Bennée
2023-06-26 20:25 ` [PATCH v2 2/6] gitlab: ensure coverage job also publishes meson log Alex Bennée
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Alex Bennée @ 2023-06-26 20:25 UTC (permalink / raw)
To: qemu-devel
Cc: Qiuhao Li, Philippe Mathieu-Daudé, Stefan Hajnoczi,
Juan Quintela, Marcin Juszkiewicz, Daniel P. Berrangé,
Eduardo Habkost, Alexandre Iooss, Peter Xu, Yanan Wang,
Mahmoud Mandour, Peter Maydell, Bin Meng, Marcel Apfelbaum,
Beraldo Leal, Richard Henderson, Leif Lindholm, Paolo Bonzini,
Thomas Huth, Riku Voipio, Cleber Rosa, Alexander Bulekov,
Alex Bennée, Radoslaw Biernacki, Bandan Das, Leonardo Bras,
qemu-arm, Darren Kenny, Wainer dos Santos Moschetta,
Laurent Vivier
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] 8+ messages in thread
* [PATCH v2 2/6] gitlab: ensure coverage job also publishes meson log
2023-06-26 20:25 [PATCH v2 0/6] maintainer omnibus: testing, fuzz, plugins, documentation Alex Bennée
2023-06-26 20:25 ` [PATCH v2 1/6] gitlab: explicit set artifacts publishing criteria Alex Bennée
@ 2023-06-26 20:25 ` Alex Bennée
2023-06-26 20:25 ` [PATCH v2 3/6] gitlab: reduce testing scope of check-gcov Alex Bennée
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Alex Bennée @ 2023-06-26 20:25 UTC (permalink / raw)
To: qemu-devel
Cc: Qiuhao Li, Philippe Mathieu-Daudé, Stefan Hajnoczi,
Juan Quintela, Marcin Juszkiewicz, Daniel P. Berrangé,
Eduardo Habkost, Alexandre Iooss, Peter Xu, Yanan Wang,
Mahmoud Mandour, Peter Maydell, Bin Meng, Marcel Apfelbaum,
Beraldo Leal, Richard Henderson, Leif Lindholm, Paolo Bonzini,
Thomas Huth, Riku Voipio, Cleber Rosa, Alexander Bulekov,
Alex Bennée, Radoslaw Biernacki, Bandan Das, Leonardo Bras,
qemu-arm, Darren Kenny, Wainer dos Santos Moschetta,
Laurent Vivier
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] 8+ messages in thread
* [PATCH v2 3/6] gitlab: reduce testing scope of check-gcov
2023-06-26 20:25 [PATCH v2 0/6] maintainer omnibus: testing, fuzz, plugins, documentation Alex Bennée
2023-06-26 20:25 ` [PATCH v2 1/6] gitlab: explicit set artifacts publishing criteria Alex Bennée
2023-06-26 20:25 ` [PATCH v2 2/6] gitlab: ensure coverage job also publishes meson log Alex Bennée
@ 2023-06-26 20:25 ` Alex Bennée
2023-06-26 20:25 ` [PATCH v2 4/6] docs/devel: remind developers to run CI container pipeline when updating images Alex Bennée
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Alex Bennée @ 2023-06-26 20:25 UTC (permalink / raw)
To: qemu-devel
Cc: Qiuhao Li, Philippe Mathieu-Daudé, Stefan Hajnoczi,
Juan Quintela, Marcin Juszkiewicz, Daniel P. Berrangé,
Eduardo Habkost, Alexandre Iooss, Peter Xu, Yanan Wang,
Mahmoud Mandour, Peter Maydell, Bin Meng, Marcel Apfelbaum,
Beraldo Leal, Richard Henderson, Leif Lindholm, Paolo Bonzini,
Thomas Huth, Riku Voipio, Cleber Rosa, Alexander Bulekov,
Alex Bennée, Radoslaw Biernacki, Bandan Das, Leonardo Bras,
qemu-arm, Darren Kenny, Wainer dos Santos Moschetta,
Laurent Vivier
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] 8+ messages in thread
* [PATCH v2 4/6] docs/devel: remind developers to run CI container pipeline when updating images
2023-06-26 20:25 [PATCH v2 0/6] maintainer omnibus: testing, fuzz, plugins, documentation Alex Bennée
` (2 preceding siblings ...)
2023-06-26 20:25 ` [PATCH v2 3/6] gitlab: reduce testing scope of check-gcov Alex Bennée
@ 2023-06-26 20:25 ` Alex Bennée
2023-06-26 20:25 ` [PATCH v2 5/6] tests/tcg: add mechanism to handle plugin arguments Alex Bennée
2023-06-26 20:25 ` [PATCH v2 6/6] qemu-keymap: properly check return from xkb_keymap_mod_get_index Alex Bennée
5 siblings, 0 replies; 8+ messages in thread
From: Alex Bennée @ 2023-06-26 20:25 UTC (permalink / raw)
To: qemu-devel
Cc: Qiuhao Li, Philippe Mathieu-Daudé, Stefan Hajnoczi,
Juan Quintela, Marcin Juszkiewicz, Daniel P. Berrangé,
Eduardo Habkost, Alexandre Iooss, Peter Xu, Yanan Wang,
Mahmoud Mandour, Peter Maydell, Bin Meng, Marcel Apfelbaum,
Beraldo Leal, Richard Henderson, Leif Lindholm, Paolo Bonzini,
Thomas Huth, Riku Voipio, Cleber Rosa, Alexander Bulekov,
Alex Bennée, Radoslaw Biernacki, Bandan Das, Leonardo Bras,
qemu-arm, Darren Kenny, Wainer dos Santos Moschetta,
Laurent Vivier, 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] 8+ messages in thread
* [PATCH v2 5/6] tests/tcg: add mechanism to handle plugin arguments
2023-06-26 20:25 [PATCH v2 0/6] maintainer omnibus: testing, fuzz, plugins, documentation Alex Bennée
` (3 preceding siblings ...)
2023-06-26 20:25 ` [PATCH v2 4/6] docs/devel: remind developers to run CI container pipeline when updating images Alex Bennée
@ 2023-06-26 20:25 ` Alex Bennée
2023-06-26 20:25 ` [PATCH v2 6/6] qemu-keymap: properly check return from xkb_keymap_mod_get_index Alex Bennée
5 siblings, 0 replies; 8+ messages in thread
From: Alex Bennée @ 2023-06-26 20:25 UTC (permalink / raw)
To: qemu-devel
Cc: Qiuhao Li, Philippe Mathieu-Daudé, Stefan Hajnoczi,
Juan Quintela, Marcin Juszkiewicz, Daniel P. Berrangé,
Eduardo Habkost, Alexandre Iooss, Peter Xu, Yanan Wang,
Mahmoud Mandour, Peter Maydell, Bin Meng, Marcel Apfelbaum,
Beraldo Leal, Richard Henderson, Leif Lindholm, Paolo Bonzini,
Thomas Huth, Riku Voipio, Cleber Rosa, Alexander Bulekov,
Alex Bennée, Radoslaw Biernacki, Bandan Das, Leonardo Bras,
qemu-arm, Darren Kenny, Wainer dos Santos Moschetta,
Laurent Vivier
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] 8+ messages in thread
* [PATCH v2 6/6] qemu-keymap: properly check return from xkb_keymap_mod_get_index
2023-06-26 20:25 [PATCH v2 0/6] maintainer omnibus: testing, fuzz, plugins, documentation Alex Bennée
` (4 preceding siblings ...)
2023-06-26 20:25 ` [PATCH v2 5/6] tests/tcg: add mechanism to handle plugin arguments Alex Bennée
@ 2023-06-26 20:25 ` Alex Bennée
2023-06-27 7:37 ` Juan Quintela
5 siblings, 1 reply; 8+ messages in thread
From: Alex Bennée @ 2023-06-26 20:25 UTC (permalink / raw)
To: qemu-devel
Cc: Qiuhao Li, Philippe Mathieu-Daudé, Stefan Hajnoczi,
Juan Quintela, Marcin Juszkiewicz, Daniel P. Berrangé,
Eduardo Habkost, Alexandre Iooss, Peter Xu, Yanan Wang,
Mahmoud Mandour, Peter Maydell, Bin Meng, Marcel Apfelbaum,
Beraldo Leal, Richard Henderson, Leif Lindholm, Paolo Bonzini,
Thomas Huth, Riku Voipio, Cleber Rosa, Alexander Bulekov,
Alex Bennée, Radoslaw Biernacki, Bandan Das, Leonardo Bras,
qemu-arm, Darren Kenny, Wainer dos Santos Moschetta,
Laurent Vivier
We can return XKB_MOD_INVALID which rightly gets flagged by sanitisers
as an overly wide shift attempt.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
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] 8+ messages in thread
* Re: [PATCH v2 6/6] qemu-keymap: properly check return from xkb_keymap_mod_get_index
2023-06-26 20:25 ` [PATCH v2 6/6] qemu-keymap: properly check return from xkb_keymap_mod_get_index Alex Bennée
@ 2023-06-27 7:37 ` Juan Quintela
0 siblings, 0 replies; 8+ messages in thread
From: Juan Quintela @ 2023-06-27 7:37 UTC (permalink / raw)
To: Alex Bennée
Cc: qemu-devel, Qiuhao Li, Philippe Mathieu-Daudé,
Stefan Hajnoczi, Marcin Juszkiewicz, Daniel P. Berrangé,
Eduardo Habkost, Alexandre Iooss, Peter Xu, Yanan Wang,
Mahmoud Mandour, Peter Maydell, Bin Meng, Marcel Apfelbaum,
Beraldo Leal, Richard Henderson, Leif Lindholm, Paolo Bonzini,
Thomas Huth, Riku Voipio, Cleber Rosa, Alexander Bulekov,
Radoslaw Biernacki, Bandan Das, Leonardo Bras, qemu-arm,
Darren Kenny, Wainer dos Santos Moschetta, Laurent Vivier
Alex Bennée <alex.bennee@linaro.org> wrote:
> We can return XKB_MOD_INVALID which rightly gets flagged by sanitisers
> as an overly wide shift attempt.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-06-27 7:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-26 20:25 [PATCH v2 0/6] maintainer omnibus: testing, fuzz, plugins, documentation Alex Bennée
2023-06-26 20:25 ` [PATCH v2 1/6] gitlab: explicit set artifacts publishing criteria Alex Bennée
2023-06-26 20:25 ` [PATCH v2 2/6] gitlab: ensure coverage job also publishes meson log Alex Bennée
2023-06-26 20:25 ` [PATCH v2 3/6] gitlab: reduce testing scope of check-gcov Alex Bennée
2023-06-26 20:25 ` [PATCH v2 4/6] docs/devel: remind developers to run CI container pipeline when updating images Alex Bennée
2023-06-26 20:25 ` [PATCH v2 5/6] tests/tcg: add mechanism to handle plugin arguments Alex Bennée
2023-06-26 20:25 ` [PATCH v2 6/6] qemu-keymap: properly check return from xkb_keymap_mod_get_index Alex Bennée
2023-06-27 7:37 ` Juan Quintela
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).