From nobody Mon Feb 9 12:11:32 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=1695115026; cv=none; d=zohomail.com; s=zohoarc; b=nQOO56w/UF9sKwcRKIqYNll3aprsoZ2aL8/yIYxPDVIRKA1ecxbSbgj90lnj4+hKPSXIHWrcbaLWQVntBYwdqUQl2cTfvv19yZOW0AjZR5FsAlt2SGQGbpS+wAI/4CcG5tCV8obP1x71O2VQwkDVlIDnjnpNSmzbrOZwD9BgO8Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695115026; 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=jLDCx9B/C1IItOio3wraUQq4O5xSUChR7EnOZaSd9DE=; b=HZJMTHgDKFLF+wzBwpRlZ+346mBRYqx7wVIEZ3XCHCvNgwupfRLS/33syWNgSq2I/utg20mwb3eGNlCHZf1132lSf62/uV3jknih108NUXrSKS4fMxF63Lwd8+yF8G78P9Cbi1Bv9jopbBY1uA6RqyvO5XRHZDQ5DRTtSkVUw4A= 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 1695115026555538.2732830774074; Tue, 19 Sep 2023 02:17:06 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-399-RvtqL22sOASLhPiUOTmRvQ-1; Tue, 19 Sep 2023 05:16:04 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2F2DE3C02B4A; Tue, 19 Sep 2023 09:16:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15D54140273C; Tue, 19 Sep 2023 09:16:02 +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 6813619466FF; Tue, 19 Sep 2023 09:15:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EFA30194658C for ; Tue, 19 Sep 2023 09:15:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EAB442156711; Tue, 19 Sep 2023 09:15:16 +0000 (UTC) Received: from orca.brq.redhat.com (unknown [10.43.2.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76A432156701; Tue, 19 Sep 2023 09:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695115025; 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=jLDCx9B/C1IItOio3wraUQq4O5xSUChR7EnOZaSd9DE=; b=DtCrNoKn17596sf0jSuE+QaxAPcYL6brMVT/SIbcqZhmVsXDmLZg7rLJJTDLbtbCY27Vdp ShaiuoEjeZRSW4xUkzEjqBSXIeXpF7v+BTiKCq7hTNBKMeU/Ytk0TfG4b2ZIQ3NutzkBdh xR6JZG21uj/xHtp2ig2ITJMcdiqsO/w= X-MC-Unique: RvtqL22sOASLhPiUOTmRvQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v3 10/12] ci: jobs.sh: integration: Execute commands via 'run_cmd[_quiet]' helpers Date: Tue, 19 Sep 2023 11:15:05 +0200 Message-ID: <65f0a0043b3bfe4c67d94c8922530a00495fa91c.1695114836.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.7 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: 1695115028046100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Unfortunately, once we go down the line of running our own scripts as part of GitLab CI jobs rather than open coding Shell in YAML, we lose the benefit of seeing each line the script executes. The downside of the default YAML however is that we have to maintain the same piece of code on 2 places in that case. Let's adopt what we use with other container jobs and prefix each shell command with 'run_cmd' or 'run_cmd_quiet' which will dump it in the logs before executing. Flow control expressions and structures are a problem though in this regard, so let's just print some important values for debugging purposes. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrang=C3=A9 --- ci/jobs.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ci/jobs.sh b/ci/jobs.sh index 8ae3b87228..861e561039 100644 --- a/ci/jobs.sh +++ b/ci/jobs.sh @@ -87,16 +87,16 @@ run_website_build() { } =20 run_integration() { - sudo pip3 install --prefix=3D/usr avocado-framework + run_cmd sudo pip3 install --prefix=3D/usr avocado-framework =20 # Explicitly allow storing cores globally - sudo sh -c "echo DefaultLimitCORE=3Dinfinity >> /etc/systemd/system.co= nf" + run_cmd sudo sh -c "echo DefaultLimitCORE=3Dinfinity >> /etc/systemd/s= ystem.conf" =20 # Need to reexec systemd after changing config - sudo systemctl daemon-reexec + run_cmd sudo systemctl daemon-reexec =20 # Source the os-release file to query the vendor-provided variables - . /etc/os-release + run_cmd . /etc/os-release if test "$ID" =3D "centos" && test "$VERSION_ID" -eq 8 then DAEMONS=3D"libvirtd virtlockd virtlogd" @@ -107,10 +107,10 @@ run_integration() { 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 "'$= LOG_FILTERS'" 1>/dev/null 2>&1 - sudo augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "'$= LOG_OUTPUTS'" 1>/dev/null 2>&1 - sudo systemctl --quiet stop ${daemon}.service - sudo systemctl restart ${daemon}.socket + run_cmd_quiet sudo augtool set /files/etc/libvirt/${daemon}.conf/l= og_filters "'$LOG_FILTERS'" + run_cmd_quiet sudo augtool set /files/etc/libvirt/${daemon}.conf/l= og_outputs "'$LOG_OUTPUTS'" + run_cmd_quiet sudo systemctl --quiet stop ${daemon}.service + run_cmd_quiet sudo systemctl restart ${daemon}.socket done =20 # Make sure the default network is started on all platforms @@ -118,10 +118,10 @@ run_integration() { # Shell scripts with -e by default and virsh returns an error if one t= ries # to start a machine/network that is already active which is both fine= and # should also be a non-fatal error - sudo virsh --quiet net-start default 1>/dev/null 2>&1 || true + run_cmd_quiet sudo virsh --quiet net-start default || true =20 - 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_D= IR"/avocado + run_cmd cd "$SCRATCH_DIR" + run_cmd git clone --depth 1 https://gitlab.com/libvirt/libvirt-tck.git + run_cmd cd libvirt-tck + run_cmd sudo avocado --config avocado.config run --job-results-dir "$S= CRATCH_DIR"/avocado } --=20 2.41.0