From nobody Mon Feb 9 08:09:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=eu.citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1595611393; cv=none; d=zohomail.com; s=zohoarc; b=Q0Sy1ZprliTSEEkxp0WJvUVaw7pdDnvlyLCl89qGpKsb5LWGOR2nIGUDWwWLRdKz9meLeRcXdCKEcZnM2HFxtuAuwJCOU9pRMN2t5gXgGosk0/jhsMmrgKRQ7o1ZXcCKSmTN6bL5RxCuM8bTpNCs6c6GQTzCpBhIfM5Zjw5kQhE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595611393; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GGuQYGqtNKSJGc/OGWYagtrOXXtsnsU8djx9Q5vFdWw=; b=dShCLptKh3X7TpMfMY/4p0X3WkqVSln/oQ268Et2gOdLnMvYk8AGQlu7F1sq+n/Cyjv2iF8Q2rnnlcZOjSG1MCqpJMeSNDOWdaQYVTGfqsdGiir99NbPfks4AwauofHVpSnCvJOYEck3vNqLRPUnCJFkI7FY4SL4ukUjYQR293M= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 159561139364692.12876673044116; Fri, 24 Jul 2020 10:23:13 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jz1PO-0005sY-El; Fri, 24 Jul 2020 17:22:58 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jz1PN-0005eH-12 for xen-devel@lists.xenproject.org; Fri, 24 Jul 2020 17:22:57 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3c428380-cdd2-11ea-8862-bc764e2007e4; Fri, 24 Jul 2020 17:22:23 +0000 (UTC) Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by chiark.greenend.org.uk (Debian Exim 4.84_2 #1) with esmtp (return-path ijackson@chiark.greenend.org.uk) id 1jz1Oo-00021j-1H; Fri, 24 Jul 2020 18:22:22 +0100 X-Inumbo-ID: 3c428380-cdd2-11ea-8862-bc764e2007e4 From: Ian Jackson To: xen-devel@lists.xenproject.org Subject: [OSSTEST PATCH 07/11] sg-report-host-history: Rerganisation: Make mainquery per-host Date: Fri, 24 Jul 2020 18:22:12 +0100 Message-Id: <20200724172216.28204-8-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724172216.28204-1-ian.jackson@eu.citrix.com> References: <20200724172216.28204-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" This moves the loop over hosts into the main program. We are working our way to a new code structure. No functional change. Signed-off-by: Ian Jackson --- sg-report-host-history | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sg-report-host-history b/sg-report-host-history index ab88828e..509d053d 100755 --- a/sg-report-host-history +++ b/sg-report-host-history @@ -164,7 +164,9 @@ sub jobquery ($$$) { =20 our %hosts; =20 -sub mainquery () { +sub mainquery ($) { + my ($host) =3D @_; + our $runvarq //=3D db_prepare(<execute($host, $minflight); =20 - $hosts{$host} =3D $runvarq->fetchall_arrayref({}); - print DEBUG "MAINQUERY $host got ".(scalar @{ $hosts{$host} })."\n"; - } + print DEBUG "MAINQUERY $host...\n"; + $runvarq->execute($host, $minflight); + + $hosts{$host} =3D $runvarq->fetchall_arrayref({}); + print DEBUG "MAINQUERY $host got ".(scalar @{ $hosts{$host} })."\n"; } =20 sub reporthost ($) { @@ -473,7 +474,9 @@ db_retry($dbh_tests, [], sub { }); =20 db_retry($dbh_tests, [], sub { - mainquery(); + foreach my $host (sort keys %hosts) { + mainquery($host); + } }); =20 foreach my $host (sort keys %hosts) { --=20 2.20.1