Misc CI fixes:

- more helpful logic for git-pipeline-status
   - fix tempdir leak in avocado
   - move remaining x86 check-tcg to gitlab
   - add tracing headers to ubuntu2004 docker
   - move tracing backend tests to gitlab
   - bump up timeouts on cirrus MacOS
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAl+7h7oACgkQ+9DbCVqe
 KkSYdgf/YB8Md3O8ep8nRyZkITN0WFnkFyMibqpsVvJ+QD2Ew4besQ71o1cAn8WP
 QmFBKiXEEGjN4BayRoXxmZJS2HUKLejez9krSgpvdAdtBIlRFjqPdaqat8MgFbgo
 iXuJ/ARHPQSDx6IMzPA1BqRerjgLwGlU3gHIWl7GZHSq/D5HzEEEscvDV6cIwlHm
 n/q/XJuDec515PYd5xL2bnsj2mjt0rxLULz59mxrfy0YZnxy7A/C5ZkTDIjxZXuz
 6o79DlL5n7DIuZ0aJQAX2vM7ZEYG6ALKleFMF7u1sUjmQ+fFZSLTMyJDJ++uKRdV
 2czWmcSlE8MaLih8vZoQCqGa+Wfi4w==
 =kCfd
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stsquad/tags/pull-for-5.2-rc3-231120-1' into staging

Misc CI fixes:

  - more helpful logic for git-pipeline-status
  - fix tempdir leak in avocado
  - move remaining x86 check-tcg to gitlab
  - add tracing headers to ubuntu2004 docker
  - move tracing backend tests to gitlab
  - bump up timeouts on cirrus MacOS

# gpg: Signature made Mon 23 Nov 2020 09:58:18 GMT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-for-5.2-rc3-231120-1:
  .cirrus.yml: bump timeout period for MacOS builds
  gitlab-ci: Move trace backend tests across to gitlab
  tests/docker: Install liblttng-ust-dev package in Ubuntu 20.04 image
  gitlab: move remaining x86 check-tcg targets to gitlab
  tests/avocado: clean-up socket directory after run
  tests: add prefixes to the bare mkdtemp calls
  scripts/ci: clean up default args logic a little

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2020-11-23 11:27:44 +00:00
commit 6ab64cc2a5
7 changed files with 56 additions and 58 deletions

View File

@ -18,6 +18,7 @@ freebsd_12_task:
- gmake -j$(sysctl -n hw.ncpu) check V=1
macos_task:
timeout_in: 90m
osx_instance:
image: catalina-base
install_script:
@ -32,6 +33,7 @@ macos_task:
- gmake check V=1
macos_xcode_task:
timeout_in: 90m
osx_instance:
# this is an alias for the latest Xcode
image: catalina-xcode

View File

@ -247,6 +247,15 @@ build-user:
CONFIGURE_ARGS: --disable-tools --disable-system
MAKE_CHECK_ARGS: check-tcg
# Only build the softmmu targets we have check-tcg tests for
build-some-softmmu:
<<: *native_build_job_definition
variables:
IMAGE: debian-all-test-cross
CONFIGURE_ARGS: --disable-tools --enable-debug-tcg
TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
MAKE_CHECK_ARGS: check-tcg
# Run check-tcg against linux-user (with plugins)
# we skip sparc64-linux-user until it has been fixed somewhat
# we skip cris-linux-user as it doesn't use the common run loop
@ -258,6 +267,14 @@ build-user-plugins:
MAKE_CHECK_ARGS: check-tcg
timeout: 1h 30m
build-some-softmmu-plugins:
<<: *native_build_job_definition
variables:
IMAGE: debian-all-test-cross
CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins --enable-debug-tcg
TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
MAKE_CHECK_ARGS: check-tcg
build-clang:
<<: *native_build_job_definition
variables:
@ -398,6 +415,24 @@ check-crypto-only-gnutls:
IMAGE: centos7
MAKE_CHECK_ARGS: check
# We don't need to exercise every backend with every front-end
build-trace-multi-user:
<<: *native_build_job_definition
variables:
IMAGE: ubuntu2004
CONFIGURE_ARGS: --enable-trace-backends=log,simple,syslog --disable-system
build-trace-ftrace-system:
<<: *native_build_job_definition
variables:
IMAGE: ubuntu2004
CONFIGURE_ARGS: --enable-trace-backends=ftrace --target-list=x86_64-softmmu
build-trace-ust-system:
<<: *native_build_job_definition
variables:
IMAGE: ubuntu2004
CONFIGURE_ARGS: --enable-trace-backends=ust --target-list=x86_64-softmmu
check-patch:
stage: build

View File

@ -232,25 +232,6 @@ jobs:
- TEST_CMD=""
# We don't need to exercise every backend with every front-end
- name: "GCC trace log,simple,syslog (user)"
env:
- CONFIG="--enable-trace-backends=log,simple,syslog --disable-system"
- TEST_CMD=""
- name: "GCC trace ftrace (x86_64-softmmu)"
env:
- CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu"
- TEST_CMD=""
- name: "GCC trace ust (x86_64-softmmu)"
env:
- CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu"
- TEST_CMD=""
# Using newer GCC with sanitizers
- name: "GCC9 with sanitizers (softmmu)"
dist: bionic
@ -301,32 +282,6 @@ jobs:
- ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread" || { cat config.log meson-logs/meson-log.txt && exit 1; }
# Run check-tcg against linux-user
- name: "GCC check-tcg (user)"
env:
- CONFIG="--disable-system --enable-debug-tcg"
- TEST_BUILD_CMD="make build-tcg"
- TEST_CMD="make check-tcg"
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
# Run check-tcg against softmmu targets
- name: "GCC check-tcg (some-softmmu)"
env:
- CONFIG="--enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
- TEST_BUILD_CMD="make build-tcg"
- TEST_CMD="make check-tcg"
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
# Run check-tcg against softmmu targets (with plugins)
- name: "GCC plugins check-tcg (some-softmmu)"
env:
- CONFIG="--enable-plugins --enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
- TEST_BUILD_CMD="make build-tcg"
- TEST_CMD="make check-tcg"
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"
- name: "[aarch64] GCC check-tcg"
arch: arm64
dist: focal

View File

@ -303,7 +303,8 @@ class QEMUMachine:
return args
def _pre_launch(self) -> None:
self._temp_dir = tempfile.mkdtemp(dir=self._test_dir)
self._temp_dir = tempfile.mkdtemp(prefix="qemu-machine-",
dir=self._test_dir)
self._qemu_log_path = os.path.join(self._temp_dir, self._name + ".log")
self._qemu_log_file = open(self._qemu_log_path, 'wb')

View File

@ -31,7 +31,7 @@ class NoPipelineFound(Exception):
"""Communication is successfull but pipeline is not found."""
def get_local_branch_commit(branch='staging'):
def get_local_branch_commit(branch):
"""
Returns the commit sha1 for the *local* branch named "staging"
"""
@ -126,18 +126,16 @@ def create_parser():
help=('The GitLab project ID. Defaults to the project '
'for https://gitlab.com/qemu-project/qemu, that '
'is, "%(default)s"'))
try:
default_commit = get_local_branch_commit()
commit_required = False
except ValueError:
default_commit = ''
commit_required = True
parser.add_argument('-c', '--commit', required=commit_required,
default=default_commit,
parser.add_argument('-b', '--branch', type=str, default="staging",
help=('Specify the branch to check. '
'Use HEAD for your current branch. '
'Otherwise looks at "%(default)s"'))
parser.add_argument('-c', '--commit',
default=None,
help=('Look for a pipeline associated with the given '
'commit. If one is not explicitly given, the '
'commit associated with the local branch named '
'"staging" is used. Default: %(default)s'))
'commit associated with the default branch '
'is used.'))
parser.add_argument('--verbose', action='store_true', default=False,
help=('A minimal verbosity level that prints the '
'overall result of the check/wait'))
@ -149,6 +147,10 @@ def main():
"""
parser = create_parser()
args = parser.parse_args()
if not args.commit:
args.commit = get_local_branch_commit(args.branch)
success = False
try:
if args.wait:

View File

@ -171,7 +171,8 @@ class Test(avocado.Test):
self.cancel("No QEMU binary defined or found in the build tree")
def _new_vm(self, *args):
vm = QEMUMachine(self.qemu_bin, sock_dir=tempfile.mkdtemp())
self._sd = tempfile.TemporaryDirectory(prefix="avo_qemu_sock_")
vm = QEMUMachine(self.qemu_bin, sock_dir=self._sd.name)
if args:
vm.add_args(*args)
return vm
@ -192,6 +193,7 @@ class Test(avocado.Test):
def tearDown(self):
for vm in self._vms.values():
vm.shutdown()
self._sd = None
def fetch_asset(self, name,
asset_hash=None, algorithm=None,

View File

@ -23,6 +23,7 @@ ENV PACKAGES flex bison \
libiscsi-dev \
libjemalloc-dev \
libjpeg-turbo8-dev \
liblttng-ust-dev \
liblzo2-dev \
libncurses5-dev \
libncursesw5-dev \