From nobody Sun Feb 8 21:47:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1651851338; cv=none; d=zohomail.com; s=zohoarc; b=HODh8VPxXcNJmDlemIN5dwBR+LTMnad4r1hL/bAtkkaE/7yYGzVsnayiGsnN2IYBymDW7Aniny8PytOcnevI6LKqpzIA3T+cLx/r4jgiP4k37EnOaeYu93vexCzSVPozPy8sROvu3r3+DwjN2QTVWbAuJ2tdTrCWIyMJSZ61QvM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651851338; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pthIRyE0m7l3VwmtJRv9IVk2s1zEUubKbJxO5oZIN/0=; b=js77HC1Jehh8TpYn4jRVaCJO19lMjKaoUJshvM4nKKKwfXxtdCAWybYnpWm7H3uLf1loJ04b+sZHeGuXAa/YV1YZTlMPzyeusxySYOp40KQ3dDLCsnlMA1KTcyXVG98gc3Zf1JUVCZJJSLNa+oWJeUaCHaQf+32Vuh7Ow/ugruw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1651851338854644.5735456558225; Fri, 6 May 2022 08:35:38 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-265-cRh7N4baPYiyyswzgOylYw-1; Fri, 06 May 2022 11:35:34 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 342491014A69; Fri, 6 May 2022 15:35:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F781463DE7; Fri, 6 May 2022 15:35:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F392F1947058; Fri, 6 May 2022 15:35:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 719371947B8B for ; Fri, 6 May 2022 15:35:29 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 38609111E41D; Fri, 6 May 2022 15:35:29 +0000 (UTC) Received: from nautilus.home.lan (unknown [10.40.192.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id A940E1121315; Fri, 6 May 2022 15:35:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651851337; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=pthIRyE0m7l3VwmtJRv9IVk2s1zEUubKbJxO5oZIN/0=; b=M5RRYowTclMgg4yCD14kTlGFaB7cux10KZCRLmgP1Ms5QzjWZdyrXtnnZOBnvitff9L0Jm jbmkkUejbYoNzNDCXon9Yv1+S7B1zmYgfQJG4PjRf9WQ5Pe8Dlh8XZtdUj8PdQnDFFsl41 folvpeR4f8+DpzzV37OZFH+cO5Ue4jQ= X-MC-Unique: cRh7N4baPYiyyswzgOylYw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH 2/5] ci: Break off the integration_tests template into more templates Date: Fri, 6 May 2022 17:35:17 +0200 Message-Id: <336eb0fb6df18d3078a0ebc7e7996b048e19d1e3.1651851310.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eskultet@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1651852240635100001 Content-Type: text/plain; charset="utf-8"; x-default="true" There's quite a lot happening int the .integration_tests template already even without adding upstream QEMU build to the mix. Let's break the template into more pieces which can be put together using the YAML anchors. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrang=C3=A9 --- ci/integration-template.yml | 76 +++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/ci/integration-template.yml b/ci/integration-template.yml index c4201df6db..195e9cfa5f 100644 --- a/ci/integration-template.yml +++ b/ci/integration-template.yml @@ -1,44 +1,62 @@ + + +.install-deps: &install-deps + - sudo dnf install -y libvirt-rpms/* libvirt-perl-rpms/* + - sudo pip3 install --prefix=3D/usr avocado-framework + + +.enable-core-dumps: &enable-core-dumps + - sudo sh -c "echo DefaultLimitCORE=3Dinfinity >> /etc/systemd/system.co= nf" # Explicitly allow storing cores globally + - sudo systemctl daemon-reexec # need to reexec systemd after changing c= onfig + + +.enable-libvirt-debugging: &enable-libvirt-debugging + - source /etc/os-release # in order to query the vendor-provided variab= les + - if test "$ID" =3D "centos" && test "$VERSION_ID" -lt 9 || + test "$ID" =3D "fedora" && test "$VERSION_ID" -lt 35; + then + DAEMONS=3D"libvirtd virtlogd virtlockd"; + else + DAEMONS=3D"virtproxyd virtqemud virtinterfaced virtsecretd virtstora= ged virtnwfilterd virtnodedevd virtlogd virtlockd"; + fi + - for daemon in $DAEMONS; + do + LOG_OUTPUTS=3D"1:file:/var/log/libvirt/${daemon}.log"; + LOG_FILTERS=3D"3:remote 4:event 3:util.json 3:util.object 3:util.dbu= s 3:util.netlink 3:node_device 3:rpc 3:access 1:*"; + sudo augtool set /files/etc/libvirt/${daemon}.conf/log_filters "$LOG= _FILTERS" &>/dev/null; + sudo augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "$LOG= _OUTPUTS" &>/dev/null; + sudo systemctl --quiet stop ${daemon}.service; + sudo systemctl restart ${daemon}.socket; + done + + +.collect-logs: &collect-logs + - mkdir logs + - test -e "$SCRATCH_DIR"/avocado && sudo mv "$SCRATCH_DIR"/avocado/lates= t/test-results logs/avocado; + - sudo coredumpctl info --no-pager > logs/coredumpctl.txt + - sudo mv /var/log/libvirt logs/libvirt + - sudo chown -R $(whoami):$(whoami) logs + # rename all Avocado stderr/stdout logs to *.log so that GitLab's web = UI doesn't mangle the MIME type + - find logs/avocado/ -type f ! -name "*.log" -exec + sh -c 'DIR=3D$(dirname {}); NAME=3D$(basename {}); mv $DIR/$NAME{,.l= og}' \; + + .integration_tests: stage: integration_tests before_script: - mkdir "$SCRATCH_DIR" - - sudo sh -c "echo DefaultLimitCORE=3Dinfinity >> /etc/systemd/system.= conf" # Explicitly allow storing cores globally - - sudo systemctl daemon-reexec # need to reexec systemd after changing= config - - sudo dnf install -y libvirt-rpms/* libvirt-perl-rpms/* - - sudo pip3 install --prefix=3D/usr avocado-framework - - source /etc/os-release # in order to query the vendor-provided vari= ables - - if test "$ID" =3D "centos" && test "$VERSION_ID" -lt 9 || - test "$ID" =3D "fedora" && test "$VERSION_ID" -lt 35; - then - DAEMONS=3D"libvirtd virtlogd virtlockd"; - else - DAEMONS=3D"virtproxyd virtqemud virtinterfaced virtsecretd virtsto= raged virtnwfilterd virtnodedevd virtlogd virtlockd"; - fi - - for daemon in $DAEMONS; - do - LOG_OUTPUTS=3D"1:file:/var/log/libvirt/${daemon}.log"; - LOG_FILTERS=3D"3:remote 4:event 3:util.json 3:util.object 3:util.d= bus 3:util.netlink 3:node_device 3:rpc 3:access 1:*"; - sudo augtool set /files/etc/libvirt/${daemon}.conf/log_filters "$L= OG_FILTERS" &>/dev/null; - sudo augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "$L= OG_OUTPUTS" &>/dev/null; - sudo systemctl --quiet stop ${daemon}.service; - sudo systemctl restart ${daemon}.socket; - done + - *install-deps + - *enable-core-dumps + - *enable-libvirt-debugging - sudo virsh net-start default &>/dev/null || true; script: - - mkdir logs - cd "$SCRATCH_DIR" - git clone --depth 1 https://gitlab.com/libvirt/libvirt-tck.git - cd libvirt-tck - sudo avocado --config avocado.config run --job-results-dir "$SCRATCH= _DIR"/avocado after_script: - test "$CI_JOB_STATUS" =3D "success" && exit 0; - - test -e "$SCRATCH_DIR"/avocado && sudo mv "$SCRATCH_DIR"/avocado/lat= est/test-results logs/avocado; - - sudo coredumpctl info --no-pager > logs/coredumpctl.txt - - sudo mv /var/log/libvirt logs/libvirt - - sudo chown -R $(whoami):$(whoami) logs - # rename all Avocado stderr/stdout logs to *.log so that GitLab's we= b UI doesn't mangle the MIME type - - find logs/avocado/ -type f ! -name "*.log" -exec - sh -c 'DIR=3D$(dirname {}); NAME=3D$(basename {}); mv $DIR/$NAME{,= .log}' \; + - *collect-logs variables: SCRATCH_DIR: "/tmp/scratch" artifacts: --=20 2.34.1