Skip to content
Snippets Groups Projects
Commit 52ed34cb authored by Richard Henderson's avatar Richard Henderson
Browse files

Merge tag 'pull-request-2023-06-26' of https://gitlab.com/thuth/qemu into staging

* Improve gitlab-CI with regards to handling of stable staging branches
* Add msys2 gitlab-CI artifacts
* Minor qtest fixes

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmSZR6gRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbWoFQ//VieL2UTOBXvw6TlMCYEpqKURdKYc7Uqp
# Y/gJRHK+EQ3C4BGzv8l/P07/H3N5da+8Y2Ta37tNritbs+tyrYVIQAY3+bugG6hO
# lIF5oUGTcbOkC6Z1ajtjHcmxCj+2Z8uumlFW44zMR4HzzcmaRDyVDoU0gUg0Ohkt
# aNdpjJEA8BRzvQTjx92v31uILk8zpd0yL+40p/2DSx0Dt5eoqTjFN4QCgqk+C9A3
# WiiIkJBIIPgfp3XScVGeKS2ZfGSL7/QcJF0wbkkLhWfuF5oBjjkQCJlGYxpAnnbv
# J7esrNCxsks7T7SC/QnEzyePMXxX1DgV9znwBtEobLTQ38LcDWpdqdr0VYgyQhdo
# 9NgBLNkI3J1JCmJ5amCLRNcmH75cMnhxXeZYsjZ70VnirgFEQS1C+YELadCY8QWa
# S3YS/ZvOc5wHFdTrsfIyJG+2AjbefyboiXojzd/sFEY0485A8malTdtn96dhHjkZ
# KvInxQHV7uoUhok1QC68taMHbRUfA6jU7STYjkgDjnf+L+ywIbbKJE7LpyicvnsU
# MUR+9H4EsSlmN2koc9bopG0sspLThviIKORqzPEo3WyBj5jCIZ7tkvUEqBUkJwx2
# hISZeqdhP+wRVR4Ter0RNywjk2gSbaYcPzlnbaRYZ5OoiRchXr+uh/X0dIdkCNPP
# YwB1Y0wBpPU=
# =4Jl2
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 26 Jun 2023 10:09:12 AM CEST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [undefined]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [undefined]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2023-06-26' of https://gitlab.com/thuth/qemu

:
  tests/qtest/cxl-test: Clean up temporary directories after testing
  gitlab-ci: add msys2 meson test to junit report
  gitlab-ci: grab msys2 meson-logs as artifacts
  gitlab: support disabling job auto-run in upstream
  gitlab: avoid extra pipelines for tags and stable branches
  gitlab: stable staging branches publish containers in a separate tag
  gitlab: allow overriding name of the upstream repository
  gitlab: centralize the container tag name
  tests/qtest: Fix a comment typo in vhost-user-test.c

Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parents f9925abb b197ea86
Branches
Tags
No related merge requests found
variables:
# On stable branches this is changed by later rules. Should also
# be overridden per pipeline if running pipelines concurrently
# for different branches in contributor forks.
QEMU_CI_CONTAINER_TAG: latest
# For purposes of CI rules, upstream is the gitlab.com/qemu-project
# namespace. When testing CI, it might be usefult to override this
# to point to a fork repo
QEMU_CI_UPSTREAM: qemu-project
# The order of rules defined here is critically important. # The order of rules defined here is critically important.
# They are evaluated in order and first match wins. # They are evaluated in order and first match wins.
# #
# Thus we group them into a number of stages, ordered from # Thus we group them into a number of stages, ordered from
# most restrictive to least restrictive # most restrictive to least restrictive
# #
# For pipelines running for stable "staging-X.Y" branches
# we must override QEMU_CI_CONTAINER_TAG
#
.base_job_template: .base_job_template:
variables: variables:
# Each script line from will be in a collapsible section in the job output # Each script line from will be in a collapsible section in the job output
...@@ -19,28 +33,36 @@ ...@@ -19,28 +33,36 @@
# want jobs to run # want jobs to run
############################################################# #############################################################
# Never run jobs upstream on stable branch, staging branch jobs already ran
- if: '$CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH =~ /^stable-/'
when: never
# Never run jobs upstream on tags, staging branch jobs already ran
- if: '$CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_TAG'
when: never
# Cirrus jobs can't run unless the creds / target repo are set # Cirrus jobs can't run unless the creds / target repo are set
- if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == null || $CIRRUS_API_TOKEN == null)' - if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == null || $CIRRUS_API_TOKEN == null)'
when: never when: never
# Publishing jobs should only run on the default branch in upstream # Publishing jobs should only run on the default branch in upstream
- if: '$QEMU_JOB_PUBLISH == "1" && $CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' - if: '$QEMU_JOB_PUBLISH == "1" && $CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
when: never when: never
# Non-publishing jobs should only run on staging branches in upstream # Non-publishing jobs should only run on staging branches in upstream
- if: '$QEMU_JOB_PUBLISH != "1" && $CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH !~ /staging/' - if: '$QEMU_JOB_PUBLISH != "1" && $CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH !~ /staging/'
when: never when: never
# Jobs only intended for forks should always be skipped on upstream # Jobs only intended for forks should always be skipped on upstream
- if: '$QEMU_JOB_ONLY_FORKS == "1" && $CI_PROJECT_NAMESPACE == "qemu-project"' - if: '$QEMU_JOB_ONLY_FORKS == "1" && $CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM'
when: never when: never
# Forks don't get pipelines unless QEMU_CI=1 or QEMU_CI=2 is set # Forks don't get pipelines unless QEMU_CI=1 or QEMU_CI=2 is set
- if: '$QEMU_CI != "1" && $QEMU_CI != "2" && $CI_PROJECT_NAMESPACE != "qemu-project"' - if: '$QEMU_CI != "1" && $QEMU_CI != "2" && $CI_PROJECT_NAMESPACE != $QEMU_CI_UPSTREAM'
when: never when: never
# Avocado jobs don't run in forks unless $QEMU_CI_AVOCADO_TESTING is set # Avocado jobs don't run in forks unless $QEMU_CI_AVOCADO_TESTING is set
- if: '$QEMU_JOB_AVOCADO && $QEMU_CI_AVOCADO_TESTING != "1" && $CI_PROJECT_NAMESPACE != "qemu-project"' - if: '$QEMU_JOB_AVOCADO && $QEMU_CI_AVOCADO_TESTING != "1" && $CI_PROJECT_NAMESPACE != $QEMU_CI_UPSTREAM'
when: never when: never
...@@ -50,17 +72,29 @@ ...@@ -50,17 +72,29 @@
############################################################# #############################################################
# Optional jobs should not be run unless manually triggered # Optional jobs should not be run unless manually triggered
- if: '$QEMU_JOB_OPTIONAL && $CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH =~ /staging-[[:digit:]]+\.[[:digit:]]/'
when: manual
allow_failure: true
variables:
QEMU_CI_CONTAINER_TAG: $CI_COMMIT_REF_SLUG
- if: '$QEMU_JOB_OPTIONAL' - if: '$QEMU_JOB_OPTIONAL'
when: manual when: manual
allow_failure: true allow_failure: true
# Skipped jobs should not be run unless manually triggered # Skipped jobs should not be run unless manually triggered
- if: '$QEMU_JOB_SKIPPED && $CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH =~ /staging-[[:digit:]]+\.[[:digit:]]/'
when: manual
allow_failure: true
variables:
QEMU_CI_CONTAINER_TAG: $CI_COMMIT_REF_SLUG
- if: '$QEMU_JOB_SKIPPED' - if: '$QEMU_JOB_SKIPPED'
when: manual when: manual
allow_failure: true allow_failure: true
# Avocado jobs can be manually start in forks if $QEMU_CI_AVOCADO_TESTING is unset # Avocado jobs can be manually start in forks if $QEMU_CI_AVOCADO_TESTING is unset
- if: '$QEMU_JOB_AVOCADO && $CI_PROJECT_NAMESPACE != "qemu-project"' - if: '$QEMU_JOB_AVOCADO && $CI_PROJECT_NAMESPACE != $QEMU_CI_UPSTREAM'
when: manual when: manual
allow_failure: true allow_failure: true
...@@ -72,8 +106,23 @@ ...@@ -72,8 +106,23 @@
# Forks pipeline jobs don't start automatically unless # Forks pipeline jobs don't start automatically unless
# QEMU_CI=2 is set # QEMU_CI=2 is set
- if: '$QEMU_CI != "2" && $CI_PROJECT_NAMESPACE != "qemu-project"' - if: '$QEMU_CI != "2" && $CI_PROJECT_NAMESPACE != $QEMU_CI_UPSTREAM'
when: manual
# Upstream pipeline jobs start automatically unless told not to
# by setting QEMU_CI=1
- if: '$QEMU_CI == "1" && $CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH =~ /staging-[[:digit:]]+\.[[:digit:]]/'
when: manual
variables:
QEMU_CI_CONTAINER_TAG: $CI_COMMIT_REF_SLUG
- if: '$QEMU_CI == "1" && $CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM'
when: manual when: manual
# Jobs can run if any jobs they depend on were successful # Jobs can run if any jobs they depend on were successful
- if: '$QEMU_JOB_SKIPPED && $CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH =~ /staging-[[:digit:]]+\.[[:digit:]]/'
when: on_success
variables:
QEMU_CI_CONTAINER_TAG: $CI_COMMIT_REF_SLUG
- when: on_success - when: on_success
.native_build_job_template: .native_build_job_template:
extends: .base_job_template extends: .base_job_template
stage: build stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
before_script: before_script:
- JOBS=$(expr $(nproc) + 1) - JOBS=$(expr $(nproc) + 1)
script: script:
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
.common_test_job_template: .common_test_job_template:
extends: .base_job_template extends: .base_job_template
stage: test stage: test
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
script: script:
- scripts/git-submodule.sh update roms/SLOF - scripts/git-submodule.sh update roms/SLOF
- meson subprojects download $(cd build/subprojects && echo *) - meson subprojects download $(cd build/subprojects && echo *)
......
...@@ -532,7 +532,7 @@ build-without-defaults: ...@@ -532,7 +532,7 @@ build-without-defaults:
build-libvhost-user: build-libvhost-user:
extends: .base_job_template extends: .base_job_template
stage: build stage: build
image: $CI_REGISTRY_IMAGE/qemu/fedora:latest image: $CI_REGISTRY_IMAGE/qemu/fedora:$QEMU_CI_CONTAINER_TAG
needs: needs:
job: amd64-fedora-container job: amd64-fedora-container
script: script:
...@@ -572,7 +572,7 @@ build-tools-and-docs-debian: ...@@ -572,7 +572,7 @@ build-tools-and-docs-debian:
# of what topic branch they're currently using # of what topic branch they're currently using
pages: pages:
extends: .base_job_template extends: .base_job_template
image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:$QEMU_CI_CONTAINER_TAG
stage: test stage: test
needs: needs:
- job: build-tools-and-docs-debian - job: build-tools-and-docs-debian
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
services: services:
- docker:dind - docker:dind
before_script: before_script:
- export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest" - export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:$QEMU_CI_CONTAINER_TAG"
# Always ':latest' because we always use upstream as a common cache source
- export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:latest" - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:latest"
- docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- until docker info; do sleep 1; done - until docker info; do sleep 1; done
......
.cross_system_build_job: .cross_system_build_job:
extends: .base_job_template extends: .base_job_template
stage: build stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
timeout: 80m timeout: 80m
script: script:
- mkdir build - mkdir build
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
.cross_accel_build_job: .cross_accel_build_job:
extends: .base_job_template extends: .base_job_template
stage: build stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
timeout: 30m timeout: 30m
script: script:
- mkdir build - mkdir build
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
.cross_user_build_job: .cross_user_build_job:
extends: .base_job_template extends: .base_job_template
stage: build stage: build
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
script: script:
- mkdir build - mkdir build
- cd build - cd build
......
...@@ -26,7 +26,7 @@ check-dco: ...@@ -26,7 +26,7 @@ check-dco:
check-python-minreqs: check-python-minreqs:
extends: .base_job_template extends: .base_job_template
stage: test stage: test
image: $CI_REGISTRY_IMAGE/qemu/python:latest image: $CI_REGISTRY_IMAGE/qemu/python:$QEMU_CI_CONTAINER_TAG
script: script:
- make -C python check-minreqs - make -C python check-minreqs
variables: variables:
...@@ -37,7 +37,7 @@ check-python-minreqs: ...@@ -37,7 +37,7 @@ check-python-minreqs:
check-python-tox: check-python-tox:
extends: .base_job_template extends: .base_job_template
stage: test stage: test
image: $CI_REGISTRY_IMAGE/qemu/python:latest image: $CI_REGISTRY_IMAGE/qemu/python:$QEMU_CI_CONTAINER_TAG
script: script:
- make -C python check-tox - make -C python check-tox
variables: variables:
......
...@@ -11,6 +11,13 @@ ...@@ -11,6 +11,13 @@
needs: [] needs: []
stage: build stage: build
timeout: 80m timeout: 80m
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in: 7 days
paths:
- build/meson-logs/testlog.txt
reports:
junit: "build/meson-logs/testlog.junit.xml"
before_script: before_script:
- If ( !(Test-Path -Path msys64\var\cache ) ) { - If ( !(Test-Path -Path msys64\var\cache ) ) {
mkdir msys64\var\cache mkdir msys64\var\cache
...@@ -65,8 +72,8 @@ msys2-64bit: ...@@ -65,8 +72,8 @@ msys2-64bit:
- $env:CHERE_INVOKING = 'yes' # Preserve the current working directory - $env:CHERE_INVOKING = 'yes' # Preserve the current working directory
- $env:MSYSTEM = 'MINGW64' # Start a 64-bit MinGW environment - $env:MSYSTEM = 'MINGW64' # Start a 64-bit MinGW environment
- $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
- mkdir output - mkdir build
- cd output - cd build
# Note: do not remove "--without-default-devices"! # Note: do not remove "--without-default-devices"!
# commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices" # commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices"
# changed to compile QEMU with the --without-default-devices switch # changed to compile QEMU with the --without-default-devices switch
...@@ -115,8 +122,8 @@ msys2-32bit: ...@@ -115,8 +122,8 @@ msys2-32bit:
- $env:CHERE_INVOKING = 'yes' # Preserve the current working directory - $env:CHERE_INVOKING = 'yes' # Preserve the current working directory
- $env:MSYSTEM = 'MINGW32' # Start a 32-bit MinGW environment - $env:MSYSTEM = 'MINGW32' # Start a 32-bit MinGW environment
- $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
- mkdir output - mkdir build
- cd output - cd build
- ..\msys64\usr\bin\bash -lc '../configure --target-list=ppc64-softmmu - ..\msys64\usr\bin\bash -lc '../configure --target-list=ppc64-softmmu
--enable-fdt=system' --enable-fdt=system'
- ..\msys64\usr\bin\bash -lc 'make' - ..\msys64\usr\bin\bash -lc 'make'
......
...@@ -70,6 +70,17 @@ in a handful of namespaces ...@@ -70,6 +70,17 @@ in a handful of namespaces
repository CI settings, or as git push variables, to influence repository CI settings, or as git push variables, to influence
which jobs get run in a pipeline which jobs get run in a pipeline
* QEMU_CI_CONTAINER_TAG - the tag used to publish containers
in stage 1, for use by build jobs in stage 2. Defaults to
'latest', but if running pipelines for different branches
concurrently, it should be overridden per pipeline.
* QEMU_CI_UPSTREAM - gitlab namespace that is considered to be
the 'upstream'. This defaults to 'qemu-project'. Contributors
may choose to override this if they are modifying rules in
base.yml and need to validate how they will operate when in
an upstream context, as opposed to their fork context.
* nnn - other misc variables not falling into the above * nnn - other misc variables not falling into the above
categories, or using different names for historical reasons categories, or using different names for historical reasons
and not yet converted. and not yet converted.
......
...@@ -124,6 +124,7 @@ static void cxl_t3d_deprecated(void) ...@@ -124,6 +124,7 @@ static void cxl_t3d_deprecated(void)
qtest_start(cmdline->str); qtest_start(cmdline->str);
qtest_end(); qtest_end();
rmdir(tmpfs);
} }
static void cxl_t3d_persistent(void) static void cxl_t3d_persistent(void)
...@@ -138,6 +139,7 @@ static void cxl_t3d_persistent(void) ...@@ -138,6 +139,7 @@ static void cxl_t3d_persistent(void)
qtest_start(cmdline->str); qtest_start(cmdline->str);
qtest_end(); qtest_end();
rmdir(tmpfs);
} }
static void cxl_t3d_volatile(void) static void cxl_t3d_volatile(void)
......
...@@ -281,7 +281,7 @@ static void read_guest_mem_server(QTestState *qts, TestServer *s) ...@@ -281,7 +281,7 @@ static void read_guest_mem_server(QTestState *qts, TestServer *s)
/* iterate all regions */ /* iterate all regions */
for (i = 0; i < s->fds_num; i++) { for (i = 0; i < s->fds_num; i++) {
/* We'll check only the region statring at 0x0*/ /* We'll check only the region starting at 0x0 */
if (s->memory.regions[i].guest_phys_addr != 0x0) { if (s->memory.regions[i].guest_phys_addr != 0x0) {
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment