From nobody Mon Sep 16 18:57:57 2024 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=1674811633; cv=none; d=zohomail.com; s=zohoarc; b=LBBAsDBv+sQae/PJ4xhwUMVNGbKyY/ct2/GonL96Ma7vEsXuPKRSDXyRwLSQChNyFyh+H4EzCmUK4zfWz8KSy8THvH9O9iDZwCJKDCE8iKwoZ4lHk3lpC835b32uPdZlWc32WByPV/RaZbjyZO/g5VLllAMgrISv0zZC5m4WRZo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674811633; 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=raH4YuIRThssQ5BdU818Y9myk6O28DR/HBCFSzJvN44=; b=mhxkGH8M+JdPCNjeaX52WKNZqhExFTA2LbcNjS+8V504OE5l4s2vhiMKpxjBk8SaHvC32vFueoL/JAX38RjSWuzZ+x/ezt/JLcQkHymndcD9Nw+h3IHJpKzwvCDmHXknI1p37BrP8zF2aJ9AY1fzxUsx9AUj3sNABuorAnVSZBI= 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 1674811633284981.0643354330415; Fri, 27 Jan 2023 01:27:13 -0800 (PST) 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-99-tLAFhD2SOB2GWRt07i_dNg-1; Fri, 27 Jan 2023 04:27:11 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B342085C6E2; Fri, 27 Jan 2023 09:27:08 +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 A16381121314; Fri, 27 Jan 2023 09:27:08 +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 ECD521946A5E; Fri, 27 Jan 2023 09:27:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8A5D719465B8 for ; Fri, 27 Jan 2023 09:27:00 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7E6F414171C0; Fri, 27 Jan 2023 09:27:00 +0000 (UTC) Received: from ridgehead.home.lan (ovpn-193-168.brq.redhat.com [10.40.193.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id F16BC14171BE; Fri, 27 Jan 2023 09:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674811632; 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=raH4YuIRThssQ5BdU818Y9myk6O28DR/HBCFSzJvN44=; b=ausN6qhdOV4d3fOuWttLF5XsHTdHqKj+bGFJ12jMMUjtPI7NyXItMn1OYITTV4P5dUkBx5 EziNWk3LWcHUPxeXy1HHw7LygtZLcsgDvkCYmz9KZSKolop8ky/UE5t6Fl/rbFxN5Nm70W LVjb18Ql66y+wGXTMfCcuAy48m0YV3I= X-MC-Unique: tLAFhD2SOB2GWRt07i_dNg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v2 3/8] ci: integration: Extract several hidden job definitions to a script Date: Fri, 27 Jan 2023 10:26:51 +0100 Message-Id: <8ac0b41478c9977b9a6ac07ac6496b0054859dfa.1674811615.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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: Erik Skultety Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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: 1674811633784100002 Content-Type: text/plain; charset="utf-8"; x-default="true" This will allow us to re-use the script in other scenarios like local executions where up until now one had to copy-paste the recipe line-by-line. Signed-off-by: Erik Skultety --- ci/integration-template.yml | 36 +----------------------------------- ci/integration.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 35 deletions(-) create mode 100644 ci/integration.sh diff --git a/ci/integration-template.yml b/ci/integration-template.yml index 15c36d7a29..802cba9420 100644 --- a/ci/integration-template.yml +++ b/ci/integration-template.yml @@ -27,34 +27,6 @@ .install-deps: &install-deps - sudo dnf install -y libvirt-rpms/* libvirt-perl-rpms/* libvirt-python-= rpms/* =20 - # Avocado >98.0 fails with the nwfilter TCK tests, so stick with 98.0 fo= r now - - sudo pip3 install --prefix=3D/usr avocado-framework=3D=3D98.0 - - -.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 virtlockd virtlogd"; - else - DAEMONS=3D"virtinterfaced virtlockd virtlogd virtnetworkd virtnodede= vd virtnwfilterd virtproxyd virtqemud virtsecretd virtstoraged"; - 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 "'$LO= G_FILTERS'" &>/dev/null; - sudo augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "'$LO= G_OUTPUTS'" &>/dev/null; - sudo systemctl --quiet stop ${daemon}.service; - sudo systemctl restart ${daemon}.socket; - done - =20 .collect-logs: &collect-logs - set +e @@ -79,14 +51,8 @@ before_script: - mkdir "$SCRATCH_DIR" - *install-deps - - *enable-core-dumps - - *enable-libvirt-debugging - - sudo virsh net-start default &>/dev/null || true; script: - - 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 + - chmod +x ci/integration.sh && ci/integration.sh after_script: - test "$CI_JOB_STATUS" =3D "success" && exit 0; - *collect-logs diff --git a/ci/integration.sh b/ci/integration.sh new file mode 100644 index 0000000000..21795518c3 --- /dev/null +++ b/ci/integration.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# Avocado >98.0 fails with the nwfilter TCK tests, so stick with 98.0 for = now +sudo pip3 install --prefix=3D/usr avocado-framework=3D=3D98.0 + +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 + +source /etc/os-release # in order to query the vendor-provided variables +if test "$ID" =3D "centos" && test "$VERSION_ID" -lt 9 || + test "$ID" =3D "fedora" && test "$VERSION_ID" -lt 35 +then + DAEMONS=3D"libvirtd virtlockd virtlogd" +else + DAEMONS=3D"virtinterfaced virtlockd virtlogd virtnetworkd virtnodedevd= virtnwfilterd virtproxyd virtqemud virtsecretd virtstoraged" +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.dbus = 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 + +sudo virsh net-start default &>/dev/null || true + +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 --=20 2.39.1