diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml index 005058625e..3b003abc99 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -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 diff --git a/.gitlab-ci.d/macos.yml b/.gitlab-ci.d/macos.yml index 84ad2492ca..53b6e6c4d8 100644 --- a/.gitlab-ci.d/macos.yml +++ b/.gitlab-ci.d/macos.yml @@ -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: @@ -46,8 +45,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 @@ -64,5 +62,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 diff --git a/.gitlab/issue_templates/bug.md b/.gitlab/issue_templates/bug.md index e20f586008..faeeb00225 100644 --- a/.gitlab/issue_templates/bug.md +++ b/.gitlab/issue_templates/bug.md @@ -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. + ## Additional information diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py index ebb58d5b68..3670c8cd39 100644 --- a/python/qemu/machine/machine.py +++ b/python/qemu/machine/machine.py @@ -292,8 +292,8 @@ class QEMUMachine: 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: @@ -306,12 +306,17 @@ class QEMUMachine: moncdev = f"socket,id=mon,path={self._monitor_address}" args.extend(['-chardev', moncdev, '-mon', 'chardev=mon,mode=control']) + return args - if self._machine is not None: - args.extend(['-machine', self._machine]) + def _console_args(self, interactive: bool = 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}" @@ -323,6 +328,13 @@ class QEMUMachine: 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 +378,8 @@ class QEMUMachine: self._qemu_full_args = tuple(chain( self._wrapper, [self._binary], + self._harness_args, + self._console_args(), self._base_args, self._args )) @@ -474,6 +488,14 @@ class QEMUMachine: """ 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] + debug_cmd.extend(self._console_args(interactive=True)) + debug_cmd.extend(self._base_args) + debug_cmd.extend(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 diff --git a/tests/functional/pylintrc b/tests/functional/pylintrc index 049c3e76f1..949bea611f 100644 --- a/tests/functional/pylintrc +++ b/tests/functional/pylintrc @@ -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,