testing and gitlab updates
The following changes since commit b83371668192a705b878e909c5ae9c1233cbd5fb:
Merge tag 'pbouvier/pr/plugins-20260618' of https://gitlab.com/p-b-o/qemu into staging (2026-06-19 15:00:01 -0400)
are available in the Git repository at:
https://gitlab.com/stsquad/qemu.git tags/pull-11.1-testing-updates-220626-1
for you to fetch changes up to 2e020310e15d8452407c438271f3c06d4fa0c416:
gitlab: update bug template for sec issues & tool assistance (2026-06-22 13:45:37 +0100)
----------------------------------------------------------------
testing and gitlab updates:
- present a dev friendly cmd line in functional test logs
- tell pylint to skip c-modules
- widen the capture of functional tests logs in gitlab
- remove workaround for MacOS build targets
- update the gitlab bug template for security process
----------------------------------------------------------------
Alex Bennée (5):
python/qemu: split arg between base and harness lists python/qemu: split console from harness args python/qemu: dump a developer friendly version of cmdline to logs tests/functional: tell pylint not to check c-modules
gitlab: remove build target hacks
Daniel P. Berrangé (2):
gitlab: ensure "check-XXX' jobs capture functional test logs
gitlab: update bug template for sec issues & tool assistance
.gitlab-ci.d/buildtest-template.yml | 18 +++++++++--------- .gitlab-ci.d/macos.yml | 7 ++----- .gitlab/issue_templates/bug.md | 11 +++++++++-- python/qemu/machine/machine.py | 29 ++++++++++++++++++++++++----- tests/functional/pylintrc | 1 + 5 files changed, 45 insertions(+), 21 deletions(-)
Signature · 1 line
2.47.3
[PULL 1/7] python/qemu: split arg between base and harness lists
There are argument we add because we want the test harness to control QEMU and arguments we default for handling the display and machine type. Split the obvious ones between base_args and a new list called harness_args.
We will leave the complexity of the serial ports for now.
Message-ID: <[email protected]>
python/qemu/machine/machine.py +10 -4
@@ -292,8 +292,8 @@ def _load_io_log(self) -> None: self._iolog = iolog.read() @property - def _base_args(self) -> List[str]: - args = ['-display', 'none', '-vga', 'none'] + def _harness_args(self) -> List[str]: + args: List[str] = [] if self._qmp_set: if self._sock_pair:
@@ -307,8 +307,6 @@ def _base_args(self) -> List[str]: args.extend(['-chardev', moncdev, '-mon', 'chardev=mon,mode=control']) - if self._machine is not None: - args.extend(['-machine', self._machine]) for _ in range(self._console_index): args.extend(['-serial', 'null']) if self._console_set:
@@ -323,6 +321,13 @@ def _base_args(self) -> List[str]: args.extend(['-device', device]) return args + @property + def _base_args(self) -> List[str]: + args: List[str] = ['-display', 'none', '-vga', 'none'] + if self._machine is not None: + args.extend(['-machine', self._machine]) + return args + @property def args(self) -> List[str]: """Returns the list of arguments given to the QEMU binary."""
@@ -366,6 +371,7 @@ def _pre_launch(self) -> None: self._qemu_full_args = tuple(chain( self._wrapper, [self._binary], + self._harness_args, self._base_args, self._args ))
Signature · 1 line
2.47.3
[PULL 6/7] gitlab: remove build target hacks
In reply to Alex BennéeSince eef29e060dc (meson: build macOS signed binary as part of the default target) we should be able to do a plain build and everything just work.
Message-ID: <[email protected]>
.gitlab-ci.d/macos.yml +2 -5
@@ -29,7 +29,6 @@ - cd build - ../configure --enable-werror $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt; exit 1; } - $MAKE -j$(sysctl -n hw.ncpu) - - for TARGET in $TEST_BINARIES ; do $MAKE $TARGET ; done - for TARGET in $TEST_TARGETS ; do $MAKE $TARGET ; done aarch64-macos-15-build:
@@ -45,8 +44,7 @@ aarch64-macos-15-build: --cross-prefix-i386=i686-elf- --cross-prefix-x86_64=x86_64-elf- --disable-plugins - TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64 - TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu + TEST_TARGETS: check-unit check-tcg aarch64-macos-26-build: extends: .macos_job_template
@@ -62,5 +60,4 @@ aarch64-macos-26-build: --cross-prefix-i386=i686-elf- --cross-prefix-x86_64=x86_64-elf- --disable-plugins - TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64 - TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu + TEST_TARGETS: check-unit check-tcg
Signature · 1 line
2.47.3
[PULL 3/7] python/qemu: dump a developer friendly version of cmdline to logs
In reply to Alex BennéeNow we have the arguments nicely split up we can make _console_args a function call and present a slightly different version to the logs to save developers manually hacking the command line up.
Message-ID: <[email protected]>
python/qemu/machine/machine.py +12 -4
@@ -308,12 +308,15 @@ def _harness_args(self) -> List[str]: 'chardev=mon,mode=control']) return args - @property - def _console_args(self) -> List[str]: + def _console_args(self, interactive=False) -> List[str]: args: List[str] = [] + # redirect pre_console_index serials to null for _ in range(self._console_index): args.extend(['-serial', 'null']) - if self._console_set: + + if interactive: + args.extend(['-serial', 'mon:stdio']) + elif self._console_set: assert self._cons_sock_pair is not None fd = self._cons_sock_pair[0].fileno() chardev = f"socket,id=console,fd={fd}"
@@ -376,7 +379,7 @@ def _pre_launch(self) -> None: self._wrapper, [self._binary], self._harness_args, - self._console_args, + self._console_args(), self._base_args, self._args ))
@@ -485,6 +488,11 @@ def _launch(self) -> None: """ self._pre_launch() LOG.debug('VM launch command: %r', ' '.join(self._qemu_full_args)) + # Log a simplified, developer-runnable command: + # Exclude harness-managed infrastructure args (harness_args) + # and wrapper. + debug_cmd = [self._binary] + self._console_args(interactive=True) + self._base_args + self._args + LOG.debug('Developer-runnable command: %r', ' '.join(debug_cmd)) # Cleaning up of this subprocess is guaranteed by _do_shutdown. # pylint: disable=consider-using-with
Signature · 1 line
2.47.3
[PULL 5/7] gitlab: ensure "check-XXX' jobs capture functional test logs
In reply to Alex BennéeFrom: Daniel P. Berrangé <[email protected]>
A small subset of functional tests are run by default with 'make check', and so run in the context of 'check-XXX' CI jobs, rather than 'functional-XXX' CI jobs. Thus we need to capture the functional test logs unconditionally for all test jobs.
Message-ID: <[email protected]>
Message-ID: <[email protected]>
.gitlab-ci.d/buildtest-template.yml +9 -9
@@ -78,6 +78,15 @@ extends: .meson_job_template stage: test image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG + artifacts: + name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + when: always + expire_in: 7 days + paths: + - build/meson-logs + - build/tests/functional/*/*/*.log + reports: + junit: build/meson-logs/*.junit.xml script: - source scripts/ci/gitlab-ci-section - section_start buildenv "Setting up to run tests"
@@ -111,15 +120,6 @@ paths: - ${CI_PROJECT_DIR}/functional-cache policy: pull-push - artifacts: - name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" - when: always - expire_in: 7 days - paths: - - build/meson-logs - - build/tests/functional/*/*/*.log - reports: - junit: build/meson-logs/*.junit.xml before_script: - export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 - export QEMU_TEST_CACHE_DIR=${CI_PROJECT_DIR}/functional-cache
Signature · 1 line
2.47.3
[PULL 2/7] python/qemu: split console from harness args
In reply to Alex BennéeBefore we mess with the console output lets create a new helper just for that.
Message-ID: <[email protected]>
python/qemu/machine/machine.py +5 -0
@@ -306,7 +306,11 @@ def _harness_args(self) -> List[str]: moncdev = f"socket,id=mon,path={self._monitor_address}" args.extend(['-chardev', moncdev, '-mon', 'chardev=mon,mode=control']) + return args + @property + def _console_args(self) -> List[str]: + args: List[str] = [] for _ in range(self._console_index): args.extend(['-serial', 'null']) if self._console_set:
@@ -372,6 +376,7 @@ def _pre_launch(self) -> None: self._wrapper, [self._binary], self._harness_args, + self._console_args, self._base_args, self._args ))
Signature · 1 line
2.47.3
[PULL 7/7] gitlab: update bug template for sec issues & tool assistance
In reply to Alex BennéeFrom: Daniel P. Berrangé <[email protected]>
Warn that a security issue must have the "confidential" flag set and that any findings from automated tools must be validated before submission.
Message-ID: <[email protected]>
Message-ID: <[email protected]>
.gitlab/issue_templates/bug.md +9 -2
@@ -13,8 +13,9 @@ older than this should be reported to the distribution instead. See https://www.qemu.org/contribute/report-a-bug/ for additional guidance. -If this is a security issue, please consult -https://www.qemu.org/contribute/security-process/ +If this is a security issue, ensure this ticket is marked 'confidential' +before submission. See https://www.qemu.org/contribute/security-process/ +for additional guidance --> ## Host environment
@@ -49,6 +50,12 @@ https://www.qemu.org/contribute/security-process/ 2. 3. +<!-- +Note: if this issue was discovered with the assistance of automated +tooling LLM, static analysis, fuzzers), the reporter must disclose +that in the description. The steps to reproduce, and any other findings, +must be fully validated by the user of the tool prior to submission. +--> ## Additional information
Signature · 1 line
2.47.3
[PULL 4/7] tests/functional: tell pylint not to check c-modules
In reply to Alex BennéeTo fix:
qemu-test.test_pylint "/home/alex/lsrc/qemu.git/tests/functional/arm/test_integratorcp.py:83: I1101: Module 'cv2' has no 'imread' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)"
Manually running python3 showed I could indeed import cv2 and call those functions. Rather than allowing pylint to introspect lets just tell it to skip c modules.
Message-ID: <[email protected]>
tests/functional/pylintrc +1 -0
@@ -58,6 +58,7 @@ confidence=HIGH, # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". disable=bad-inline-option, + c-extension-no-member, consider-using-f-string, file-ignored, fixme,
Signature · 1 line
2.47.3
Quoted 13 lines · Alex Bennée
The following changes since commit
b83371668192a705b878e909c5ae9c1233cbd5fb:Merge tag 'pbouvier/pr/plugins-20260618' of https://gitlab.com/p-b-o/qemu into staging (2026-06-19 15:00:01 -0400)
are available in the Git repository at:
https://gitlab.com/stsquad/qemu.git tags/pull-11.1-testing-updates-220626-1
for you to fetch changes up to
2e020310e15d8452407c438271f3c06d4fa0c416:gitlab: update bug template for sec issues & tool assistance (2026-06-22 13:45:37 +0100)
Quoted 8 lines
----------------------------------------------------------------
testing and gitlab updates:- present a dev friendly cmd line in functional test logs
- tell pylint to skip c-modules
- widen the capture of functional tests logs in gitlab
- remove workaround for MacOS build targets
- update the gitlab bug template for security process
Hi Alex,
Please take a look at this CI failure and resend this pull request with a fix:
https://gitlab.com/qemu-project/qemu/-/jobs/14979433360#L169
Thanks,
Stefan
Quoted 24 lines
----------------------------------------------------------------
Alex Bennée (5):
python/qemu: split arg between base and harness lists python/qemu: split console from harness args python/qemu: dump a developer friendly version of cmdline to logs tests/functional: tell pylint not to check c-modules
gitlab: remove build target hacksDaniel P. Berrangé (2):
gitlab: ensure "check-XXX' jobs capture functional test logs
gitlab: update bug template for sec issues & tool assistance.gitlab-ci.d/buildtest-template.yml | 18 +++++++++--------- .gitlab-ci.d/macos.yml | 7 ++----- .gitlab/issue_templates/bug.md | 11 +++++++++-- python/qemu/machine/machine.py | 29 ++++++++++++++++++++++++----- tests/functional/pylintrc | 1 + 5 files changed, 45 insertions(+), 21 deletions(-)--
2.47.3