Gitlab-CI improvements and some other fixes
[PULL 2/9] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
Jobs depending on another should not use the 'when: always' condition, because if a dependency failed we should not keep running jobs depending on it. The correct condition is 'when: on_success'.
Message-Id: <[email protected]>
--- .gitlab-ci.d/buildtest-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
.gitlab-ci.d/buildtest-template.yml +2 -2
@@ -73,9 +73,9 @@ # in its namespace setting or via git-push option, see documentation # in /.gitlab-ci.yml of this repository). - if: '$CI_PROJECT_NAMESPACE == "qemu-project"' - when: always + when: on_success - if: '$QEMU_CI_AVOCADO_TESTING' - when: always + when: on_success # Otherwise, set to manual (the jobs are created but not run). - when: manual allow_failure: true
Signature · 1 line
2.27.0
[PULL 4/9] gitlab-ci: Fix 'when:' condition in OpenSBI jobs
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
Jobs depending on another should not use the 'when: always' condition, because if a dependency failed we should not keep running jobs depending on it. The correct condition is 'when: on_success'.
Message-Id: <[email protected]>
--- .gitlab-ci.d/opensbi.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
.gitlab-ci.d/opensbi.yml +4 -4
@@ -6,14 +6,14 @@ - .gitlab-ci.d/opensbi.yml # or the Dockerfile is modified - .gitlab-ci.d/opensbi/Dockerfile - when: always + when: on_success - changes: # or roms/opensbi/ is modified (submodule updated) - roms/opensbi/* - when: always + when: on_success - if: '$CI_COMMIT_REF_NAME =~ /^opensbi/' # or the branch/tag starts with 'opensbi' - when: always + when: on_success - if: '$CI_COMMIT_MESSAGE =~ /opensbi/i' # or last commit description contains 'OpenSBI' - when: always + when: on_success docker-opensbi: extends: .opensbi_job_rules
Signature · 1 line
2.27.0
Hi Peter!
The following changes since commit 69ea12b19a15ae006521cd5cc0f627f27f738746:
Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2021-07-27' into staging (2021-07-28 13:32:12 +0100)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2021-07-29
for you to fetch changes up to b8ee198d21c4bab41b8cb8d1729a956d9f648997:
configure script fix for Haiku (2021-07-29 08:09:32 +0200)
----------------------------------------------------------------
* Document GitLab custom CI/CD variables
* Fix 'when:' condition in gitlab-CI jobs
* Disable tests in the gitlab-CI that fail due to out-of-memory conditions
* Allow pushing to "staging" again for maintainers without s390x access
* Fix migration-test build failure on SPARC
* Compile without "pie" on Haiku
----------------------------------------------------------------
Peter Xu (1):
tests: Fix migration-test build failure for sparc
Philippe Mathieu-Daudé (4):
docs: Document GitLab custom CI/CD variables
gitlab-ci: Fix 'when:' condition in acceptance_test_job_template
gitlab-ci: Fix 'when:' condition in EDK2 jobs
gitlab-ci: Fix 'when:' condition in OpenSBI jobs
Richard Zak (1):
configure script fix for Haiku
Thomas Huth (3):
gitlab-ci.d/buildtest: Disable iotests 197 and 215 gitlab-ci.d/buildtest: Mark the aarch64 and ppc64-s390x CFI jobs as manual gitlab-ci.d/custom-runners: Improve rules for the staging branch
.gitlab-ci.d/buildtest-template.yml | 4 ++-- .gitlab-ci.d/buildtest.yml | 18 ++++++++++++++--- .gitlab-ci.d/custom-runners.yml | 40 ++++++++++++++++++++++++++----------- .gitlab-ci.d/edk2.yml | 6 +++--- .gitlab-ci.d/opensbi.yml | 8 ++++---- .gitlab-ci.yml | 19 ++---------------- configure | 3 ++- docs/devel/ci.rst | 40 +++++++++++++++++++++++++++++++++++++ tests/qtest/migration-test.c | 5 +++-- 9 files changed, 99 insertions(+), 44 deletions(-)
[PULL 1/9] docs: Document GitLab custom CI/CD variables
From: Philippe Mathieu-Daudé <[email protected]>
We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf ("gitlab: Run Avocado tests manually (except mainstream CI)"), but forgot to document it properly. Do it now.
Message-Id: <[email protected]>
--- .gitlab-ci.yml | 19 ++----------------- docs/devel/ci.rst | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 17 deletions(-)
.gitlab-ci.yml +2 -17
@@ -16,24 +16,9 @@ # QEMU CI jobs are based on templates. Some templates provide # user-configurable options, modifiable via configuration variables. # -# These variables can be set globally in the user's CI namespace -# setting: -# https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui -# or set manually each time a branch/tag is pushed, as a git-push -# command line argument: -# https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd +# See https://qemu-project.gitlab.io/qemu/devel/ci.html#custom-ci-cd-variables +# for more information. # -# Example setting the QEMU_CI_EXAMPLE_VAR variable: -# -# git push -o ci.variable="QEMU_CI_EXAMPLE_VAR=value" myrepo mybranch -# -# ---------------------------------------------------------------------- -# -# List of environment variables that can be use to modify the set -# of jobs selected: -# -# - QEMU_CI_AVOCADO_TESTING -# If set, tests using the Avocado framework will be run include: - local: '/.gitlab-ci.d/qemu-project.yml'
docs/devel/ci.rst +40 -0
@@ -8,6 +8,46 @@ found at:: https://wiki.qemu.org/Testing/CI +Custom CI/CD variables +====================== + +QEMU CI pipelines can be tuned by setting some CI environment variables. + +Set variable globally in the user's CI namespace +------------------------------------------------ + +Variables can be set globally in the user's CI namespace setting. + +For further information about how to set these variables, please refer to:: + + https://docs.gitlab.com/ee/ci/variables/#add-a-cicd-variable-to-a-project + +Set variable manually when pushing a branch or tag to the user's repository +--------------------------------------------------------------------------- + +Variables can be set manually when pushing a branch or tag, using +git-push command line arguments. + +Example setting the QEMU_CI_EXAMPLE_VAR variable: + +.. code:: + + git push -o ci.variable="QEMU_CI_EXAMPLE_VAR=value" myrepo mybranch + +For further information about how to set these variables, please refer to:: + + https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd + +Here is a list of the most used variables: + +QEMU_CI_AVOCADO_TESTING +~~~~~~~~~~~~~~~~~~~~~~~ +By default, tests using the Avocado framework are not run automatically in +the pipelines (because multiple artifacts have to be downloaded, and if +these artifacts are not already cached, downloading them make the jobs +reach the timeout limit). Set this variable to have the tests using the +Avocado framework run automatically. + Jobs on Custom Runners ======================
Signature · 1 line
2.27.0
[PULL 6/9] gitlab-ci.d/buildtest: Mark the aarch64 and ppc64-s390x CFI jobs as manual
In reply to Thomas HuthThese two jobs are currently failing very often - the linker seems to get killed due to out-of-memory problems. Since apparently nobody has currently an idea how to fix that nicely, let's mark the jobs as manual for the time being until someone comes up with a proper fix.
Message-Id: <[email protected]>
--- .gitlab-ci.d/buildtest.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+)
.gitlab-ci.d/buildtest.yml +12 -0
@@ -416,6 +416,12 @@ build-cfi-aarch64: expire_in: 2 days paths: - build + rules: + # FIXME: This job is often failing, likely due to out-of-memory problems in + # the constrained containers of the shared runners. Thus this is marked as + # manual until the situation has been solved. + - when: manual + allow_failure: true check-cfi-aarch64: extends: .native_test_job_template
@@ -452,6 +458,12 @@ build-cfi-ppc64-s390x: expire_in: 2 days paths: - build + rules: + # FIXME: This job is often failing, likely due to out-of-memory problems in + # the constrained containers of the shared runners. Thus this is marked as + # manual until the situation has been solved. + - when: manual + allow_failure: true check-cfi-ppc64-s390x: extends: .native_test_job_template
Signature · 1 line
2.27.0
[PULL 5/9] gitlab-ci.d/buildtest: Disable iotests 197 and 215
In reply to Thomas HuthThe iotests 197 and 215 are occasionally failing in the gitlab-CI now. According to the log, the failure is "./common.rc: Killed" which might be an indication that the process has been killed due to out-of-memory reasons. Both tests are doing a big read with 2G that likely causes this issue. It used to work fine in the gitlab-CI in the past, but either the program is now requiring more free memory, or the the CI containers have changed, so that the OOM condition now sometimes occurs.
Anyway, these two tests are not really suitable for CI containers if they are doing things like huge reads (which is likely also the reason why they haven't been added to the "auto" group in the past), so let's simply disable them in the gitlab-CI now, too.
Message-Id: <[email protected]>
--- .gitlab-ci.d/buildtest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
.gitlab-ci.d/buildtest.yml +3 -3
@@ -305,10 +305,10 @@ build-tcg-disabled: - cd tests/qemu-iotests/ - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163 - 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277 + 170 171 183 184 192 194 208 221 222 226 227 236 253 277 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122 - 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202 - 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258 + 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202 + 208 209 216 218 222 227 234 246 247 248 250 254 255 257 258 260 261 262 263 264 270 272 273 277 279 build-user:
Signature · 1 line
2.27.0
[PULL 3/9] gitlab-ci: Fix 'when:' condition in EDK2 jobs
In reply to Thomas HuthFrom: Philippe Mathieu-Daudé <[email protected]>
Jobs depending on another should not use the 'when: always' condition, because if a dependency failed we should not keep running jobs depending on it. The correct condition is 'when: on_success'.
Message-Id: <[email protected]>
--- .gitlab-ci.d/edk2.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
.gitlab-ci.d/edk2.yml +3 -3
@@ -8,11 +8,11 @@ - .gitlab-ci.d/edk2/Dockerfile # or roms/edk2/ is modified (submodule updated) - roms/edk2/* - when: always + when: on_success - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2' - when: always + when: on_success - if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2' - when: always + when: on_success docker-edk2: extends: .edk2_job_rules
Signature · 1 line
2.27.0
[PULL 7/9] gitlab-ci.d/custom-runners: Improve rules for the staging branch
In reply to Thomas HuthIf maintainers are currently pushing to a branch called "staging" in their repository, they are ending up with some stuck jobs - unless they have a s390x CI runner machine available. That's ugly, we should make sure that the related jobs are really only started if such a runner is available. So let's only run these jobs if it's the "staging" branch of the main repository of the QEMU project (where we can be sure that the s390x runner is available), or if the user explicitly set a S390X_RUNNER_AVAILABLE variable in their CI configs to declare that they have such a runner available, too.
Message-Id: <[email protected]>
--- .gitlab-ci.d/custom-runners.yml | 40 +++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 12 deletions(-)
.gitlab-ci.d/custom-runners.yml +28 -12
@@ -24,7 +24,8 @@ ubuntu-18.04-s390x-all-linux-static: - ubuntu_18.04 - s390x rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + - if: "$S390X_RUNNER_AVAILABLE" script: # --disable-libssh is needed because of https://bugs.launchpad.net/qemu/+bug/1838763 # --disable-glusterfs is needed because there's no static version of those libs in distro supplied packages
@@ -43,7 +44,8 @@ ubuntu-18.04-s390x-all: - ubuntu_18.04 - s390x rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + - if: "$S390X_RUNNER_AVAILABLE" script: - mkdir build - cd build
@@ -59,7 +61,8 @@ ubuntu-18.04-s390x-alldbg: - ubuntu_18.04 - s390x rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + - if: "$S390X_RUNNER_AVAILABLE" script: - mkdir build - cd build
@@ -76,7 +79,9 @@ ubuntu-18.04-s390x-clang: - ubuntu_18.04 - s390x rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + when: manual + - if: "$S390X_RUNNER_AVAILABLE" when: manual script: - mkdir build
@@ -93,7 +98,8 @@ ubuntu-18.04-s390x-tci: - ubuntu_18.04 - s390x rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + - if: "$S390X_RUNNER_AVAILABLE" script: - mkdir build - cd build
@@ -108,7 +114,9 @@ ubuntu-18.04-s390x-notcg: - ubuntu_18.04 - s390x rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + when: manual + - if: "$S390X_RUNNER_AVAILABLE" when: manual script: - mkdir build
@@ -128,7 +136,8 @@ ubuntu-20.04-aarch64-all-linux-static: - ubuntu_20.04 - aarch64 rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + - if: "$S390X_RUNNER_AVAILABLE" script: # --disable-libssh is needed because of https://bugs.launchpad.net/qemu/+bug/1838763 # --disable-glusterfs is needed because there's no static version of those libs in distro supplied packages
@@ -147,7 +156,8 @@ ubuntu-20.04-aarch64-all: - ubuntu_20.04 - aarch64 rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + - if: "$S390X_RUNNER_AVAILABLE" script: - mkdir build - cd build
@@ -163,7 +173,8 @@ ubuntu-20.04-aarch64-alldbg: - ubuntu_20.04 - aarch64 rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + - if: "$S390X_RUNNER_AVAILABLE" script: - mkdir build - cd build
@@ -180,7 +191,9 @@ ubuntu-20.04-aarch64-clang: - ubuntu_20.04 - aarch64 rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + when: manual + - if: "$S390X_RUNNER_AVAILABLE" when: manual script: - mkdir build
@@ -197,7 +210,8 @@ ubuntu-20.04-aarch64-tci: - ubuntu_20.04 - aarch64 rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + - if: "$S390X_RUNNER_AVAILABLE" script: - mkdir build - cd build
@@ -212,7 +226,9 @@ ubuntu-20.04-aarch64-notcg: - ubuntu_20.04 - aarch64 rules: - - if: '$CI_COMMIT_BRANCH =~ /^staging/' + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + when: manual + - if: "$S390X_RUNNER_AVAILABLE" when: manual script: - mkdir build
Signature · 1 line
2.27.0
[PULL 9/9] configure script fix for Haiku
In reply to Thomas HuthFrom: Richard Zak <[email protected]>
Haiku does not support compiling with -fpie. See the discussion here for details:
https://discuss.haiku-os.org/t/qemu-on-haiku-sdl-issue/10961/6?u=rjzak
Message-Id: <CAOakUfM8zMpYiAEn-_f9s1DHdVB-Bq9fGMM=Hfr8hJW9ra6aWw@mail.gmail.com>
--- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
configure +2 -1
@@ -770,7 +770,8 @@ SunOS) ;; Haiku) haiku="yes" - QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE $QEMU_CFLAGS" + pie="no" + QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE -fPIC $QEMU_CFLAGS" ;; Linux) audio_drv_list="try-pa oss"
Signature · 1 line
2.27.0
[PULL 8/9] tests: Fix migration-test build failure for sparc
In reply to Thomas HuthFrom: Peter Xu <[email protected]>
Even if <linux/kvm.h> seems to exist for all archs on linux, however including it with __linux__ defined seems to be not working yet as it'll try to include asm/kvm.h and that can be missing for archs that do not support kvm.
To fix this (instead of any attempt to fix linux headers..), we can mark the header to be x86_64 only, because it's so far only service for adding the kvm dirty ring test.
Message-Id: <[email protected]>
--- tests/qtest/migration-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tests/qtest/migration-test.c +3 -2
@@ -27,7 +27,8 @@#include "migration-helpers.h" #include "tests/migration/migration-test.h" -#if defined(__linux__) +/* For dirty ring test; so far only x86_64 is supported */ +#if defined(__linux__) && defined(HOST_X86_64 )#include "linux/kvm.h" #endif
@@ -1395,7 +1396,7 @@ static void test_multifd_tcp_cancel(void)static bool kvm_dirty_ring_supported (void ) { -#if defined(__linux__) +#if defined(__linux__) && defined(HOST_X86_64 )int ret, kvm_fd =open ("/dev/kvm" ,O_RDONLY );if (kvm_fd <0 ) {
Signature · 1 line
2.27.0
Re: [PULL 8/9] tests: Fix migration-test build failure for sparc
Quoted 11 lines · Thomas Huth
From: Peter Xu <[email protected]>
Even if <
linux/kvm.h> seems to exist for all archs on linux, however including it with__linux__defined seems to be not working yet as it'll try to includeasm/kvm.hand that can be missing for archs that do not support kvm.To fix this (instead of any attempt to fix linux headers..), we can mark the header to be
x86_64only, because it's so far only service for adding the kvm dirty ring test.Fixes 1f546b709d6 ("tests: migration-test: Add dirty ring test")
Thanks :)
Quoted 9 lines
Reported-by Richard Henderson <[email protected]>Signed-off-by Peter Xu <[email protected]>Message-Id: <[email protected]>
Reviewed-by Richard Henderson <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- tests/qtest/migration-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Peter Maydell
AppliedQuoted 15 lines · Thomas Huth
Hi Peter!
The following changes since commit
69ea12b19a15ae006521cd5cc0f627f27f738746:Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2021-07-27' into staging (2021-07-28 13:32:12 +0100)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2021-07-29
for you to fetch changes up to
b8ee198d21c4bab41b8cb8d1729a956d9f648997:configure script fix for Haiku (2021-07-29 08:09:32 +0200)
Quoted 7 lines
----------------------------------------------------------------
* Document GitLab custom CI/CD variables
* Fix 'when:' condition in gitlab-CI jobs
* Disable tests in the gitlab-CI that fail due to out-of-memory conditions
* Allow pushing to "staging" again for maintainers without s390x access
* Fix migration-test build failure on SPARC
* Compile without "pie" on Haiku
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.1
for any user-visible changes.
-- PMM