From nobody Mon Feb 9 19:08:25 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=1674227236; cv=none; d=zohomail.com; s=zohoarc; b=J2hTPFpuaZu3qOEgHXi+Va8I28wrpJNsYTICIiOz+n3mVQ9u0V3UQ0S+Ln52gbYPGPVMvs0p7NCp02PNxzNVzr/OUpntv/YxUFLA+xPFA+ESDECCVVaaN1xV8MAREZ3ZIVlo6FK6061AlxkT7cx9UGT4krzKx5cwTO9zRpwAFwA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674227236; 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=GoBRxXUBP6uxS3nGn0Vj2J2Npy17xEjNg2ybj4y+XsY=; b=Ku1jYm8c1QB5cqj6erNjlxRK9ECbfV5zqkUJBIw2fYnaxk4OUNDkdRVRSXod0taAXbj8uKJeb+aF403y/e9/8kJFTxfaIA+TtlK01uf3pKDgoFF77/4asegDCOyshET8Uyyp6FiY3lUJVZIvcPblvEFDgIvCJyxU833A33yAliE= 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 1674227236037329.56397736446024; Fri, 20 Jan 2023 07:07:16 -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-297-M6L0yPMGNHafSSJE5KOFZg-1; Fri, 20 Jan 2023 10:06:22 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 908B588B7A0; Fri, 20 Jan 2023 15:06:18 +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 7D1A72026D2A; Fri, 20 Jan 2023 15:06:18 +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 E1FC21946A6D; Fri, 20 Jan 2023 15:06:11 +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 D49111946A76 for ; Fri, 20 Jan 2023 15:06:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C7FA12166B2C; Fri, 20 Jan 2023 15:06:07 +0000 (UTC) Received: from ridgehead.home.lan (ovpn-193-170.brq.redhat.com [10.40.193.170]) by smtp.corp.redhat.com (Postfix) with ESMTP id 44E982166B2A; Fri, 20 Jan 2023 15:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674227235; 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=GoBRxXUBP6uxS3nGn0Vj2J2Npy17xEjNg2ybj4y+XsY=; b=Ivos1Hc0MCJ33rbyrryUdDDly7zHWZ2pji21bRZdK2fzcGNfm/J8+tWgqrHd0Wp6UjYEMs 4Ade0KMOVGqo5HzDZ/6elc1wEBscbWrIZggcwiabQJv1QAh4+R5ZSchLEV45p0OJ8ZPgXn dDoucxgSDEHlGHddA4rHEyN7MAAbxA4= X-MC-Unique: M6L0yPMGNHafSSJE5KOFZg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH 4/7] ci: integration.sh: Replace most 'sudo' usage with running as root Date: Fri, 20 Jan 2023 16:06:00 +0100 Message-Id: <81e1b44904a3a9c4af060b161a9919bce2e7709f.1674223377.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.4 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: 1674227236797100001 Content-Type: text/plain; charset="utf-8"; x-default="true" This is a purely cosmetic change dropping the majority of 'sudo' invocations which we need to do to make final preparations on the test environment. This patch visually divides the part where we need to run as root from the rest of the operations. Signed-off-by: Erik Skultety --- ci/integration.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ci/integration.sh b/ci/integration.sh index 160aecf00d..5cee536442 100644 --- a/ci/integration.sh +++ b/ci/integration.sh @@ -1,10 +1,13 @@ #!/bin/sh =20 +# BEGIN AS ROOT +sudo su - + # 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 +pip3 install --prefix=3D/usr avocado-framework=3D=3D98.0 =20 -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 +echo "DefaultLimitCORE=3Dinfinity" >> /etc/systemd/system.conf # Explicitl= y allow storing cores globally +systemctl daemon-reexec # need to reexec systemd after changing config =20 source /etc/os-release # in order to query the vendor-provided variables if test "$ID" =3D "centos" && test "$VERSION_ID" -eq 8 @@ -17,13 +20,16 @@ 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 + augtool set /files/etc/libvirt/${daemon}.conf/log_filters "'$LOG_FILTE= RS'" &>/dev/null + augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "'$LOG_OUTPU= TS'" &>/dev/null + systemctl --quiet stop ${daemon}.service + systemctl restart ${daemon}.socket done =20 -sudo virsh net-start default &>/dev/null || true +virsh net-start default &>/dev/null || true + +# END AS ROOT +exit =20 cd "$SCRATCH_DIR" git clone --depth 1 https://gitlab.com/libvirt/libvirt-tck.git --=20 2.39.0