From patchwork Wed Oct 7 17:59:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821381 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7EE651752 for ; Wed, 7 Oct 2020 18:01:29 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5362E2076C for ; Wed, 7 Oct 2020 18:01:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5362E2076C Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3607.10331 (Exim 4.92) (envelope-from ) id 1kQDjz-0003sN-H7; Wed, 07 Oct 2020 18:00:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3607.10331; Wed, 07 Oct 2020 18:00:39 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDjz-0003sG-E5; Wed, 07 Oct 2020 18:00:39 +0000 Received: by outflank-mailman (input) for mailman id 3607; Wed, 07 Oct 2020 18:00:37 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDjx-0003r9-QR for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:00:37 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a773c96a-06a5-4cda-beea-6bc09cdd1efb; Wed, 07 Oct 2020 18:00:32 +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 1kQDjr-0007CF-ID; Wed, 07 Oct 2020 19:00:31 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDjx-0003r9-QR for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:00:37 +0000 X-Inumbo-ID: a773c96a-06a5-4cda-beea-6bc09cdd1efb Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a773c96a-06a5-4cda-beea-6bc09cdd1efb; Wed, 07 Oct 2020 18:00:32 +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 1kQDjr-0007CF-ID; Wed, 07 Oct 2020 19:00:31 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 01/82] ms-queuedaemon: Update for newer Tcl's socket channel ids Date: Wed, 7 Oct 2020 18:59:03 +0100 Message-Id: <20201007180024.7932-2-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Now we have things like "sock55599edaf050" where previously we had something like "sock142". So the output is misaligned. Bump the sizes. And with these longer names, when showing the front of the queue only print the full first entry and the start of the next one. Signed-off-by: Ian Jackson --- ms-queuedaemon | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ms-queuedaemon b/ms-queuedaemon index a3a009ca..dc858863 100755 --- a/ms-queuedaemon +++ b/ms-queuedaemon @@ -91,7 +91,7 @@ proc log-event {m} { proc log-state {m} { global need_queue_run queue - set lhs [format "N=%d Q=%d (%-15.15s) " \ + set lhs [format "N=%d Q=%d (%-20.20s) " \ $need_queue_run [llength $queue] $queue] foreach-walker w { @@ -99,13 +99,13 @@ proc log-state {m} { if {[info exists queue_running]} { append lhs [format "R=%-3d " [llength $queue_running]] if {[info exists thinking]} { - append lhs [format "T=%-7s " $thinking] + append lhs [format "T=%-16s " $thinking] } else { - append lhs [format " "] + append lhs [format " "] } - append lhs [format "(%-15.15s) " $queue_running] + append lhs [format "(%-20.20s) " $queue_running] } else { - append lhs " " + append lhs " " } } From patchwork Wed Oct 7 17:59:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821383 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ABBEA17D1 for ; Wed, 7 Oct 2020 18:01:29 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8044621707 for ; Wed, 7 Oct 2020 18:01:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8044621707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3608.10343 (Exim 4.92) (envelope-from ) id 1kQDk3-0003uF-Qn; Wed, 07 Oct 2020 18:00:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3608.10343; Wed, 07 Oct 2020 18:00:43 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDk3-0003u8-Nk; Wed, 07 Oct 2020 18:00:43 +0000 Received: by outflank-mailman (input) for mailman id 3608; Wed, 07 Oct 2020 18:00:42 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDk2-0003r9-Qd for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:00:42 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id edf9d6c3-9d9b-4793-83b4-387a7cb6a76d; Wed, 07 Oct 2020 18:00:32 +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 1kQDjr-0007CF-Pj; Wed, 07 Oct 2020 19:00:31 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDk2-0003r9-Qd for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:00:42 +0000 X-Inumbo-ID: edf9d6c3-9d9b-4793-83b4-387a7cb6a76d Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id edf9d6c3-9d9b-4793-83b4-387a7cb6a76d; Wed, 07 Oct 2020 18:00:32 +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 1kQDjr-0007CF-Pj; Wed, 07 Oct 2020 19:00:31 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 02/82] Executive.pm planner: fix typo Date: Wed, 7 Oct 2020 18:59:04 +0100 Message-Id: <20201007180024.7932-3-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index a0d9f81e..f17e7b70 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -702,7 +702,7 @@ sub plan_search ($$$$) { next PERIOD if $endevt->{Time} <= $try_time; # this period is entirely before the proposed slot; - # it doesn't overlap, but most check subsequent periods + # it doesn't overlap, but must check subsequent periods CHECK: { From patchwork Wed Oct 7 17:59:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821387 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8DFE91752 for ; Wed, 7 Oct 2020 18:01:37 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 635D62076C for ; Wed, 7 Oct 2020 18:01:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 635D62076C Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3609.10355 (Exim 4.92) (envelope-from ) id 1kQDk9-0003yN-5Y; Wed, 07 Oct 2020 18:00:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3609.10355; Wed, 07 Oct 2020 18:00:49 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDk9-0003yC-2J; Wed, 07 Oct 2020 18:00:49 +0000 Received: by outflank-mailman (input) for mailman id 3609; Wed, 07 Oct 2020 18:00:47 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDk7-0003r9-Qh for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:00:47 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6cb581d4-7b5f-471f-8c85-c3e369bc8064; Wed, 07 Oct 2020 18:00:33 +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 1kQDjs-0007CF-2P; Wed, 07 Oct 2020 19:00:32 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDk7-0003r9-Qh for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:00:47 +0000 X-Inumbo-ID: 6cb581d4-7b5f-471f-8c85-c3e369bc8064 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6cb581d4-7b5f-471f-8c85-c3e369bc8064; Wed, 07 Oct 2020 18:00:33 +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 1kQDjs-0007CF-2P; Wed, 07 Oct 2020 19:00:32 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 03/82] README.planner: Document magic job hostflags Date: Wed, 7 Oct 2020 18:59:05 +0100 Message-Id: <20201007180024.7932-4-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- README.planner | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/README.planner b/README.planner index c33aae11..f134d716 100644 --- a/README.planner +++ b/README.planner @@ -203,6 +203,66 @@ that shared systems get regrooved occasionally even if nothing decides to unshare them. +ts-hosts-allocate-Executive and hostflags +---------------------------------------- + +Within a job, the allocations are actually done by +ts-hosts-allocate-Executive. It is told what to do by its command +line arguments, which are (usually) simply IDENTs. + +The IDENTs provide the key for runvars which control the host +allocation algorithm. Principally, these are the runvars which define +the job's hostflags + all_hostflags + IDENT_hostflags + runtime_IDENT_hostflags +(all of these are comma-separated lists). + +Each such hostflag must, in general, be set for a particular host, for +that host to be eligible. But there are some special forms of job +hostflag: + + share-SHARING + + The host may be shared with other jobs. Typically used for + builds. SHARING is a string which denotes the "scope" of the + sharing - jobs with the same SHARING should set the host up + identically. The osstest test harness revision is automatically + appended and therefore does not need to be included. + + equiv-FORMALTOKEN + + For each equiv-FORMALTOKEN job flag set on one or more IDENTs, a + corresponding equiv-ACTUALTOKEN host flag must be set on the + corresponding hosts. So, for example, if the IDENTs src_host and + dst_host both have equiv-1 specified, then the two hosts chosen + for src_host and dst_host will have an actual hostflag in common + which matches the pattern equiv-*. + + diverse-FORMATLTOKEN + + For each diverse-FORMALTOKEN flag, the selected host will *not* be + the same as any other allocation with the same diverse-FORMALTOKEN + flag in the same *flight*. + + CONDNAME:CONDARGS... + + Looks up CONDNAME as Osstest::ResourceCondition::PROPNAME. + The selected host must match the appropriate condition. + CONDNAMEs are: + + PropEq:HOSTPROP:VAL + + Require the host property HOSTPROP to be equal to VAL, + according to string comparison. (Unset properties are + match an empty VAL.) + + PropMinVer:HOSTPROP:VAL + + Require the host property HOSTPROP to be at least VAL, according + to version number comparison (as implemented by dpkg and + coreutils). + Flights ------- From patchwork Wed Oct 7 17:59:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821393 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48AC717D1 for ; Wed, 7 Oct 2020 18:01:58 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E8DF21775 for ; Wed, 7 Oct 2020 18:01:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E8DF21775 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3610.10367 (Exim 4.92) (envelope-from ) id 1kQDkD-00042t-GR; Wed, 07 Oct 2020 18:00:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3610.10367; Wed, 07 Oct 2020 18:00:53 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkD-00042m-CT; Wed, 07 Oct 2020 18:00:53 +0000 Received: by outflank-mailman (input) for mailman id 3610; Wed, 07 Oct 2020 18:00:52 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkC-0003r9-Qp for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:00:52 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8520070e-0199-4435-9d21-e70d61f00bc3; Wed, 07 Oct 2020 18:00:34 +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 1kQDjs-0007CF-98; Wed, 07 Oct 2020 19:00:32 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkC-0003r9-Qp for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:00:52 +0000 X-Inumbo-ID: 8520070e-0199-4435-9d21-e70d61f00bc3 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8520070e-0199-4435-9d21-e70d61f00bc3; Wed, 07 Oct 2020 18:00:34 +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 1kQDjs-0007CF-98; Wed, 07 Oct 2020 19:00:32 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 04/82] sg-run-job: Minor whitespace (formatting) changes Date: Wed, 7 Oct 2020 18:59:06 +0100 Message-Id: <20201007180024.7932-5-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson No functional change. Signed-off-by: Ian Jackson --- sg-run-job | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sg-run-job b/sg-run-job index df3d08d0..3db05b34 100755 --- a/sg-run-job +++ b/sg-run-job @@ -30,12 +30,12 @@ proc per-host-prep {} { per-host-ts . xen-boot/@ ts-host-reboot per-host-ts . host-ping-check-xen/@ ts-host-ping-check - per-host-ts . =(*) {ts-leak-check basis} + per-host-ts . =(*) { ts-leak-check basis } } proc per-host-finish {} { if {[nested-hosts-p]} { set broken fail } { set broken broken } - per-host-ts . = {ts-leak-check check} + per-host-ts . = { ts-leak-check check } per-host-ts !$broken capture-logs/@(*) ts-logs-capture } @@ -96,7 +96,7 @@ proc run-job {job} { if {![nested-hosts-p]} break - per-host-ts . final-poweroff {ts-host-powercycle --power=0} + per-host-ts . final-poweroff { ts-host-powercycle --power=0 } set need_xen_hosts [lunappend nested_layers_hosts] } @@ -549,7 +549,7 @@ proc setup-test-pair {} { run-ts . = ts-debian-install dst_host run-ts . = ts-debian-fixup dst_host + debian run-ts . = ts-guests-nbd-mirror + dst_host src_host + debian - per-host-ts . =(*) {ts-leak-check basis} + per-host-ts . =(*) { ts-leak-check basis } run-ts . = ts-guest-start + src_host + debian } proc need-hosts/test-pair {} { return {src_host dst_host} } From patchwork Wed Oct 7 17:59:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821395 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C1B36CA for ; Wed, 7 Oct 2020 18:02:06 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60CE421707 for ; Wed, 7 Oct 2020 18:02:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60CE421707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3611.10379 (Exim 4.92) (envelope-from ) id 1kQDkI-00048B-PV; Wed, 07 Oct 2020 18:00:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3611.10379; Wed, 07 Oct 2020 18:00:58 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkI-000482-M8; Wed, 07 Oct 2020 18:00:58 +0000 Received: by outflank-mailman (input) for mailman id 3611; Wed, 07 Oct 2020 18:00:57 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkH-0003r9-RC for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:00:57 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 249f8180-3406-4e17-ad6d-668881da1b44; Wed, 07 Oct 2020 18:00:34 +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 1kQDjt-0007CF-5n; Wed, 07 Oct 2020 19:00:33 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkH-0003r9-RC for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:00:57 +0000 X-Inumbo-ID: 249f8180-3406-4e17-ad6d-668881da1b44 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 249f8180-3406-4e17-ad6d-668881da1b44; Wed, 07 Oct 2020 18:00:34 +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 1kQDjt-0007CF-5n; Wed, 07 Oct 2020 19:00:33 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 05/82] sg-run-job: Improve some internal API docs Date: Wed, 7 Oct 2020 18:59:07 +0100 Message-Id: <20201007180024.7932-6-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 Signed-off-by: Ian Jackson --- sg-run-job | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sg-run-job b/sg-run-job index 3db05b34..702ed558 100755 --- a/sg-run-job +++ b/sg-run-job @@ -206,12 +206,12 @@ proc recipe-flag {flagname {def 0}} { # general steps from running) # The job status is set to IFFAIL. # -# per-host-ts IFFAIL TESTID SCRIPT-ARGS... +# per-host-ts IFFAIL TESTID SCRIPT-ARGS-LIST MORE-ARGS... # # Runs the script (as a separate step) for each test host ident. -# The host ident is appended to SCRIPT-ARGS. (SCRIPT-ARGS -# should contain an even number of + items for proper testid -# generation.) +# The host ident is appended to SCRIPT-ARGS-LIST. +# (SCRIPT-ARGS-LIST should contain an even number of + items for +# proper testid generation.) # # The scripts are run in parallel for all host idents. # From patchwork Wed Oct 7 17:59:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821391 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CFD2F6CA for ; Wed, 7 Oct 2020 18:01:54 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1C1B2176B for ; Wed, 7 Oct 2020 18:01:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1C1B2176B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3612.10391 (Exim 4.92) (envelope-from ) id 1kQDkO-0004DU-6e; Wed, 07 Oct 2020 18:01:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3612.10391; Wed, 07 Oct 2020 18:01:04 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkO-0004DJ-2B; Wed, 07 Oct 2020 18:01:04 +0000 Received: by outflank-mailman (input) for mailman id 3612; Wed, 07 Oct 2020 18:01:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkM-0003r9-RQ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:01:02 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9ad78458-fc8c-4a5b-8731-ca75cb13c2bb; Wed, 07 Oct 2020 18:00:34 +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 1kQDjt-0007CF-Jn; Wed, 07 Oct 2020 19:00:33 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkM-0003r9-RQ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:01:02 +0000 X-Inumbo-ID: 9ad78458-fc8c-4a5b-8731-ca75cb13c2bb Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9ad78458-fc8c-4a5b-8731-ca75cb13c2bb; Wed, 07 Oct 2020 18:00:34 +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 1kQDjt-0007CF-Jn; Wed, 07 Oct 2020 19:00:33 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 06/82] show_abs_time: Represent undef $timet as Date: Wed, 7 Oct 2020 18:59:08 +0100 Message-Id: <20201007180024.7932-7-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This can happen, for example, if a badly broken flight has steps which are STARTING and have NULL in the start time column, and is then reported using sg-report-flight. Signed-off-by: Ian Jackson --- Osstest.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Osstest.pm b/Osstest.pm index b2b6b741..734c0ef6 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -457,6 +457,7 @@ sub visible_undef ($) { sub show_abs_time ($) { my ($timet) = @_; + return '' unless defined $timet; return strftime "%Y-%m-%d %H:%M:%S Z", gmtime $timet; } From patchwork Wed Oct 7 17:59:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821397 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8DE4C6CA for ; Wed, 7 Oct 2020 18:02:31 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 61F1D2168B for ; Wed, 7 Oct 2020 18:02:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61F1D2168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3613.10403 (Exim 4.92) (envelope-from ) id 1kQDkS-0004Iz-Im; Wed, 07 Oct 2020 18:01:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3613.10403; Wed, 07 Oct 2020 18:01:08 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkS-0004In-Eg; Wed, 07 Oct 2020 18:01:08 +0000 Received: by outflank-mailman (input) for mailman id 3613; Wed, 07 Oct 2020 18:01:07 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkR-0003r9-Rn for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:01:07 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0d866887-24c2-4b19-bf92-b182b500f471; Wed, 07 Oct 2020 18:00:34 +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 1kQDjt-0007CF-SJ; Wed, 07 Oct 2020 19:00:33 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkR-0003r9-Rn for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:01:07 +0000 X-Inumbo-ID: 0d866887-24c2-4b19-bf92-b182b500f471 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0d866887-24c2-4b19-bf92-b182b500f471; Wed, 07 Oct 2020 18:00:34 +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 1kQDjt-0007CF-SJ; Wed, 07 Oct 2020 19:00:33 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 07/82] ts-hosts-allocate-Executive: Add a comment about a warning Date: Wed, 7 Oct 2020 18:59:09 +0100 Message-Id: <20201007180024.7932-8-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 58d2a389..78b94c6d 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -1039,6 +1039,10 @@ sub actual_allocation ($) { if ($shared->{ntasks}) { warn "resource $shrestype $shared->{resname} allegedly". " available but wrong state $shared->{state} and tasks"; + # This can happen if following a failed prep by + # another job, the other shares are still owned by the + # now-dead task. If so that share will become allocatable + # (and therefore not be counted in `ntasks') in due course. return undef; # someone was preparing it but they aren't any more From patchwork Wed Oct 7 17:59:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821385 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6FCBF1752 for ; Wed, 7 Oct 2020 18:01:33 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 427CF2168B for ; Wed, 7 Oct 2020 18:01:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 427CF2168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3614.10415 (Exim 4.92) (envelope-from ) id 1kQDkX-0004P7-Vd; Wed, 07 Oct 2020 18:01:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3614.10415; Wed, 07 Oct 2020 18:01:13 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkX-0004Ox-RK; Wed, 07 Oct 2020 18:01:13 +0000 Received: by outflank-mailman (input) for mailman id 3614; Wed, 07 Oct 2020 18:01:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkW-0003r9-Rc for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:01:12 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 583345bd-7fd4-4cfd-9b83-fc8afdf57668; Wed, 07 Oct 2020 18:00:35 +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 1kQDju-0007CF-84; Wed, 07 Oct 2020 19:00:34 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkW-0003r9-Rc for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:01:12 +0000 X-Inumbo-ID: 583345bd-7fd4-4cfd-9b83-fc8afdf57668 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 583345bd-7fd4-4cfd-9b83-fc8afdf57668; Wed, 07 Oct 2020 18:00:35 +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 1kQDju-0007CF-84; Wed, 07 Oct 2020 19:00:34 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 08/82] host reuse: ms-planner: Bring some variables forward Date: Wed, 7 Oct 2020 18:59:10 +0100 Message-Id: <20201007180024.7932-9-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Move the scope of $share earlier in cmd_show_html, and also introduce $shared in the colour computation. This makes the next changes easier. No functional change. Signed-off-by: Ian Jackson --- ms-planner | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ms-planner b/ms-planner index 11423404..d9f3db91 100755 --- a/ms-planner +++ b/ms-planner @@ -677,6 +677,7 @@ sub cmd_show_html () { my $shares; foreach my $evt (@{ $plan->{Events}{$reso} }) { my $type= $evt->{Type}; + my $share= $evt->{Share}; my $show= $type eq End ? ($evt->{Share} ? "End $evt->{Info}" : "") : $type eq Unshare ? "$type [".showsharetype($evt->{Info})."]" : @@ -685,7 +686,6 @@ sub cmd_show_html () { (!$evt->{Allocated} ? Booking : ($evt->{Allocated}{Live} ? Allocation : Completed). " $evt->{Allocated}{Task}")." ".$evt->{Info}; - my $share= $evt->{Share}; if ($share) { $show .= sprintf(" [%s %d/%d %d]", showsharetype($share->{Type}), @@ -789,15 +789,16 @@ sub cmd_show_html () { $content->{Avail} || $content->{Type} eq After || ($content->{Allocated} && !$content->{Allocated}{Live}); + my $shared = $content->{Share}; my $bgcolour= $avail ? - ($content->{Share} ? "#ccccff" : "#ffffff") : + ($shared ? "#ccccff" : "#ffffff") : $content->{Type} eq Overrun ? - ($content->{Share} ? "#443344" : "#442222") : + ($shared ? "#443344" : "#442222") : $content->{Allocated} ? - ($content->{Share} ? "#882288" : "#882222") + ($shared ? "#882288" : "#882222") : - ($content->{Share} ? "#005555" : "#448844"); + ($shared ? "#005555" : "#448844"); my $fgcolour= $avail ? "#000000" : "#ffffff"; printf " X-Patchwork-Id: 11821389 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 27E741752 for ; Wed, 7 Oct 2020 18:01:53 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EB5322076C for ; Wed, 7 Oct 2020 18:01:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB5322076C Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3615.10427 (Exim 4.92) (envelope-from ) id 1kQDkd-0004VQ-9j; Wed, 07 Oct 2020 18:01:19 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3615.10427; Wed, 07 Oct 2020 18:01:19 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkd-0004VG-5a; Wed, 07 Oct 2020 18:01:19 +0000 Received: by outflank-mailman (input) for mailman id 3615; Wed, 07 Oct 2020 18:01:17 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkb-0003r9-Rh for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:01:17 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 96361b6a-c30f-4d7b-a433-2f271bf7a56d; Wed, 07 Oct 2020 18:00:35 +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 1kQDju-0007CF-F2; Wed, 07 Oct 2020 19:00:34 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQDkb-0003r9-Rh for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:01:17 +0000 X-Inumbo-ID: 96361b6a-c30f-4d7b-a433-2f271bf7a56d Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 96361b6a-c30f-4d7b-a433-2f271bf7a56d; Wed, 07 Oct 2020 18:00:35 +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 1kQDju-0007CF-F2; Wed, 07 Oct 2020 19:00:34 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 09/82] host reuse: ms-planner: Do not show reuse as shared in the plan Date: Wed, 7 Oct 2020 18:59:11 +0100 Message-Id: <20201007180024.7932-10-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson If the number of shares is 1, do not show it as shared, and also ignore the Unshare events. This clarifies the display, especially when used with forthcoming test host reuse work. Signed-off-by: Ian Jackson --- ms-planner | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ms-planner b/ms-planner index d9f3db91..4e38e4e3 100755 --- a/ms-planner +++ b/ms-planner @@ -249,6 +249,7 @@ sub launder_check_plan () { Avail => 1, Info => $cshare->{Type}, PreviousShare => $cshare, + Shares => $cshare->{Shares}, }; $cshare= undef; } @@ -678,6 +679,7 @@ sub cmd_show_html () { foreach my $evt (@{ $plan->{Events}{$reso} }) { my $type= $evt->{Type}; my $share= $evt->{Share}; + next if $type eq 'Unshare' && $evt->{Shares} == 1; my $show= $type eq End ? ($evt->{Share} ? "End $evt->{Info}" : "") : $type eq Unshare ? "$type [".showsharetype($evt->{Info})."]" : @@ -686,7 +688,7 @@ sub cmd_show_html () { (!$evt->{Allocated} ? Booking : ($evt->{Allocated}{Live} ? Allocation : Completed). " $evt->{Allocated}{Task}")." ".$evt->{Info}; - if ($share) { + if ($share && $share->{Shares} != 1) { $show .= sprintf(" [%s %d/%d %d]", showsharetype($share->{Type}), $share->{Shares} - $evt->{Avail}, @@ -789,7 +791,8 @@ sub cmd_show_html () { $content->{Avail} || $content->{Type} eq After || ($content->{Allocated} && !$content->{Allocated}{Live}); - my $shared = $content->{Share}; + my $shared = $content->{Share} + && $content->{Share}{Shares} != 1; my $bgcolour= $avail ? ($shared ? "#ccccff" : "#ffffff") : From patchwork Wed Oct 7 17:59:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821497 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 46C4A17CF for ; Wed, 7 Oct 2020 18:28:03 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EC0321707 for ; Wed, 7 Oct 2020 18:28:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EC0321707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3698.10943 (Exim 4.92) (envelope-from ) id 1kQE9z-0002lX-9T; Wed, 07 Oct 2020 18:27:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3698.10943; Wed, 07 Oct 2020 18:27:31 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9y-0002jx-Dw; Wed, 07 Oct 2020 18:27:30 +0000 Received: by outflank-mailman (input) for mailman id 3698; Wed, 07 Oct 2020 18:27:26 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4X-00072Q-Lk for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:53 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 77d213f6-ed2e-46b6-b768-ae539b012360; Wed, 07 Oct 2020 18:20:22 +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 1kQDju-0007CF-L3; Wed, 07 Oct 2020 19:00:34 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4X-00072Q-Lk for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:53 +0000 X-Inumbo-ID: 77d213f6-ed2e-46b6-b768-ae539b012360 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 77d213f6-ed2e-46b6-b768-ae539b012360; Wed, 07 Oct 2020 18:20:22 +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 1kQDju-0007CF-L3; Wed, 07 Oct 2020 19:00:34 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 10/82] hsot reuse: ms-planner: Abbreviate reporting of test shares Date: Wed, 7 Oct 2020 18:59:12 +0100 Message-Id: <20201007180024.7932-11-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- ms-planner | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ms-planner b/ms-planner index 4e38e4e3..78d27b2f 100755 --- a/ms-planner +++ b/ms-planner @@ -414,11 +414,13 @@ END next if $plan->{Events}{$reskey}; print DEBUG "document existing quiescent sharing $reskey". " share.Type $cshare->{Type}\n"; + my $type = $cshare->{Type}; + $type = "$&..." if $type =~ m{^test-\d+(?=\-)}; my $evt = { Time => $plan->{Start}, Type => Unshare, Avail => 1, - Info => "recently shared $cshare->{Type}", + Info => "recently $type", PreviousShare => { %$cshare }, }; delete $evt->{PreviousShare}{OnlyPreparing}; From patchwork Wed Oct 7 17:59:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821501 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94EE414D5 for ; Wed, 7 Oct 2020 18:28:06 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 690002168B for ; Wed, 7 Oct 2020 18:28:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 690002168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3675.10675 (Exim 4.92) (envelope-from ) id 1kQE9J-0000sM-AJ; Wed, 07 Oct 2020 18:26:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3675.10675; Wed, 07 Oct 2020 18:26:49 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9J-0000sE-63; Wed, 07 Oct 2020 18:26:49 +0000 Received: by outflank-mailman (input) for mailman id 3675; Wed, 07 Oct 2020 18:26:48 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE69-00072Q-QI for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:33 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 305c7497-7824-4566-bea9-54b5df9ad956; Wed, 07 Oct 2020 18:21:31 +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 1kQDju-0007CF-Sy; Wed, 07 Oct 2020 19:00:35 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE69-00072Q-QI for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:33 +0000 X-Inumbo-ID: 305c7497-7824-4566-bea9-54b5df9ad956 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 305c7497-7824-4566-bea9-54b5df9ad956; Wed, 07 Oct 2020 18:21:31 +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 1kQDju-0007CF-Sy; Wed, 07 Oct 2020 19:00:35 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 11/82] cr-publish-flight-logs: Fix abs_time calls Date: Wed, 7 Oct 2020 18:59:13 +0100 Message-Id: <20201007180024.7932-12-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson There was a missing space in these messages, since they were introduced in 31b7cae19fe1 timing traces: cr-publish-flight-logs: Report more progress Signed-off-by: Ian Jackson --- cr-publish-flight-logs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cr-publish-flight-logs b/cr-publish-flight-logs index 63c47d9f..c570dfaf 100755 --- a/cr-publish-flight-logs +++ b/cr-publish-flight-logs @@ -43,7 +43,7 @@ die unless $flight =~ m/^\d*$/; die "usage: ./cr-publish-flight-logs [flight]" unless @ARGV==0; -sub progress { print +(show_abs_time time), @_, "\n" } +sub progress { print +(show_abs_time time), " ", @_, "\n" } progress("acquiring publish-lock..."); open LOCK, "> $c{GlobalLockDir}/publish-lock" or die $!; From patchwork Wed Oct 7 17:59:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821437 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 34B6A14D5 for ; Wed, 7 Oct 2020 18:19:34 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D44B2173E for ; Wed, 7 Oct 2020 18:19:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D44B2173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3643.10531 (Exim 4.92) (envelope-from ) id 1kQE1e-00072r-9D; Wed, 07 Oct 2020 18:18:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3643.10531; Wed, 07 Oct 2020 18:18:54 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1e-00072j-5x; Wed, 07 Oct 2020 18:18:54 +0000 Received: by outflank-mailman (input) for mailman id 3643; Wed, 07 Oct 2020 18:18:53 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1d-00072Q-H9 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:53 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e5e6afeb-4aa4-4a7f-aec1-f0ad7aa00adc; Wed, 07 Oct 2020 18:18:52 +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 1kQDjv-0007CF-6U; Wed, 07 Oct 2020 19:00:35 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1d-00072Q-H9 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:53 +0000 X-Inumbo-ID: e5e6afeb-4aa4-4a7f-aec1-f0ad7aa00adc Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e5e6afeb-4aa4-4a7f-aec1-f0ad7aa00adc; Wed, 07 Oct 2020 18:18:52 +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 1kQDjv-0007CF-6U; Wed, 07 Oct 2020 19:00:35 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 12/82] target setup refactoring: Move target_kernkind_check Date: Wed, 7 Oct 2020 18:59:14 +0100 Message-Id: <20201007180024.7932-13-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This is OK because nothing in access() looks at the rootdev or console runvars, which are what target_kernkind_check sets. No functional change other than perhaps to log output. Signed-off-by: Ian Jackson --- ts-debian-fixup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-debian-fixup b/ts-debian-fixup index 528fb03b..34051137 100755 --- a/ts-debian-fixup +++ b/ts-debian-fixup @@ -209,8 +209,8 @@ sub writecfg () { savecfg(); ether(); -target_kernkind_check($gho); access(); +target_kernkind_check($gho); debian_overlays($ho, \&overlay); target_cmd_root($ho, < X-Patchwork-Id: 11821459 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 216F114D5 for ; Wed, 7 Oct 2020 18:20:38 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EB21E2173E for ; Wed, 7 Oct 2020 18:20:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB21E2173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3654.10639 (Exim 4.92) (envelope-from ) id 1kQE2N-0007rg-Li; Wed, 07 Oct 2020 18:19:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3654.10639; Wed, 07 Oct 2020 18:19:39 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2N-0007rT-Gn; Wed, 07 Oct 2020 18:19:39 +0000 Received: by outflank-mailman (input) for mailman id 3654; Wed, 07 Oct 2020 18:19:38 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2M-00072Q-HJ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:38 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8ab6bdfe-1e35-4786-853d-05b06a8fc6dc; Wed, 07 Oct 2020 18:19:15 +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 1kQDjv-0007CF-E1; Wed, 07 Oct 2020 19:00:35 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2M-00072Q-HJ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:38 +0000 X-Inumbo-ID: 8ab6bdfe-1e35-4786-853d-05b06a8fc6dc Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8ab6bdfe-1e35-4786-853d-05b06a8fc6dc; Wed, 07 Oct 2020 18:19:15 +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 1kQDjv-0007CF-E1; Wed, 07 Oct 2020 19:00:35 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 13/82] target setup refactoring: Move target_kernkind_console_inittab Date: Wed, 7 Oct 2020 18:59:15 +0100 Message-Id: <20201007180024.7932-14-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson We move this earlier. This is OK because it depends only on the console runvar (inside the sub; this is set by target_kernkind_check), $ho and $gho (which are set by this point); and $mountpoint$ (which is set by access(). No functional change. Signed-off-by: Ian Jackson --- ts-debian-fixup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts-debian-fixup b/ts-debian-fixup index 34051137..2184212b 100755 --- a/ts-debian-fixup +++ b/ts-debian-fixup @@ -79,10 +79,9 @@ END } our $extra; +our $console; sub console () { - my $console= - target_kernkind_console_inittab($ho,$gho,"$mountpoint"); return unless length $console; my $xextra= "console=$console earlyprintk=xen"; @@ -211,6 +210,7 @@ savecfg(); ether(); access(); target_kernkind_check($gho); +$console = target_kernkind_console_inittab($ho,$gho,"$mountpoint"); debian_overlays($ho, \&overlay); target_cmd_root($ho, < X-Patchwork-Id: 11821425 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BE6F14D5 for ; Wed, 7 Oct 2020 18:18:38 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53AF02176B for ; Wed, 7 Oct 2020 18:18:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53AF02176B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3639.10495 (Exim 4.92) (envelope-from ) id 1kQE13-0006dD-Bh; Wed, 07 Oct 2020 18:18:17 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3639.10495; Wed, 07 Oct 2020 18:18:17 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE13-0006d5-7Q; Wed, 07 Oct 2020 18:18:17 +0000 Received: by outflank-mailman (input) for mailman id 3639; Wed, 07 Oct 2020 18:18:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE11-0006UA-Rv for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:15 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 05ce08a0-9e4a-472a-ab00-cff487857eab; Wed, 07 Oct 2020 18:18:12 +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 1kQDjv-0007CF-MO; Wed, 07 Oct 2020 19:00:35 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE11-0006UA-Rv for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:15 +0000 X-Inumbo-ID: 05ce08a0-9e4a-472a-ab00-cff487857eab Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 05ce08a0-9e4a-472a-ab00-cff487857eab; Wed, 07 Oct 2020 18:18:12 +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 1kQDjv-0007CF-MO; Wed, 07 Oct 2020 19:00:35 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 14/82] target setup refactoring: Merge target_kernkind_* Date: Wed, 7 Oct 2020 18:59:16 +0100 Message-Id: <20201007180024.7932-15-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Combine these two functions. Rename them to a name which doesn't mention "kernkind". No functional change. Signed-off-by: Ian Jackson --- Osstest/Debian.pm | 3 +-- Osstest/TestSupport.pm | 11 ++++------- ts-debian-fixup | 3 +-- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index b140ede2..85fd16da 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -68,8 +68,7 @@ sub debian_boot_setup ($$$$$;$) { # $xenhopt==undef => is actually a guest, do not set up a hypervisor my ($ho, $want_kernver, $want_xsm, $xenhopt, $distpath, $hooks) = @_; - target_kernkind_check($ho); - target_kernkind_console_inittab($ho,$ho,"/"); + target_setup_rootdev_console_inittab($ho,$ho,"/"); my $kopt; my $console= target_var($ho,'console'); diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index faac106f..fd7b238b 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -105,7 +105,7 @@ BEGIN { host_get_free_memory target_ping_check_down target_ping_check_up - target_kernkind_check target_kernkind_console_inittab + target_setup_rootdev_console_inittab target_var target_var_prefix selectguest prepareguest more_prepareguest_hvm guest_template @@ -2562,8 +2562,9 @@ sub target_var ($$) { return undef; } -sub target_kernkind_check ($) { - my ($gho) = @_; +sub target_setup_rootdev_console_inittab ($$$) { + my ($ho, $gho, $root) = @_; + my $pfx= target_var_prefix($gho); my $kernkind= $r{$pfx."kernkind"} // 'pvops'; my $isguest= exists $gho->{Guest}; @@ -2573,10 +2574,6 @@ sub target_kernkind_check ($) { } elsif ($kernkind !~ m/2618/) { store_runvar($pfx."console", 'xvc0') if $isguest; } -} - -sub target_kernkind_console_inittab ($$$) { - my ($ho, $gho, $root) = @_; my $inittabpath= "$root/etc/inittab"; my $console= target_var($gho,'console'); diff --git a/ts-debian-fixup b/ts-debian-fixup index 2184212b..a878fe50 100755 --- a/ts-debian-fixup +++ b/ts-debian-fixup @@ -209,8 +209,7 @@ sub writecfg () { savecfg(); ether(); access(); -target_kernkind_check($gho); -$console = target_kernkind_console_inittab($ho,$gho,"$mountpoint"); +$console = target_setup_rootdev_console_inittab($ho,$gho,"$mountpoint"); debian_overlays($ho, \&overlay); target_cmd_root($ho, < X-Patchwork-Id: 11821571 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2990514D5 for ; Wed, 7 Oct 2020 18:29:25 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 017D62173E for ; Wed, 7 Oct 2020 18:29:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 017D62173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3742.11227 (Exim 4.92) (envelope-from ) id 1kQEAx-0005Zg-AS; Wed, 07 Oct 2020 18:28:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3742.11227; Wed, 07 Oct 2020 18:28:31 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAw-0005ZJ-U6; Wed, 07 Oct 2020 18:28:30 +0000 Received: by outflank-mailman (input) for mailman id 3742; Wed, 07 Oct 2020 18:28:29 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4N-00072Q-LN for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:43 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ac7250ff-2574-481e-98fa-ef231cd33e98; Wed, 07 Oct 2020 18:20:17 +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 1kQDjv-0007CF-SV; Wed, 07 Oct 2020 19:00:35 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4N-00072Q-LN for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:43 +0000 X-Inumbo-ID: ac7250ff-2574-481e-98fa-ef231cd33e98 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ac7250ff-2574-481e-98fa-ef231cd33e98; Wed, 07 Oct 2020 18:20:17 +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 1kQDjv-0007CF-SV; Wed, 07 Oct 2020 19:00:35 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 15/82] target setup refactoring: Add a doc comment Date: Wed, 7 Oct 2020 18:59:17 +0100 Message-Id: <20201007180024.7932-16-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index fd7b238b..d9bb2585 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -2563,6 +2563,9 @@ sub target_var ($$) { } sub target_setup_rootdev_console_inittab ($$$) { + # Operators on $gho. + # $gho's filesystem is accessed via $ho and $mountpoint; + # so maybe $gho is $ho and $mountpoint is "/". my ($ho, $gho, $root) = @_; my $pfx= target_var_prefix($gho); From patchwork Wed Oct 7 17:59:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821539 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3CFE517CF for ; Wed, 7 Oct 2020 18:28:42 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 178782168B for ; Wed, 7 Oct 2020 18:28:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 178782168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3723.11161 (Exim 4.92) (envelope-from ) id 1kQEAk-0004wv-EJ; Wed, 07 Oct 2020 18:28:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3723.11161; Wed, 07 Oct 2020 18:28:17 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAi-0004vb-HN; Wed, 07 Oct 2020 18:28:16 +0000 Received: by outflank-mailman (input) for mailman id 3723; Wed, 07 Oct 2020 18:28:13 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE51-00072Q-NB for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:23 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 646be300-5e0c-4374-a999-7afb671732f2; Wed, 07 Oct 2020 18:20:41 +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 1kQDjx-0007CF-67; Wed, 07 Oct 2020 19:00:37 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE51-00072Q-NB for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:23 +0000 X-Inumbo-ID: 646be300-5e0c-4374-a999-7afb671732f2 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 646be300-5e0c-4374-a999-7afb671732f2; Wed, 07 Oct 2020 18:20:41 +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 1kQDjx-0007CF-67; Wed, 07 Oct 2020 19:00:37 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Wei Liu , Paul Durrant , Oleksandr Andrushchenko , Andrew Cooper , Olivier Lambert Subject: [OSSTEST PATCH 16/82] abolish "kernkind"; desupport non-pvops kernels Date: Wed, 7 Oct 2020 18:59:18 +0100 Message-Id: <20201007180024.7932-17-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This was for distinguishing the old-style Xenolinux kernels from pvops kernels. We have not actually tested any non-pvops kernels for a very very long time. Delete this now because the runvar is slightly in the way of test host reuse. (Sorry for the wide CC but it seems better to make sure anyone who might object can do so.) All this machinery exists just to configure the guest console device (Xenolinux used "xvc" rather than "hvc") and the guest root block device (Xenolinux stole "hda"/"sda" rather than using "xvda"). Specifically, in this commit: * In what is now target_setup_rootdev_console_inittab, do not look at any kernkind runvar and simply do what we would if it were "pvops" or unset, as it is in all current jobs. * Remove the runvar from all jobs creation and example runes. (This has no functional change even for jobs running with the previous osstest code because we have defaulted to "pvops" for a very long time.) We retain the setting of the shell variable "kernbuild", because that ends up in build jobs' names. All our kernel build jobs now end in -pvops and I intend to retain that name component since abolishing it is nontrivial. Signed-off-by: Ian Jackson CC: Boris Ostrovsky CC: Juergen Gross CC: Stefano Stabellini CC: Konrad Rzeszutek Wilk CC: Roger Pau Monné CC: Wei Liu CC: Paul Durrant CC: Konrad Rzeszutek Wilk CC: Juergen Gross CC: Oleksandr Andrushchenko CC: Andrew Cooper CC: Olivier Lambert --- Osstest/TestSupport.pm | 9 ++------- README | 2 +- make-hosts-flight | 1 - mfi-common | 7 ++----- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index d9bb2585..99c7654d 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -2569,14 +2569,9 @@ sub target_setup_rootdev_console_inittab ($$$) { my ($ho, $gho, $root) = @_; my $pfx= target_var_prefix($gho); - my $kernkind= $r{$pfx."kernkind"} // 'pvops'; my $isguest= exists $gho->{Guest}; - if ($kernkind eq 'pvops') { - store_runvar($pfx."rootdev", 'xvda') if $isguest; - store_runvar($pfx."console", 'hvc0'); - } elsif ($kernkind !~ m/2618/) { - store_runvar($pfx."console", 'xvc0') if $isguest; - } + store_runvar($pfx."rootdev", 'xvda') if $isguest; + store_runvar($pfx."console", 'hvc0'); my $inittabpath= "$root/etc/inittab"; my $console= target_var($gho,'console'); diff --git a/README b/README index 2804ecf3..ba4bea1d 100644 --- a/README +++ b/README @@ -861,7 +861,7 @@ echo $flight job=play-amd64-amd64-xen-boot ./cs-job-create $flight $job play-xen-boot-x5 \ all_hostflags=arch-amd64,arch-xen-amd64,suite-wheezy,purpose-test \ - arch=amd64 toolstack=xl enable_xsm=false kernkind=pvops \ + arch=amd64 toolstack=xl enable_xsm=false \ host=$host # Reuse the binaries from the Xen template job for both the hypervisor diff --git a/make-hosts-flight b/make-hosts-flight index e2c3776a..63ac7b71 100755 --- a/make-hosts-flight +++ b/make-hosts-flight @@ -73,7 +73,6 @@ hosts_iterate () { local freebsd_runvars set_freebsd_runvars true runvars+=" - kernkind=pvops all_host_di_version=$di_version all_host_suite=$suite $freebsd_runvars diff --git a/mfi-common b/mfi-common index e577449f..34b0c116 100644 --- a/mfi-common +++ b/mfi-common @@ -619,9 +619,8 @@ test_matrix_iterate () { case $kern in '') kernbuild=pvops - kernkind=pvops ;; - *) echo >&2 "kernkind ? $kern"; exit 1 ;; + *) echo >&2 "kernbuild ? $kern"; exit 1 ;; esac for dom0arch in i386 amd64 armhf arm64; do @@ -639,8 +638,7 @@ test_matrix_iterate () { arch_runvars=\"\$ARCH_RUNVARS_$dom0arch\" " - debian_runvars="debian_kernkind=$kernkind \ - debian_arch=$dom0arch \ + debian_runvars="debian_arch=$dom0arch \ debian_suite=$guestsuite \ " @@ -659,7 +657,6 @@ test_matrix_iterate () { most_runvars=" arch=$dom0arch \ kernbuildjob=${bfi}build-$dom0arch-$kernbuild \ - kernkind=$kernkind \ $arch_runvars $hostos_runvars " From patchwork Wed Oct 7 17:59:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821499 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6919417CF for ; Wed, 7 Oct 2020 18:28:04 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E8062173E for ; Wed, 7 Oct 2020 18:28:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E8062173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3680.10727 (Exim 4.92) (envelope-from ) id 1kQE9N-00013R-Ma; Wed, 07 Oct 2020 18:26:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3680.10727; Wed, 07 Oct 2020 18:26:53 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9N-00012c-6T; Wed, 07 Oct 2020 18:26:53 +0000 Received: by outflank-mailman (input) for mailman id 3680; Wed, 07 Oct 2020 18:26:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3F-00072Q-JI for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:33 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a795a7b0-ab03-49c3-846d-640a676d8665; Wed, 07 Oct 2020 18:19:42 +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 1kQDjx-0007CF-CF; Wed, 07 Oct 2020 19:00:37 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3F-00072Q-JI for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:33 +0000 X-Inumbo-ID: a795a7b0-ab03-49c3-846d-640a676d8665 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a795a7b0-ab03-49c3-846d-640a676d8665; Wed, 07 Oct 2020 18:19:42 +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 1kQDjx-0007CF-CF; Wed, 07 Oct 2020 19:00:37 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 17/82] Debian: osstest-erase-other-disks: Slightly guard against races Date: Wed, 7 Oct 2020 18:59:19 +0100 Message-Id: <20201007180024.7932-18-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Apparently it can happen that something decides to rescan a partition table, removing a partition block device, while it is being zeroed: osstest-erase-other-disks-6081: hd devices present after: /dev/hd* osstest-erase-other-disks-6081: Erasing /dev/sda osstest-erase-other-disks-6081: Erasing /dev/sda1 osstest-erase-other-disks-6081: /dev/sda1 is no longer a block device! To try to narrow the window during which this race occurs, do not care if the thing we just zeroed no longer exists after we zeroed it. We still bomb out if it exists but is not a block device - that would probably mean we had written it out as a file. This is all quite unfortunate. Signed-off-by: Ian Jackson --- Osstest/Debian.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 85fd16da..3fa26e45 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -1211,8 +1211,8 @@ zero () { if test -b \$dev; then log "Erasing \$dev" dd if=/dev/zero of=\$dev count=64 ||: - if ! test -b \$dev; then - log "\$dev is no longer a block device!" + if test -e \$dev && ! test -b \$dev; then + log "\$dev still exists but is no longer a block device!" exit 1 fi else From patchwork Wed Oct 7 17:59:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821503 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C17717D2 for ; Wed, 7 Oct 2020 18:28:07 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D15C821775 for ; Wed, 7 Oct 2020 18:28:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D15C821775 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3689.10834 (Exim 4.92) (envelope-from ) id 1kQE9e-0001oJ-Hb; Wed, 07 Oct 2020 18:27:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3689.10834; Wed, 07 Oct 2020 18:27:10 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9d-0001n3-Kz; Wed, 07 Oct 2020 18:27:09 +0000 Received: by outflank-mailman (input) for mailman id 3689; Wed, 07 Oct 2020 18:27:03 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6E-00072Q-QR for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:38 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f2b79de9-1655-40fe-9954-e6f3aa7c5974; Wed, 07 Oct 2020 18:21:33 +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 1kQDjx-0007CF-P2; Wed, 07 Oct 2020 19:00:37 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6E-00072Q-QR for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:38 +0000 X-Inumbo-ID: f2b79de9-1655-40fe-9954-e6f3aa7c5974 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f2b79de9-1655-40fe-9954-e6f3aa7c5974; Wed, 07 Oct 2020 18:21:33 +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 1kQDjx-0007CF-P2; Wed, 07 Oct 2020 19:00:37 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 18/82] host allocation: Remove some unnecessary definedness tests Date: Wed, 7 Oct 2020 18:59:20 +0100 Message-Id: <20201007180024.7932-19-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson $set_info->() already checkes for undef, and returns immediately in that case. So there is no point checking at the call site. No functional change. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index f17e7b70..5d71d08c 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -849,15 +849,8 @@ sub alloc_resources { $set_info->('sub-priority',$ENV{OSSTEST_RESOURCE_SUBPRIORITY}); $set_info->('preinfo', $ENV{OSSTEST_RESOURCE_PREINFO}); $set_info->('feature-noalloc', 1); - - if (defined $waitstart) { - $set_info->('wait-start',$waitstart); - } - - my $adjust= $xparams{WaitStartAdjust}; - if (defined $adjust) { - $set_info->('wait-start-adjust',$adjust); - } + $set_info->('wait-start',$waitstart); + $set_info->('wait-start-adjust',$xparams{WaitStartAdjust}); my $jobinfo= $xparams{JobInfo}; if (!defined $jobinfo and defined $flight and defined $job) { From patchwork Wed Oct 7 17:59:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821563 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E2FEE14D5 for ; Wed, 7 Oct 2020 18:29:14 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7ED92168B for ; Wed, 7 Oct 2020 18:29:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7ED92168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3758.11281 (Exim 4.92) (envelope-from ) id 1kQEBA-0006DB-Su; Wed, 07 Oct 2020 18:28:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3758.11281; Wed, 07 Oct 2020 18:28:44 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEBA-0006Bu-87; Wed, 07 Oct 2020 18:28:44 +0000 Received: by outflank-mailman (input) for mailman id 3758; Wed, 07 Oct 2020 18:28:41 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5L-00072Q-Ox for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:43 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e436e85f-c801-4ac8-b2ae-868aa69cebab; Wed, 07 Oct 2020 18:21:08 +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 1kQDjy-0007CF-0G; Wed, 07 Oct 2020 19:00:38 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5L-00072Q-Ox for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:43 +0000 X-Inumbo-ID: e436e85f-c801-4ac8-b2ae-868aa69cebab Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e436e85f-c801-4ac8-b2ae-868aa69cebab; Wed, 07 Oct 2020 18:21:08 +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 1kQDjy-0007CF-0G; Wed, 07 Oct 2020 19:00:38 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 19/82] host allocation: Executive: Honour $xparams{InfraPriority} Date: Wed, 7 Oct 2020 18:59:21 +0100 Message-Id: <20201007180024.7932-20-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson And pass it to ms-queuedaemon. No functional change with existing callers since no-one sets this yet. Forthcoming test host sharing machinery uses this. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 5d71d08c..703f3d85 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -851,6 +851,7 @@ sub alloc_resources { $set_info->('feature-noalloc', 1); $set_info->('wait-start',$waitstart); $set_info->('wait-start-adjust',$xparams{WaitStartAdjust}); + $set_info->('infra-priority',$xparams{InfraPriority}); my $jobinfo= $xparams{JobInfo}; if (!defined $jobinfo and defined $flight and defined $job) { From patchwork Wed Oct 7 17:59:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821485 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 341D917CF for ; Wed, 7 Oct 2020 18:27:54 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0C79721707 for ; Wed, 7 Oct 2020 18:27:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C79721707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3694.10896 (Exim 4.92) (envelope-from ) id 1kQE9r-0002PT-FK; Wed, 07 Oct 2020 18:27:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3694.10896; Wed, 07 Oct 2020 18:27:23 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9q-0002Od-V2; Wed, 07 Oct 2020 18:27:22 +0000 Received: by outflank-mailman (input) for mailman id 3694; Wed, 07 Oct 2020 18:27:19 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3t-00072Q-Jv for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:13 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ace94ed7-c910-40bb-bbf1-9495690a4b88; Wed, 07 Oct 2020 18:20:00 +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 1kQDjy-0007CF-8H; Wed, 07 Oct 2020 19:00:38 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3t-00072Q-Jv for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:13 +0000 X-Inumbo-ID: ace94ed7-c910-40bb-bbf1-9495690a4b88 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ace94ed7-c910-40bb-bbf1-9495690a4b88; Wed, 07 Oct 2020 18:20:00 +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 1kQDjy-0007CF-8H; Wed, 07 Oct 2020 19:00:38 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 20/82] ts-hosts-allocate-Executive: Fix handling of failed preps for same sharing Date: Wed, 7 Oct 2020 18:59:22 +0100 Message-Id: <20201007180024.7932-21-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This code was previously unreachable. It ought to be executed when all the shares are allocatable or prep: in that case, we can unshare and re-share the host. Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 78b94c6d..2c18a739 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -1044,12 +1044,11 @@ sub actual_allocation ($) { # now-dead task. If so that share will become allocatable # (and therefore not be counted in `ntasks') in due course. return undef; - - # someone was preparing it but they aren't any more - push @allocwarnings, - "previous preparation apparently abandoned"; - $allocatable= 1; - } + } + # someone was preparing it but they aren't any more + push @allocwarnings, + "previous preparation apparently abandoned"; + $allocatable= 1; } } From patchwork Wed Oct 7 17:59:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821471 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6FD4117CF for ; Wed, 7 Oct 2020 18:27:32 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 465A72168B for ; Wed, 7 Oct 2020 18:27:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 465A72168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3685.10786 (Exim 4.92) (envelope-from ) id 1kQE9X-0001TB-53; Wed, 07 Oct 2020 18:27:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3685.10786; Wed, 07 Oct 2020 18:27:02 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9W-0001Se-HT; Wed, 07 Oct 2020 18:27:02 +0000 Received: by outflank-mailman (input) for mailman id 3685; Wed, 07 Oct 2020 18:26:59 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6Y-00072Q-R6 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:58 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5464f8f2-40d0-4839-aaf7-929c5b0cc9f0; Wed, 07 Oct 2020 18:21:45 +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 1kQDjy-0007CF-Gd; Wed, 07 Oct 2020 19:00:38 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6Y-00072Q-R6 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:58 +0000 X-Inumbo-ID: 5464f8f2-40d0-4839-aaf7-929c5b0cc9f0 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5464f8f2-40d0-4839-aaf7-929c5b0cc9f0; Wed, 07 Oct 2020 18:21:45 +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 1kQDjy-0007CF-Gd; Wed, 07 Oct 2020 19:00:38 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 21/82] sg-run-job: support +! for *only* adding things to TESTID Date: Wed, 7 Oct 2020 18:59:23 +0100 Message-Id: <20201007180024.7932-22-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- sg-run-job | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sg-run-job b/sg-run-job index 702ed558..3ca725e7 100755 --- a/sg-run-job +++ b/sg-run-job @@ -277,6 +277,10 @@ proc recipe-flag {flagname {def 0}} { # subsequent items in SCRIPT-ARGS are added to the expansion of # /@ in TESTID. (The "+" itself is not added to the arguments # or the testid.) +# +# An argument which is precisely "+!" specifies that the +# subsequent items in SCRIPT-ARGS are to be _only_ added to +# the expansion of /@ in TESTID, until the next "+". proc run-ts {iffail args} { set wantstatus pass @@ -343,7 +347,11 @@ proc spawn-ts {iffail testid args} { set adding [expr {!$adding}] continue } - lappend real_args $arg + if {![string compare +! $arg]} { + set adding -1 + continue + } + if {$adding>=0} { lappend real_args $arg } if {$adding} { lappend testid_args $arg } } From patchwork Wed Oct 7 17:59:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821463 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1699717CF for ; Wed, 7 Oct 2020 18:27:09 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D40A02168B for ; Wed, 7 Oct 2020 18:27:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D40A02168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3676.10687 (Exim 4.92) (envelope-from ) id 1kQE9K-0000w3-KL; Wed, 07 Oct 2020 18:26:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3676.10687; Wed, 07 Oct 2020 18:26:50 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9K-0000vs-FS; Wed, 07 Oct 2020 18:26:50 +0000 Received: by outflank-mailman (input) for mailman id 3676; Wed, 07 Oct 2020 18:26:49 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2v-00072Q-I7 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:13 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id bd8824be-dd5e-4d5c-867b-b0c62c0c400f; Wed, 07 Oct 2020 18:19:33 +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 1kQDjy-0007CF-Ob; Wed, 07 Oct 2020 19:00:38 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2v-00072Q-I7 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:13 +0000 X-Inumbo-ID: bd8824be-dd5e-4d5c-867b-b0c62c0c400f Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id bd8824be-dd5e-4d5c-867b-b0c62c0c400f; Wed, 07 Oct 2020 18:19:33 +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 1kQDjy-0007CF-Ob; Wed, 07 Oct 2020 19:00:38 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 22/82] sg-run-job: Use +! in per-host-ts implementation Date: Wed, 7 Oct 2020 18:59:24 +0100 Message-Id: <20201007180024.7932-23-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This makes this slightly clearer, even more so in a moment. No functional change. Signed-off-by: Ian Jackson --- sg-run-job | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sg-run-job b/sg-run-job index 3ca725e7..3f44cae7 100755 --- a/sg-run-job +++ b/sg-run-job @@ -458,11 +458,10 @@ proc per-host-ts {iffail ident script args} { set awaitl {} foreach host $need_xen_hosts { set hostargs {} - if {![string compare $host host]} { - lappend hostargs + $host - } else { - lappend hostargs $host + - } + if {[string compare $host host]} { + lappend hostargs +! $host + } + lappend hostargs + $host lappend awaitl [eval spawn-ts $iffail $ident $script $hostargs $args] } From patchwork Wed Oct 7 17:59:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821573 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 571621752 for ; Wed, 7 Oct 2020 18:30:04 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A9142168B for ; Wed, 7 Oct 2020 18:30:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A9142168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3769.11311 (Exim 4.92) (envelope-from ) id 1kQEBL-0006eZ-2D; Wed, 07 Oct 2020 18:28:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3769.11311; Wed, 07 Oct 2020 18:28:54 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEBK-0006eK-RM; Wed, 07 Oct 2020 18:28:54 +0000 Received: by outflank-mailman (input) for mailman id 3769; Wed, 07 Oct 2020 18:28:53 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE48-00072Q-Ki for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:28 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id eb24c2a7-e8e3-4be2-80b3-d5f4e8342ecc; Wed, 07 Oct 2020 18:20:08 +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 1kQDjz-0007CF-2x; Wed, 07 Oct 2020 19:00:39 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE48-00072Q-Ki for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:28 +0000 X-Inumbo-ID: eb24c2a7-e8e3-4be2-80b3-d5f4e8342ecc Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id eb24c2a7-e8e3-4be2-80b3-d5f4e8342ecc; Wed, 07 Oct 2020 18:20:08 +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 1kQDjz-0007CF-2x; Wed, 07 Oct 2020 19:00:39 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 23/82] db_retry: Make the sleeps random and increasing Date: Wed, 7 Oct 2020 18:59:25 +0100 Message-Id: <20201007180024.7932-24-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson When there's a thundering herd, this can run out of retries. Signed-off-by: Ian Jackson --- Osstest.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Osstest.pm b/Osstest.pm index 734c0ef6..809194f0 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -311,7 +311,8 @@ sub db_retry ($$$;$$) { my ($pre,$body) = (ref $code eq 'ARRAY') ? @$code : (sub { }, $code); - my $retries= 100; + my $max_retries= 100; + my $retry_count= 0; my $r; local $db_retry_stop; for (;;) { @@ -339,10 +340,12 @@ sub db_retry ($$$;$$) { }; last if !length $@; die $@ unless $mjobdb->need_retry($dbh, $committing); - die "$dbh $body $@ ?" unless $retries-- > 0; + die "$dbh $body $@ GIVING UP ?" if ++$retry_count >= $max_retries; eval { $dbh->rollback(); }; - print STDERR "DB conflict (messages above may refer); retrying...\n"; - sleep(1); + my $delay = rand $retry_count; + print STDERR "DB conflict (messages above may refer);". + " retrying after $delay...\n"; + sleep($delay); } return $r; } From patchwork Wed Oct 7 17:59:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821513 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 684A317D2 for ; Wed, 7 Oct 2020 18:28:12 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42BA82168B for ; Wed, 7 Oct 2020 18:28:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42BA82168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3700.10962 (Exim 4.92) (envelope-from ) id 1kQEA2-0002u7-GN; Wed, 07 Oct 2020 18:27:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3700.10962; Wed, 07 Oct 2020 18:27:34 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEA1-0002t9-Ft; Wed, 07 Oct 2020 18:27:33 +0000 Received: by outflank-mailman (input) for mailman id 3700; Wed, 07 Oct 2020 18:27:28 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3o-00072Q-Jr for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:08 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 32357582-01ed-4322-ad57-48dd5f33319b; Wed, 07 Oct 2020 18:19:57 +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 1kQDjz-0007CF-9Z; Wed, 07 Oct 2020 19:00:39 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3o-00072Q-Jr for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:08 +0000 X-Inumbo-ID: 32357582-01ed-4322-ad57-48dd5f33319b Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 32357582-01ed-4322-ad57-48dd5f33319b; Wed, 07 Oct 2020 18:19:57 +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 1kQDjz-0007CF-9Z; Wed, 07 Oct 2020 19:00:39 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 24/82] host allocation: *_shared_mark_ready: Allow other states Date: Wed, 7 Oct 2020 18:59:26 +0100 Message-Id: <20201007180024.7932-25-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Generalise these functions so they can set the state to something other than `ready', and so that they can expect a state other than `prep'. No functional change with existing callers. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 19 +++++++++++-------- Osstest/JobDB/Executive.pm | 5 +++-- Osstest/TestSupport.pm | 6 +++--- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 703f3d85..f0038f6b 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -1050,11 +1050,14 @@ END return $shared; } -sub executive_resource_shared_mark_ready ($$$) { - my ($restype, $resname, $sharetype) = @_; +sub executive_resource_shared_mark_ready ($$$;$$) { + my ($restype, $resname, $sharetype, $oldstate, $newstate) = @_; # must run outside transaction my $oldshr; + $oldstate //= 'prep'; + $newstate //= 'ready'; + my $what= "resource $restype $resname"; $sharetype .= ' '.get_harness_rev(); @@ -1063,11 +1066,11 @@ sub executive_resource_shared_mark_ready ($$$) { if (defined $oldshr) { die "$what shared $oldshr->{Type} not $sharetype" unless $oldshr->{Type} eq $sharetype; - die "$what shared state $oldshr->{State} not prep" - unless $oldshr->{State} eq 'prep'; - my $nrows= $dbh_tests->do(<{State} not $oldstate" + unless $oldshr->{State} eq $oldstate; + my $nrows= $dbh_tests->do(<jobdb_resource_shared_mark_ready('host', $ho->{Name}, - $sharetype); + $sharetype, $oldstate, $newstate); } sub gitcache_setup ($) { From patchwork Wed Oct 7 17:59:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821547 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6B8D14D5 for ; Wed, 7 Oct 2020 18:28:53 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AAEEF2173E for ; Wed, 7 Oct 2020 18:28:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAEEF2173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3710.11077 (Exim 4.92) (envelope-from ) id 1kQEAP-00042s-Of; Wed, 07 Oct 2020 18:27:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3710.11077; Wed, 07 Oct 2020 18:27:57 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAO-00041g-Ns; Wed, 07 Oct 2020 18:27:56 +0000 Received: by outflank-mailman (input) for mailman id 3710; Wed, 07 Oct 2020 18:27:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5f-00072Q-Ol for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:03 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2d13658e-fba9-4421-9b68-f8e723a3e629; Wed, 07 Oct 2020 18:21:16 +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 1kQDjz-0007CF-GO; Wed, 07 Oct 2020 19:00:39 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5f-00072Q-Ol for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:03 +0000 X-Inumbo-ID: 2d13658e-fba9-4421-9b68-f8e723a3e629 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2d13658e-fba9-4421-9b68-f8e723a3e629; Wed, 07 Oct 2020 18:21:16 +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 1kQDjz-0007CF-GO; Wed, 07 Oct 2020 19:00:39 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 25/82] host allocation: *_shared_mark_ready: Make $sharetype check optional Date: Wed, 7 Oct 2020 18:59:27 +0100 Message-Id: <20201007180024.7932-26-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson We are going to want to be able to set shares to other than ready, without double-checking the sharetype. The change to the UPDATE statement makes no difference because resource_check_allocated_core has just got that sharetype out of the db. (This does remove one safety check against bugs, sadly.) No functional change for existing callers. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index f0038f6b..fd975590 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -1059,21 +1059,25 @@ sub executive_resource_shared_mark_ready ($$$;$$) { $newstate //= 'ready'; my $what= "resource $restype $resname"; - $sharetype .= ' '.get_harness_rev(); + if (defined $sharetype) { + $sharetype .= ' '.get_harness_rev(); + } else { + die if $newstate eq 'ready'; + } db_retry($dbh_tests, [qw(resources)], sub { $oldshr= resource_check_allocated_core($restype, $resname); if (defined $oldshr) { die "$what shared $oldshr->{Type} not $sharetype" - unless $oldshr->{Type} eq $sharetype; + unless !defined $sharetype or $oldshr->{Type} eq $sharetype; die "$what shared state $oldshr->{State} not $oldstate" unless $oldshr->{State} eq $oldstate; - my $nrows= $dbh_tests->do(<do(<do(<{ResType}, $resname); From patchwork Wed Oct 7 17:59:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821447 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5738B14D5 for ; Wed, 7 Oct 2020 18:20:03 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2DA432173E for ; Wed, 7 Oct 2020 18:20:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DA432173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3644.10543 (Exim 4.92) (envelope-from ) id 1kQE1j-00077c-L5; Wed, 07 Oct 2020 18:18:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3644.10543; Wed, 07 Oct 2020 18:18:59 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1j-00077U-FR; Wed, 07 Oct 2020 18:18:59 +0000 Received: by outflank-mailman (input) for mailman id 3644; Wed, 07 Oct 2020 18:18: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 1kQE1i-00072Q-FZ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:58 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4107dd9a-78d9-4391-844b-8506c6bdd8d7; Wed, 07 Oct 2020 18:18:54 +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 1kQDjz-0007CF-Mp; Wed, 07 Oct 2020 19:00:39 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1i-00072Q-FZ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:58 +0000 X-Inumbo-ID: 4107dd9a-78d9-4391-844b-8506c6bdd8d7 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4107dd9a-78d9-4391-844b-8506c6bdd8d7; Wed, 07 Oct 2020 18:18:54 +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 1kQDjz-0007CF-Mp; Wed, 07 Oct 2020 19:00:39 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 26/82] host allocation: selecthost: allow sort-of-selection of prospective hosts Date: Wed, 7 Oct 2020 18:59:28 +0100 Message-Id: <20201007180024.7932-27-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson If one passes a trueish value for $prospective, selecthost does not worry about whether any host has actually been selected. It does a limited amount of prep work. This will be useful if we want to know some of the non-host-specific information selecthost computes - in particular, $ho->{Suite} etc. No functional change with existing callers. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 7292a329..3d5f0be3 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1170,9 +1170,9 @@ sub power_state ($$;$) { #---------- host selection and properties ---------- -sub selecthost ($;$); -sub selecthost ($;$) { - my ($ident, $none_ok) = @_; +sub selecthost ($;$$); +sub selecthost ($;$$) { + my ($ident, $none_ok, $prospective) = @_; # must be run outside transaction # $ident is @@ -1199,7 +1199,7 @@ sub selecthost ($;$) { $r{$ident}= $name; } else { $name= $r{$ident}; - if (!defined $name) { + if (!defined $name and !$prospective) { return undef if $none_ok; die "no specified $ident"; } @@ -1220,6 +1220,8 @@ sub selecthost ($;$) { $ho->{OS} = target_var($ho, "os") // "debian"; } + return $ho if $prospective; + #----- handle hosts which are themselves guests (nested) ----- if ($name =~ s/^(.*)://) { From patchwork Wed Oct 7 17:59:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821523 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F3E617CF for ; Wed, 7 Oct 2020 18:28:22 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5BE942168B for ; Wed, 7 Oct 2020 18:28:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BE942168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3706.11047 (Exim 4.92) (envelope-from ) id 1kQEAI-0003hH-BP; Wed, 07 Oct 2020 18:27:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3706.11047; Wed, 07 Oct 2020 18:27:50 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAI-0003gt-2V; Wed, 07 Oct 2020 18:27:50 +0000 Received: by outflank-mailman (input) for mailman id 3706; Wed, 07 Oct 2020 18:27:48 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE35-00072Q-Ii for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:23 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 754cadb0-7421-45fd-92c0-5f4f9ff11a16; Wed, 07 Oct 2020 18:19:39 +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 1kQDjz-0007CF-Ty; Wed, 07 Oct 2020 19:00:40 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE35-00072Q-Ii for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:23 +0000 X-Inumbo-ID: 754cadb0-7421-45fd-92c0-5f4f9ff11a16 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 754cadb0-7421-45fd-92c0-5f4f9ff11a16; Wed, 07 Oct 2020 18:19:39 +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 1kQDjz-0007CF-Ty; Wed, 07 Oct 2020 19:00:40 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 27/82] host allocation: *_shared_mark_ready: allow alternative $oldtypes Date: Wed, 7 Oct 2020 18:59:29 +0100 Message-Id: <20201007180024.7932-28-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson $oldtype may now be a hashref, where keys mapping to truthy values are permitted for the sharetype precondition. No functional change for existing callers. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index fd975590..f2d43464 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -1056,6 +1056,7 @@ sub executive_resource_shared_mark_ready ($$$;$$) { my $oldshr; $oldstate //= 'prep'; + $oldstate = { $oldstate => 1 } unless ref $oldstate; $newstate //= 'ready'; my $what= "resource $restype $resname"; @@ -1070,8 +1071,9 @@ sub executive_resource_shared_mark_ready ($$$;$$) { if (defined $oldshr) { die "$what shared $oldshr->{Type} not $sharetype" unless !defined $sharetype or $oldshr->{Type} eq $sharetype; - die "$what shared state $oldshr->{State} not $oldstate" - unless $oldshr->{State} eq $oldstate; + die "$what shared state $oldshr->{State} not". + " one of ".(join ' ', sort keys %$oldstate) + unless $oldstate->{ $oldshr->{State} }; my $nrows= $dbh_tests->do(< X-Patchwork-Id: 11821435 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F24FE17CF for ; Wed, 7 Oct 2020 18:19:19 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CA82E2176B for ; Wed, 7 Oct 2020 18:19:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA82E2176B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3638.10483 (Exim 4.92) (envelope-from ) id 1kQE0x-0006Yn-UF; Wed, 07 Oct 2020 18:18:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3638.10483; Wed, 07 Oct 2020 18:18:11 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE0x-0006Yf-Qg; Wed, 07 Oct 2020 18:18:11 +0000 Received: by outflank-mailman (input) for mailman id 3638; Wed, 07 Oct 2020 18:18:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE0w-0006UA-Ra for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:10 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1901b5e8-0928-4160-9047-aaf276f7001d; Wed, 07 Oct 2020 18:18:08 +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 1kQDk0-0007CF-Aq; Wed, 07 Oct 2020 19:00:40 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE0w-0006UA-Ra for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:10 +0000 X-Inumbo-ID: 1901b5e8-0928-4160-9047-aaf276f7001d Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1901b5e8-0928-4160-9047-aaf276f7001d; Wed, 07 Oct 2020 18:18:08 +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 1kQDk0-0007CF-Aq; Wed, 07 Oct 2020 19:00:40 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 28/82] host allocation: Support new reuse-* magic hostflag Date: Wed, 7 Oct 2020 18:59:30 +0100 Message-Id: <20201007180024.7932-29-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This is like share-* except it has different MaxTasks and MaxWear parameters. Signed-off-by: Ian Jackson --- README.planner | 7 +++++++ ts-hosts-allocate-Executive | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/README.planner b/README.planner index f134d716..a9275f12 100644 --- a/README.planner +++ b/README.planner @@ -230,6 +230,13 @@ hostflag: identically. The osstest test harness revision is automatically appended and therefore does not need to be included. + reuse-SHARING + + The host may be reused, one job after another. Like share- but + only permits one job at a time, and has a much higher limit for + the number of successive jobs. ts-host-test-share should be used + to arrange for the host's state to be recorded appropriately. + equiv-FORMALTOKEN For each equiv-FORMALTOKEN job flag set on one or more IDENTs, a diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 2c18a739..6fcfd2e3 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -279,6 +279,16 @@ sub compute_hids () { " $hid->{DefaultSharedMaxTasks}". " $hid->{DefaultSharedMaxWear}\n"; next; + } elsif ($flag =~ m/^reuse-/) { + die if exists $hid->{Shared}; + my $shr= $'; #' + $hid->{Shared}= $shr." ".get_harness_rev(); + $hid->{SharedMaxTasks}= 1; + $hid->{SharedMaxWear}= 10; + print DEBUG "HID $ident FLAG $flag SHARE-REUSE $shr". + " $hid->{SharedMaxTasks}". + " $hid->{SharedMaxWear}\n"; + next; } elsif ($flag =~ m/^equiv-/) { my $formalclass= $'; #' die if exists $hid->{Equiv}; @@ -484,6 +494,11 @@ END foreach my $kcomb (qw(Shared-Max-Wear Shared-Max-Tasks)) { my $kdb= $kcomb; $kdb =~ y/-A-Z/ a-z/; my $khash= $kcomb; $khash =~ y/-//d; + if ($hid->{$khash}) { + $candrow->{$khash} = $hid->{$khash}; + print DEBUG "$dbg $khash FROM-HID\n"; + next; + } $resprop_q->execute($candrow->{restype},$candrow->{resname},$kdb); my $proprow= $resprop_q->fetchrow_hashref(); my $val= $proprow->{val}; From patchwork Wed Oct 7 17:59:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821467 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 36F2217CF for ; Wed, 7 Oct 2020 18:27:23 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D1EE2168B for ; Wed, 7 Oct 2020 18:27:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D1EE2168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3684.10777 (Exim 4.92) (envelope-from ) id 1kQE9W-0001Qx-6k; Wed, 07 Oct 2020 18:27:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3684.10777; Wed, 07 Oct 2020 18:27:02 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9V-0001Q9-Mq; Wed, 07 Oct 2020 18:27:01 +0000 Received: by outflank-mailman (input) for mailman id 3684; Wed, 07 Oct 2020 18:26:59 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3j-00072Q-Jm for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:03 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 22b02326-6e00-4a43-a9af-37635fe05050; Wed, 07 Oct 2020 18:19:55 +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 1kQDk0-0007CF-Is; Wed, 07 Oct 2020 19:00:40 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3j-00072Q-Jm for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:03 +0000 X-Inumbo-ID: 22b02326-6e00-4a43-a9af-37635fe05050 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 22b02326-6e00-4a43-a9af-37635fe05050; Wed, 07 Oct 2020 18:19:55 +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 1kQDk0-0007CF-Is; Wed, 07 Oct 2020 19:00:40 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 29/82] host allocation: *_shared_mark_ready: Only prod when $newstate is ready Date: Wed, 7 Oct 2020 18:59:31 +0100 Message-Id: <20201007180024.7932-30-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index f2d43464..4cd4aa50 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -1092,13 +1092,15 @@ END END } }); - if (!eval { - my $qserv = tcpconnect_queuedaemon(); - print $qserv "prod\n" or die $!; - $_ = <$qserv>; defined && m/^OK prod\b/ or die "$_ ?"; - 1; - }) { - logm("post-mark-ready queue daemon prod failed: $@"); + if ($newstate eq 'ready') { + if (!eval { + my $qserv = tcpconnect_queuedaemon(); + print $qserv "prod\n" or die $!; + $_ = <$qserv>; defined && m/^OK prod\b/ or die "$_ ?"; + 1; + }) { + logm("post-mark-ready queue daemon prod failed: $@"); + } } if ($oldshr) { logm("$restype $resname shared $sharetype marked $newstate"); From patchwork Wed Oct 7 17:59:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821489 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5F1BD17CF for ; Wed, 7 Oct 2020 18:27:56 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 33BF42168B for ; Wed, 7 Oct 2020 18:27:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33BF42168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3686.10799 (Exim 4.92) (envelope-from ) id 1kQE9Y-0001Vb-EK; Wed, 07 Oct 2020 18:27:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3686.10799; Wed, 07 Oct 2020 18:27:04 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9X-0001Uf-Bv; Wed, 07 Oct 2020 18:27:03 +0000 Received: by outflank-mailman (input) for mailman id 3686; Wed, 07 Oct 2020 18:27:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2R-00072Q-HW for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:43 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 55d1223a-6df9-4919-9b32-964afaeeb692; Wed, 07 Oct 2020 18:19:18 +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 1kQDk0-0007CF-Tp; Wed, 07 Oct 2020 19:00:41 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2R-00072Q-HW for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:43 +0000 X-Inumbo-ID: 55d1223a-6df9-4919-9b32-964afaeeb692 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 55d1223a-6df9-4919-9b32-964afaeeb692; Wed, 07 Oct 2020 18:19:18 +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 1kQDk0-0007CF-Tp; Wed, 07 Oct 2020 19:00:41 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 30/82] plan_search: Break out $share_compat_ok Date: Wed, 7 Oct 2020 18:59:32 +0100 Message-Id: <20201007180024.7932-31-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson No functional change. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 4cd4aa50..e4bb0868 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -700,6 +700,20 @@ sub plan_search ($$$$) { # this period is entirely after the proposed slot; # so no need to check this or any later periods + my $share_compat_ok = sub { + my ($eshare) = @_; + return 0 unless defined $req->{Shared}; + return 0 unless $req->{Shared} eq $eshare->{Type}; + if (defined $share_wear) { + $share_wear++ if $startevt->{Type} eq 'Start'; + } else { + $share_wear= $eshare->{Wear}+1; + } + return 0 if $share_wear > $req->{SharedMaxWear}; + return 0 if $eshare->{Shares} != $req->{SharedMaxTasks}; + return 1; + }; + next PERIOD if $endevt->{Time} <= $try_time; # this period is entirely before the proposed slot; # it doesn't overlap, but must check subsequent periods @@ -711,15 +725,7 @@ sub plan_search ($$$$) { my $eshare= $startevt->{Share}; if ($eshare) { $dbgprint->("PLAN LOOP OVERLAP ESHARE"); - last CHECK unless defined $req->{Shared}; - last CHECK unless $req->{Shared} eq $eshare->{Type}; - if (defined $share_wear) { - $share_wear++ if $startevt->{Type} eq 'Start'; - } else { - $share_wear= $eshare->{Wear}+1; - } - last CHECK if $share_wear > $req->{SharedMaxWear}; - last CHECK if $eshare->{Shares} != $req->{SharedMaxTasks}; + last CHECK unless $share_compat_ok->($eshare); } # We have suitable availability for this period $dbgprint->("PLAN LOOP OVERLAP AVAIL OK"); From patchwork Wed Oct 7 17:59:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821535 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5906414D5 for ; Wed, 7 Oct 2020 18:28:39 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C7E82168B for ; Wed, 7 Oct 2020 18:28:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C7E82168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3683.10771 (Exim 4.92) (envelope-from ) id 1kQE9V-0001OK-5I; Wed, 07 Oct 2020 18:27:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3683.10771; Wed, 07 Oct 2020 18:27:01 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9U-0001Nt-SZ; Wed, 07 Oct 2020 18:27:00 +0000 Received: by outflank-mailman (input) for mailman id 3683; Wed, 07 Oct 2020 18:26:59 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3e-00072Q-JS for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:58 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 20f74aeb-50d8-4880-8daf-80bf69bbf6f1; Wed, 07 Oct 2020 18:19:52 +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 1kQDk1-0007CF-5n; Wed, 07 Oct 2020 19:00:41 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3e-00072Q-JS for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:58 +0000 X-Inumbo-ID: 20f74aeb-50d8-4880-8daf-80bf69bbf6f1 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 20f74aeb-50d8-4880-8daf-80bf69bbf6f1; Wed, 07 Oct 2020 18:19:52 +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 1kQDk1-0007CF-5n; Wed, 07 Oct 2020 19:00:41 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 31/82] plan_search: Improve debugging of $share_compat_ok->() Date: Wed, 7 Oct 2020 18:59:33 +0100 Message-Id: <20201007180024.7932-32-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson No change other than to debugging output. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index e4bb0868..dfa3710a 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -702,6 +702,12 @@ sub plan_search ($$$$) { my $share_compat_ok = sub { my ($eshare) = @_; + $dbgprint->("PLAN LOOP SHARE-COMPAT-OK ". + "type $eshare->{Type} vs. ". + ($req->{Shared} // '')." ". + "wear $eshare->{Wear} ". + "shares $eshare->{Shares} vs. ". + ($req->{SharedMaxTasks}//'')); return 0 unless defined $req->{Shared}; return 0 unless $req->{Shared} eq $eshare->{Type}; if (defined $share_wear) { @@ -711,6 +717,7 @@ sub plan_search ($$$$) { } return 0 if $share_wear > $req->{SharedMaxWear}; return 0 if $eshare->{Shares} != $req->{SharedMaxTasks}; + $dbgprint->("PLAN LOOP SHARE-COMPAT-OK Y"); return 1; }; From patchwork Wed Oct 7 17:59:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821565 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C42B14D5 for ; Wed, 7 Oct 2020 18:29:17 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 126142168B for ; Wed, 7 Oct 2020 18:29:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 126142168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3747.11252 (Exim 4.92) (envelope-from ) id 1kQEB4-0005tw-LD; Wed, 07 Oct 2020 18:28:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3747.11252; Wed, 07 Oct 2020 18:28:38 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEB3-0005rq-Af; Wed, 07 Oct 2020 18:28:37 +0000 Received: by outflank-mailman (input) for mailman id 3747; Wed, 07 Oct 2020 18:28:34 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5G-00072Q-Nq for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:38 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fd487d61-c3bd-4c0c-9178-6cbdf434cb81; Wed, 07 Oct 2020 18:21:02 +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 1kQDk1-0007CF-Er; Wed, 07 Oct 2020 19:00:41 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5G-00072Q-Nq for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:38 +0000 X-Inumbo-ID: fd487d61-c3bd-4c0c-9178-6cbdf434cb81 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fd487d61-c3bd-4c0c-9178-6cbdf434cb81; Wed, 07 Oct 2020 18:21:02 +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 1kQDk1-0007CF-Er; Wed, 07 Oct 2020 19:00:41 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 32/82] plan_search: Use plan's Wear information rather than tracking it ourselves Date: Wed, 7 Oct 2020 18:59:34 +0100 Message-Id: <20201007180024.7932-33-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson There is no reason not to use this information from the plan. Not computing it ourselves saves some confusing logic here. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index dfa3710a..e17b6503 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -675,7 +675,6 @@ sub plan_search ($$$$) { my $reqix= 0; my $try_time= 0; my $confirmedok= 0; - my $share_wear; my $share_reuse= 0; for (;;) { @@ -689,8 +688,7 @@ sub plan_search ($$$$) { PERIOD: foreach (my $ix=0; $ix<@$events; $ix++) { $dbgprint->("PLAN LOOP reqs[$reqix]=$req->{Ident}". - " evtix=$ix try=$try_time confirmed=$confirmedok". - (defined($share_wear) ? " wear=$share_wear" : "")); + " evtix=$ix try=$try_time confirmed=$confirmedok"); # check the period from $events[$ix] to next event my $startevt= $events->[$ix]; @@ -710,12 +708,8 @@ sub plan_search ($$$$) { ($req->{SharedMaxTasks}//'')); return 0 unless defined $req->{Shared}; return 0 unless $req->{Shared} eq $eshare->{Type}; - if (defined $share_wear) { - $share_wear++ if $startevt->{Type} eq 'Start'; - } else { - $share_wear= $eshare->{Wear}+1; - } - return 0 if $share_wear > $req->{SharedMaxWear}; + my $wear= $eshare->{Wear}+1; + return 0 if $wear > $req->{SharedMaxWear}; return 0 if $eshare->{Shares} != $req->{SharedMaxTasks}; $dbgprint->("PLAN LOOP SHARE-COMPAT-OK Y"); return 1; @@ -742,13 +736,11 @@ sub plan_search ($$$$) { # nope $try_time= $endevt->{Time}; $confirmedok= 0; - undef $share_wear; $share_reuse= 0; $dbgprint->("PLAN LOOP OVERLAP BAD $try_time"); } $dbgprint->("PLAN NEXT reqs[$reqix]=$req->{Ident}". - " try=$try_time confirmed=$confirmedok reuse=$share_reuse". - (defined($share_wear) ? " wear=$share_wear" : "")); + " try=$try_time confirmed=$confirmedok reuse=$share_reuse"); $confirmedok++; $share_reuse++ if defined $share_wear; From patchwork Wed Oct 7 17:59:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821561 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B683814D5 for ; Wed, 7 Oct 2020 18:29:10 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8694E2168B for ; Wed, 7 Oct 2020 18:29:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8694E2168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3754.11275 (Exim 4.92) (envelope-from ) id 1kQEB9-00068e-Js; Wed, 07 Oct 2020 18:28:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3754.11275; Wed, 07 Oct 2020 18:28:43 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEB8-00066z-Ee; Wed, 07 Oct 2020 18:28:42 +0000 Received: by outflank-mailman (input) for mailman id 3754; Wed, 07 Oct 2020 18:28:39 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4D-00072Q-Kx for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:33 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1bee077b-0b92-4225-aeef-89e68b1bd8f5; Wed, 07 Oct 2020 18:20:11 +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 1kQDk1-0007CF-ML; Wed, 07 Oct 2020 19:00:41 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4D-00072Q-Kx for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:33 +0000 X-Inumbo-ID: 1bee077b-0b92-4225-aeef-89e68b1bd8f5 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1bee077b-0b92-4225-aeef-89e68b1bd8f5; Wed, 07 Oct 2020 18:20:11 +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 1kQDk1-0007CF-ML; Wed, 07 Oct 2020 19:00:41 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 33/82] plan search: Move $share_compat_ok further up the file Date: Wed, 7 Oct 2020 18:59:35 +0100 Message-Id: <20201007180024.7932-34-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson We are going to want to use this outside the loop. No functional change. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index e17b6503..4083ae6b 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -684,6 +684,23 @@ sub plan_search ($$$$) { $events ||= [ ]; + my $share_compat_ok = sub { + my ($eshare) = @_; + $dbgprint->("PLAN LOOP SHARE-COMPAT-OK ". + "type $eshare->{Type} vs. ". + ($req->{Shared} // '')." ". + "wear $eshare->{Wear} ". + "shares $eshare->{Shares} vs. ". + ($req->{SharedMaxTasks}//'')); + return 0 unless defined $req->{Shared}; + return 0 unless $req->{Shared} eq $eshare->{Type}; + my $wear= $eshare->{Wear}+1; + return 0 if $wear > $req->{SharedMaxWear}; + return 0 if $eshare->{Shares} != $req->{SharedMaxTasks}; + $dbgprint->("PLAN LOOP SHARE-COMPAT-OK Y"); + return 1; + }; + # can we do $req at $try_time ? If not, when later can we ? PERIOD: foreach (my $ix=0; $ix<@$events; $ix++) { @@ -698,23 +715,6 @@ sub plan_search ($$$$) { # this period is entirely after the proposed slot; # so no need to check this or any later periods - my $share_compat_ok = sub { - my ($eshare) = @_; - $dbgprint->("PLAN LOOP SHARE-COMPAT-OK ". - "type $eshare->{Type} vs. ". - ($req->{Shared} // '')." ". - "wear $eshare->{Wear} ". - "shares $eshare->{Shares} vs. ". - ($req->{SharedMaxTasks}//'')); - return 0 unless defined $req->{Shared}; - return 0 unless $req->{Shared} eq $eshare->{Type}; - my $wear= $eshare->{Wear}+1; - return 0 if $wear > $req->{SharedMaxWear}; - return 0 if $eshare->{Shares} != $req->{SharedMaxTasks}; - $dbgprint->("PLAN LOOP SHARE-COMPAT-OK Y"); - return 1; - }; - next PERIOD if $endevt->{Time} <= $try_time; # this period is entirely before the proposed slot; # it doesn't overlap, but must check subsequent periods From patchwork Wed Oct 7 17:59:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821541 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D15C14D5 for ; Wed, 7 Oct 2020 18:28:44 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52EF72168B for ; Wed, 7 Oct 2020 18:28:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52EF72168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3709.11071 (Exim 4.92) (envelope-from ) id 1kQEAO-0003zw-Hl; Wed, 07 Oct 2020 18:27:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3709.11071; Wed, 07 Oct 2020 18:27:56 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAO-0003zT-3y; Wed, 07 Oct 2020 18:27:56 +0000 Received: by outflank-mailman (input) for mailman id 3709; Wed, 07 Oct 2020 18:27:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4S-00072Q-Lc for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:48 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ddcc62eb-6ded-4054-be0f-ede0730b6969; Wed, 07 Oct 2020 18:20:19 +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 1kQDk2-0007CF-1d; Wed, 07 Oct 2020 19:00:42 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4S-00072Q-Lc for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:48 +0000 X-Inumbo-ID: ddcc62eb-6ded-4054-be0f-ede0730b6969 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ddcc62eb-6ded-4054-be0f-ede0730b6969; Wed, 07 Oct 2020 18:20:19 +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 1kQDk2-0007CF-1d; Wed, 07 Oct 2020 19:00:42 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 34/82] plan_search: Track last sharing state to determine $share_reuse Date: Wed, 7 Oct 2020 18:59:36 +0100 Message-Id: <20201007180024.7932-35-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson What matters for the purpose of $share_reuse is not whether the host is actually being _shared_ (ie, there are other concurrent allocations and therefore a concurrent Event with Share information). What we really want to know is whether the *last* use of this host was a suitable sharing setup - because we actually want to know if we will be able to skip our setup. So track that explicitly. (The slightly odd structure, where there are two loops in one, means that we reset $last_eshare when we go onto the next $req ie the next host to check.) Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 4083ae6b..5f59c44e 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -676,6 +676,7 @@ sub plan_search ($$$$) { my $try_time= 0; my $confirmedok= 0; my $share_reuse= 0; + my $last_eshare; for (;;) { my $req= $requestlist->[$reqix]; @@ -715,6 +716,10 @@ sub plan_search ($$$$) { # this period is entirely after the proposed slot; # so no need to check this or any later periods + $last_eshare = $startevt->{ + $startevt->{Type} eq 'Unshare' ? 'PreviousShare' : 'Share' + }; + next PERIOD if $endevt->{Time} <= $try_time; # this period is entirely before the proposed slot; # it doesn't overlap, but must check subsequent periods @@ -743,9 +748,10 @@ sub plan_search ($$$$) { " try=$try_time confirmed=$confirmedok reuse=$share_reuse"); $confirmedok++; - $share_reuse++ if defined $share_wear; + $share_reuse++ if $last_eshare and $share_compat_ok->($last_eshare); $reqix++; $reqix %= @$requestlist; + undef $last_eshare; last if $confirmedok==@$requestlist; } From patchwork Wed Oct 7 17:59:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821575 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8EDCC1752 for ; Wed, 7 Oct 2020 18:30:23 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 571B421707 for ; Wed, 7 Oct 2020 18:30:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 571B421707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3770.11318 (Exim 4.92) (envelope-from ) id 1kQEBL-0006g9-Sc; Wed, 07 Oct 2020 18:28:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3770.11318; Wed, 07 Oct 2020 18:28:55 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEBL-0006fQ-AP; Wed, 07 Oct 2020 18:28:55 +0000 Received: by outflank-mailman (input) for mailman id 3770; Wed, 07 Oct 2020 18:28:53 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5z-00072Q-Ph for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:23 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9ebb28b1-5068-4d39-a376-f39b1a9a02b4; Wed, 07 Oct 2020 18:21:27 +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 1kQDk2-0007CF-7y; Wed, 07 Oct 2020 19:00:42 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5z-00072Q-Ph for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:23 +0000 X-Inumbo-ID: 9ebb28b1-5068-4d39-a376-f39b1a9a02b4 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9ebb28b1-5068-4d39-a376-f39b1a9a02b4; Wed, 07 Oct 2020 18:21:27 +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 1kQDk2-0007CF-7y; Wed, 07 Oct 2020 19:00:42 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 35/82] resource reporting: Print username when listing "rogue tasks" Date: Wed, 7 Oct 2020 18:59:37 +0100 Message-Id: <20201007180024.7932-36-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- ms-planner | 1 + 1 file changed, 1 insertion(+) diff --git a/ms-planner b/ms-planner index 78d27b2f..41f27fa0 100755 --- a/ms-planner +++ b/ms-planner @@ -325,6 +325,7 @@ END $info .= " $arow->{type} $arow->{refkey}"; $info .= " ($arow->{comment})" if defined $arow->{comment}; $info .= " $arow->{subtask}"; + $info .= " (user $arow->{username})"; } $plan->{Allocations}{$reskey}= { Task => $arow->{owntaskid}, From patchwork Wed Oct 7 17:59:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821473 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 982C014D5 for ; Wed, 7 Oct 2020 18:27:34 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 723A72168B for ; Wed, 7 Oct 2020 18:27:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 723A72168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3690.10846 (Exim 4.92) (envelope-from ) id 1kQE9g-0001sB-3E; Wed, 07 Oct 2020 18:27:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3690.10846; Wed, 07 Oct 2020 18:27:11 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9e-0001ql-VR; Wed, 07 Oct 2020 18:27:10 +0000 Received: by outflank-mailman (input) for mailman id 3690; Wed, 07 Oct 2020 18:27:07 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6s-00072Q-Ro for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:18 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6a26448e-ebaa-49d8-a387-8b29faaad382; Wed, 07 Oct 2020 18:21:56 +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 1kQDk2-0007CF-Gl; Wed, 07 Oct 2020 19:00:42 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6s-00072Q-Ro for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:18 +0000 X-Inumbo-ID: 6a26448e-ebaa-49d8-a387-8b29faaad382 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6a26448e-ebaa-49d8-a387-8b29faaad382; Wed, 07 Oct 2020 18:21:56 +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 1kQDk2-0007CF-Gl; Wed, 07 Oct 2020 19:00:42 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 36/82] resource reporting, nfc: Break out report_rogue_task_description Date: Wed, 7 Oct 2020 18:59:38 +0100 Message-Id: <20201007180024.7932-37-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 14 ++++++++++++++ ms-planner | 6 +----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 5f59c44e..e3ab1dc3 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -51,6 +51,7 @@ BEGIN { report_run_getinfo report_altcolour report_altchangecolour opendb_tests report_blessingscond report_find_push_age_info + report_rogue_task_description log_stderr_timestamped tcpconnect_queuedaemon plan_search manual_allocation_base_jobinfo @@ -418,6 +419,19 @@ sub report_blessingscond ($) { return $blessingscond; } +sub report_rogue_task_description ($) { + my ($arow) = @_; + # should have the fields from tasks, except taskid which + # caller must print if they want it. + # may also have fields from resources (eg subtask) + my $info= "rogue task "; + $info .= " $arow->{type} $arow->{refkey}"; + $info .= " ($arow->{comment})" if defined $arow->{comment}; + $info .= " $arow->{subtask}"; + $info .= " (user $arow->{username})"; + return $info; +} + sub report__find_test ($$$$$$$) { my ($blessings, $branches, $tree, $revision, $selection, $extracond, $sortlimit) = @_; diff --git a/ms-planner b/ms-planner index 41f27fa0..4b970730 100755 --- a/ms-planner +++ b/ms-planner @@ -321,11 +321,7 @@ END $info= "(preparing)"; } else { print DEBUG "rogue $reso $shareix: $arow->{owntaskid}\n"; - $info= "rogue task"; - $info .= " $arow->{type} $arow->{refkey}"; - $info .= " ($arow->{comment})" if defined $arow->{comment}; - $info .= " $arow->{subtask}"; - $info .= " (user $arow->{username})"; + $info= report_rogue_task_description($arow); } $plan->{Allocations}{$reskey}= { Task => $arow->{owntaskid}, From patchwork Wed Oct 7 17:59:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821553 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B8EC17D2 for ; Wed, 7 Oct 2020 18:28:58 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6ECAB21707 for ; Wed, 7 Oct 2020 18:28:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6ECAB21707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3731.11194 (Exim 4.92) (envelope-from ) id 1kQEAr-0005IA-F4; Wed, 07 Oct 2020 18:28:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3731.11194; Wed, 07 Oct 2020 18:28:25 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAq-0005Gx-MI; Wed, 07 Oct 2020 18:28:24 +0000 Received: by outflank-mailman (input) for mailman id 3731; Wed, 07 Oct 2020 18:28:21 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5p-00072Q-P4 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:13 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6c4e2ceb-4d26-473f-b4de-23e72f53f8e1; Wed, 07 Oct 2020 18:21:21 +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 1kQDk2-0007CF-QW; Wed, 07 Oct 2020 19:00:42 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5p-00072Q-P4 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:13 +0000 X-Inumbo-ID: 6c4e2ceb-4d26-473f-b4de-23e72f53f8e1 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6c4e2ceb-4d26-473f-b4de-23e72f53f8e1; Wed, 07 Oct 2020 18:21:21 +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 1kQDk2-0007CF-QW; Wed, 07 Oct 2020 19:00:42 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 37/82] ts-hosts-allocate-Executive: Better message for hosts abandoned mid-test Date: Wed, 7 Oct 2020 18:59:39 +0100 Message-Id: <20201007180024.7932-38-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 6fcfd2e3..58e9f891 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -1062,7 +1062,7 @@ sub actual_allocation ($) { } # someone was preparing it but they aren't any more push @allocwarnings, - "previous preparation apparently abandoned"; + "previous use apparently abandoned ($shared->{state})"; $allocatable= 1; } } From patchwork Wed Oct 7 17:59:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821529 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 34A7B17D2 for ; Wed, 7 Oct 2020 18:28:27 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0720C2168B for ; Wed, 7 Oct 2020 18:28:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0720C2168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3702.10990 (Exim 4.92) (envelope-from ) id 1kQEA7-00037A-7S; Wed, 07 Oct 2020 18:27:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3702.10990; Wed, 07 Oct 2020 18:27:38 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEA5-00034c-JB; Wed, 07 Oct 2020 18:27:37 +0000 Received: by outflank-mailman (input) for mailman id 3702; Wed, 07 Oct 2020 18:27:33 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6O-00072Q-Qr for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:48 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b4d8655f-307c-496d-a72a-2974b582accc; Wed, 07 Oct 2020 18:21:39 +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 1kQDk3-0007CF-2H; Wed, 07 Oct 2020 19:00:43 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6O-00072Q-Qr for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:48 +0000 X-Inumbo-ID: b4d8655f-307c-496d-a72a-2974b582accc Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b4d8655f-307c-496d-a72a-2974b582accc; Wed, 07 Oct 2020 18:21:39 +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 1kQDk3-0007CF-2H; Wed, 07 Oct 2020 19:00:43 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 38/82] ts-host-reuse: New script, to do reuse state changes Date: Wed, 7 Oct 2020 18:59:40 +0100 Message-Id: <20201007180024.7932-39-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This will be made part of the test job recipes. We calculate the sharing scope (sharetype) by reference to a lot of runvars, etc. This version of the script is rather far from the finished working one, but it seems better to preserve the actual history for how it got the way it is. Signed-off-by: Ian Jackson --- ts-host-reuse | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100755 ts-host-reuse diff --git a/ts-host-reuse b/ts-host-reuse new file mode 100755 index 00000000..e14a9149 --- /dev/null +++ b/ts-host-reuse @@ -0,0 +1,163 @@ +#!/usr/bin/perl -w +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2009-2013 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# usage: +# ./ts-host-reuse prealloc|start-test|post-test IDENT [ARGS...] +# +# Computes the sharing scope of the host for IDENT, and then +# +# prealloc Sets the share-* runtime hostflag appropriately +# +# start-test Expects the host to have previously been `prep' +# (being prepared) or `ready'. +# Marks it as `mid-test'. +# +# All the scripts before `ready' or `start-test', (at +# least, ones which affect the host) should have been +# marked with @, so that they are skipped when the +# host is shared or reused. +# +# post-test Expects the host to have previously been `mid-test' +# Does a small amount of cleanup, deleting some things +# which take a lot of space. +# Then marks the host as `ready' for reuse. +# Must not be done if test arrangements had unexpected +# failures which might leave host in an odd state. + +use strict qw(vars); +use DBI; +BEGIN { unshift @INC, qw(.); } +use Osstest; +use POSIX; +use Osstest::TestSupport; + +tsreadconfig(); + +die unless @ARGV==2; + +our ($action, $whhost) = @ARGV; + +our $ho; + +#---------- compute $sharetype ---------- + +our $sharetype; + +sub sharetype_add ($$) { + my ($k, $v) = @_; + return unless defined $v; + $sharetype .= "/$k=$v"; +} + +sub compute_test_sharetype () { + $sharetype = + "test-$flight/$r{arch}/$r{xenbuildjob}/$r{kernbuildjob}/$r{buildjob}"; + + sharetype_add('suite', $ho->{Suite}); + sharetype_add('di', $ho->{DiVersion}); + + foreach my $runvar (qw(freebsd_distpath freebsdbuildjob + bios xenable_xsm toolstack kernkind)) { + my $val = $r{$runvar}; + die "$runvar $val ?" if defined $val && $val =~ m{[,/\%\\]}; + sharetype_add($runvar, $val); + } + + return $sharetype; +} + +#---------- functions ---------- + +sub post_test_cleanup () { + my $script = <<'ENDQ'; + set -e + cd /root + du -skx * | while read size thing; do + printf '%10d %s' "$size" "$thing" + if [ $size -gt 11000 ]; then + printf ' removing' + rm -rf -- "$thing" + fi + printf '\n' + done +ENDQ + my $r_vals = sub { + my ($re) = @_; + map { $r{$_} } + sort + grep /$re/, + keys %r; + }; + my @vgs = $r_vals->(qr{_vg$}); + my @lvs = $r_vals->(qr{_lv$}); + $script .= <{Ident}, "reuse-$sharetype"); +} + +sub act_start_test () { + compute_test_sharetype(); + $ho = selecthost($whhost); + return unless $ho->{Shared}; + my %oldstate = map { $_ => 1 } qw(prep ready); + host_shared_mark_ready($ho, $sharetype, \%oldstate, 'mid-test'); +} + +sub act_post_test () { + compute_test_sharetype(); + $ho = selecthost($whhost); + return unless $ho->{Shared}; + die unless $ho->{Shared}{State} eq 'mid-test'; + post_test_cleanup(); + host_shared_mark_ready($ho, $sharetype, 'mid-test', 'ready'); +} + +$action =~ y/-/_/; +&{"act_$action"}(); From patchwork Wed Oct 7 17:59:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821481 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A163E14D5 for ; Wed, 7 Oct 2020 18:27:51 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 75EA22168B for ; Wed, 7 Oct 2020 18:27:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75EA22168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3693.10890 (Exim 4.92) (envelope-from ) id 1kQE9q-0002Mg-C0; Wed, 07 Oct 2020 18:27:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3693.10890; Wed, 07 Oct 2020 18:27:22 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9p-0002Lu-R6; Wed, 07 Oct 2020 18:27:21 +0000 Received: by outflank-mailman (input) for mailman id 3693; Wed, 07 Oct 2020 18:27:19 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE30-00072Q-IS for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:18 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 51e97c34-5e24-471f-a252-757d6711b763; Wed, 07 Oct 2020 18:19:35 +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 1kQDk3-0007CF-A3; Wed, 07 Oct 2020 19:00:43 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE30-00072Q-IS for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:18 +0000 X-Inumbo-ID: 51e97c34-5e24-471f-a252-757d6711b763 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 51e97c34-5e24-471f-a252-757d6711b763; Wed, 07 Oct 2020 18:19:35 +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 1kQDk3-0007CF-A3; Wed, 07 Oct 2020 19:00:43 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 39/82] ts-host-reuse: tolerate unremoveable lv Date: Wed, 7 Oct 2020 18:59:41 +0100 Message-Id: <20201007180024.7932-40-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson It might be a symlink in the pair tests. Signed-off-by: Ian Jackson --- ts-host-reuse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-host-reuse b/ts-host-reuse index e14a9149..74ac94aa 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -112,7 +112,7 @@ ENDI printf 'LV %s...\n' "$dev" if ! test -e $dev; then continue; fi dd if=/dev/urandom bs=1024 count=4096 of=$dev ||: - lvremove -f $dev + lvremove -f $dev ||: done done ENDQ From patchwork Wed Oct 7 17:59:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821521 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4B8814D5 for ; Wed, 7 Oct 2020 18:28:21 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 930FD2168B for ; Wed, 7 Oct 2020 18:28:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 930FD2168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3711.11088 (Exim 4.92) (envelope-from ) id 1kQEAS-00047b-1G; Wed, 07 Oct 2020 18:28:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3711.11088; Wed, 07 Oct 2020 18:27:59 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAQ-00046c-EO; Wed, 07 Oct 2020 18:27:58 +0000 Received: by outflank-mailman (input) for mailman id 3711; Wed, 07 Oct 2020 18:27:56 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2l-00072Q-I2 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:03 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a7613705-b72b-4847-aaa2-3b430a1b5cf5; Wed, 07 Oct 2020 18:19:29 +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 1kQDk3-0007CF-JV; Wed, 07 Oct 2020 19:00:43 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2l-00072Q-I2 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:03 +0000 X-Inumbo-ID: a7613705-b72b-4847-aaa2-3b430a1b5cf5 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a7613705-b72b-4847-aaa2-3b430a1b5cf5; Wed, 07 Oct 2020 18:19:29 +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 1kQDk3-0007CF-JV; Wed, 07 Oct 2020 19:00:43 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 40/82] ts-host-reuse: Do not depend on bios Date: Wed, 7 Oct 2020 18:59:42 +0100 Message-Id: <20201007180024.7932-41-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Weirdly, this is only used for guests. Really, it should be a target_var, not a raw runvar applying to all guests, since it can be guest-specific. Signed-off-by: Ian Jackson --- ts-host-reuse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-host-reuse b/ts-host-reuse index 74ac94aa..67de480f 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -71,7 +71,7 @@ sub compute_test_sharetype () { sharetype_add('di', $ho->{DiVersion}); foreach my $runvar (qw(freebsd_distpath freebsdbuildjob - bios xenable_xsm toolstack kernkind)) { + xenable_xsm toolstack kernkind)) { my $val = $r{$runvar}; die "$runvar $val ?" if defined $val && $val =~ m{[,/\%\\]}; sharetype_add($runvar, $val); From patchwork Wed Oct 7 17:59:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821495 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0BE3617D2 for ; Wed, 7 Oct 2020 18:28:00 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D33A72168B for ; Wed, 7 Oct 2020 18:27:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D33A72168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3687.10805 (Exim 4.92) (envelope-from ) id 1kQE9Z-0001Zk-FM; Wed, 07 Oct 2020 18:27:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3687.10805; Wed, 07 Oct 2020 18:27:05 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9Y-0001YZ-LU; Wed, 07 Oct 2020 18:27:04 +0000 Received: by outflank-mailman (input) for mailman id 3687; Wed, 07 Oct 2020 18:27:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6T-00072Q-R3 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:53 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8e3ddf54-e154-4d5e-9e4d-61ee34f75f64; Wed, 07 Oct 2020 18:21:41 +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 1kQDk3-0007CF-RB; Wed, 07 Oct 2020 19:00:43 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6T-00072Q-R3 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:53 +0000 X-Inumbo-ID: 8e3ddf54-e154-4d5e-9e4d-61ee34f75f64 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8e3ddf54-e154-4d5e-9e4d-61ee34f75f64; Wed, 07 Oct 2020 18:21:41 +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 1kQDk3-0007CF-RB; Wed, 07 Oct 2020 19:00:43 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 41/82] ts-host-reuse: Add some missing runvars to the host sharing control Date: Wed, 7 Oct 2020 18:59:43 +0100 Message-Id: <20201007180024.7932-42-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Add some missing runvars to the host sharing control. Signed-off-by: Ian Jackson --- ts-host-reuse | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts-host-reuse b/ts-host-reuse index 67de480f..5bdb07d1 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -71,7 +71,8 @@ sub compute_test_sharetype () { sharetype_add('di', $ho->{DiVersion}); foreach my $runvar (qw(freebsd_distpath freebsdbuildjob - xenable_xsm toolstack kernkind)) { + xenable_xsm toolstack kernkind + xen_boot_append toolstack)) { my $val = $r{$runvar}; die "$runvar $val ?" if defined $val && $val =~ m{[,/\%\\]}; sharetype_add($runvar, $val); From patchwork Wed Oct 7 17:59:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821443 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B3F9E14D5 for ; Wed, 7 Oct 2020 18:20:01 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 871382173E for ; Wed, 7 Oct 2020 18:20:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 871382173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3649.10603 (Exim 4.92) (envelope-from ) id 1kQE28-0007Z4-HF; Wed, 07 Oct 2020 18:19:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3649.10603; Wed, 07 Oct 2020 18:19:24 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE28-0007Yv-Bc; Wed, 07 Oct 2020 18:19:24 +0000 Received: by outflank-mailman (input) for mailman id 3649; Wed, 07 Oct 2020 18:19:23 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE27-00072Q-GZ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:23 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b3a47a31-db37-454f-a28e-22d0be966e38; Wed, 07 Oct 2020 18:19:09 +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 1kQDk4-0007CF-3A; Wed, 07 Oct 2020 19:00:44 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE27-00072Q-GZ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:23 +0000 X-Inumbo-ID: b3a47a31-db37-454f-a28e-22d0be966e38 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b3a47a31-db37-454f-a28e-22d0be966e38; Wed, 07 Oct 2020 18:19:09 +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 1kQDk4-0007CF-3A; Wed, 07 Oct 2020 19:00:44 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 42/82] host allocation: selecthost(): Support @IDENT for reuse Date: Wed, 7 Oct 2020 18:59:44 +0100 Message-Id: <20201007180024.7932-43-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This is the first part of a central way to control host reuse, rather than having to write code in each ts-* script to check Shared etc. No functional change with existing callers. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 3d5f0be3..be6b7119 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1175,7 +1175,7 @@ sub selecthost ($;$$) { my ($ident, $none_ok, $prospective) = @_; # must be run outside transaction - # $ident is + # $ident is [@] # # can be , typically "host" or "xxx_host" # which means look up the runvar $r{$ident} which @@ -1191,8 +1191,16 @@ sub selecthost ($;$$) { # can be : meaning use the # Xen domain name on the host specified by # , which is an as above. + # + # The leading @, if present, specifies that this script should be + # skipped if the host is being reused or shared. Specifically: + # if the host is shared and in sharing state `ready'. And, it is + # wrong to specify @ when multiple hosts are being selected. my $name; + + my $isprep = $ident =~ s/^\@//; + if ($ident =~ m/=/) { $ident= $`; $name= $'; #' @@ -1352,13 +1360,27 @@ sub selecthost ($;$$) { $mjobdb->host_check_allocated($ho); - logm("host $ho->{Ident}: selected $ho->{Name} ". + logm("host $ho->{Ident}". + ($isprep ? " (prep)" : ""). + ": selected $ho->{Name} ". (defined $ho->{Ether} ? $ho->{Ether} : ''). " $ho->{Ip}". (!$ho->{Shared} ? '' : sprintf(" - shared %s %s %d", $ho->{Shared}{Type}, $ho->{Shared}{State}, $ho->{Shared}{Others}+1))); + if ($isprep && $ho->{Shared}) { + my $st = $ho->{Shared}{State}; + if ($st eq 'ready') { + logm("host is ready, skipping step"); + exit 0; + } elsif ($st eq 'prep') { + # ok, we need to do it + } else { + die "host sharestate is $st but isprep (@ in ident)"; + } + } + return $ho; } From patchwork Wed Oct 7 17:59:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821479 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A338314D5 for ; Wed, 7 Oct 2020 18:27:50 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 76E2D21707 for ; Wed, 7 Oct 2020 18:27:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76E2D21707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3696.10921 (Exim 4.92) (envelope-from ) id 1kQE9w-0002dG-DA; Wed, 07 Oct 2020 18:27:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3696.10921; Wed, 07 Oct 2020 18:27:28 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9v-0002c7-Gj; Wed, 07 Oct 2020 18:27:27 +0000 Received: by outflank-mailman (input) for mailman id 3696; Wed, 07 Oct 2020 18:27:25 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE77-00072Q-S8 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:33 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id cff2d2c9-adb1-41e0-ab49-5bf585595830; Wed, 07 Oct 2020 18:22:05 +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 1kQDk4-0007CF-AH; Wed, 07 Oct 2020 19:00:44 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE77-00072Q-S8 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:33 +0000 X-Inumbo-ID: cff2d2c9-adb1-41e0-ab49-5bf585595830 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id cff2d2c9-adb1-41e0-ab49-5bf585595830; Wed, 07 Oct 2020 18:22:05 +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 1kQDk4-0007CF-AH; Wed, 07 Oct 2020 19:00:44 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 43/82] ts-hosts-allocate-Executive print sharing info in debug output Date: Wed, 7 Oct 2020 18:59:45 +0100 Message-Id: <20201007180024.7932-44-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 58e9f891..fc107c08 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -691,7 +691,9 @@ sub hid_recurse ($$) { print DEBUG "$dbg FINAL start=$start_time va=$variation_age". " variation_bonus=$variation_bonus". " previously_failed=$previously_failed". - " previously_failed_equiv=$previously_failed_equiv cost=$cost\n"; + " previously_failed_equiv=$previously_failed_equiv". + " eff.share_bonus=$share_reuse*$share_reuse_bonus". + " cost=$cost\n"; if (!defined $best || $cost < $best->{Cost}) { print DEBUG "$dbg FINAL BEST: ". From patchwork Wed Oct 7 17:59:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821555 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4B2A17CF for ; Wed, 7 Oct 2020 18:29:05 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AAD5B21707 for ; Wed, 7 Oct 2020 18:29:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAD5B21707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3722.11146 (Exim 4.92) (envelope-from ) id 1kQEAg-0004qV-T8; Wed, 07 Oct 2020 18:28:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3722.11146; Wed, 07 Oct 2020 18:28:14 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAg-0004pS-AO; Wed, 07 Oct 2020 18:28:14 +0000 Received: by outflank-mailman (input) for mailman id 3722; Wed, 07 Oct 2020 18:28:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6d-00072Q-R8 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:03 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 7c9cc43c-0db9-422e-b8a7-5ebe7389db32; Wed, 07 Oct 2020 18:21:49 +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 1kQDk4-0007CF-J8; Wed, 07 Oct 2020 19:00:44 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6d-00072Q-R8 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:03 +0000 X-Inumbo-ID: 7c9cc43c-0db9-422e-b8a7-5ebe7389db32 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 7c9cc43c-0db9-422e-b8a7-5ebe7389db32; Wed, 07 Oct 2020 18:21:49 +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 1kQDk4-0007CF-J8; Wed, 07 Oct 2020 19:00:44 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 44/82] sg-run-job: New @ iffail tag for prep tasks Date: Wed, 7 Oct 2020 18:59:46 +0100 Message-Id: <20201007180024.7932-45-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Currently no users sites, so no functional change. Signed-off-by: Ian Jackson --- sg-run-job | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sg-run-job b/sg-run-job index 3f44cae7..a074cd42 100755 --- a/sg-run-job +++ b/sg-run-job @@ -223,12 +223,15 @@ proc recipe-flag {flagname {def 0}} { # # IFFAIL can be # -# [-][!]. -# [-][!]STATUS +# [@][-][!]. +# [@][-][!]STATUS # # where STATUS is the job/step status to be used if the step # status is not as expected, and the special meanings are: # +# @ Only for per-host-ts: prefix each ident with @ +# to run this script only if the host is `prep' +# and not if it is `ready'. # - for run-ts; suprresses exception on failure. # for per-host-ts; suppresses consequences of failure. # ! Run this even if the job is being truncated. @@ -452,8 +455,11 @@ proc reap-ts {reap {wantstatus pass}} { proc per-host-ts {iffail ident script args} { global ok truncate need_xen_hosts flight jobinfo + + set isprep [lindex {{} @} [regsub {^\@} $iffail {} iffail]] - if {![iffail-check $iffail {$ok && !$truncate} iffail_status]} return + if {![iffail-check $iffail {$ok && !$truncate} iffail_status]} \ + return set awaitl {} foreach host $need_xen_hosts { @@ -461,7 +467,7 @@ proc per-host-ts {iffail ident script args} { if {[string compare $host host]} { lappend hostargs +! $host } - lappend hostargs + $host + lappend hostargs + $isprep$host lappend awaitl [eval spawn-ts $iffail $ident $script $hostargs $args] } From patchwork Wed Oct 7 17:59:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821551 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DC5414D5 for ; Wed, 7 Oct 2020 18:28:58 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CCF132168B for ; Wed, 7 Oct 2020 18:28:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCF132168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3721.11142 (Exim 4.92) (envelope-from ) id 1kQEAf-0004n2-Hz; Wed, 07 Oct 2020 18:28:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3721.11142; Wed, 07 Oct 2020 18:28:13 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAf-0004m6-5x; Wed, 07 Oct 2020 18:28:13 +0000 Received: by outflank-mailman (input) for mailman id 3721; Wed, 07 Oct 2020 18:28:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5Q-00072Q-O9 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:48 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 27e5ae2d-afc6-47d4-96cc-d1a866bf576b; Wed, 07 Oct 2020 18:21:10 +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 1kQDk4-0007CF-PI; Wed, 07 Oct 2020 19:00:44 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5Q-00072Q-O9 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:48 +0000 X-Inumbo-ID: 27e5ae2d-afc6-47d4-96cc-d1a866bf576b Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 27e5ae2d-afc6-47d4-96cc-d1a866bf576b; Wed, 07 Oct 2020 18:21:10 +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 1kQDk4-0007CF-PI; Wed, 07 Oct 2020 19:00:44 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 45/82] sg-run-job: Detect improper use of @ iffail with run-ts Date: Wed, 7 Oct 2020 18:59:47 +0100 Message-Id: <20201007180024.7932-46-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Only per-host-ts understands this. This is a bit of a bear trap, so arrange to bail rather than putting strange step status values with `@' at the front in the database... Signed-off-by: Ian Jackson --- sg-run-job | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sg-run-job b/sg-run-job index a074cd42..067b28db 100755 --- a/sg-run-job +++ b/sg-run-job @@ -317,6 +317,9 @@ proc iffail-check {iffail okexpr iffail_status_var} { if {![regsub {^!} $iffail {} iffail_status]} { if {![uplevel 1 [list expr $okexpr]]} { return 0 } } + if {[regexp {^@} $iffail]} { + error "internal error - @ only valid for iffail with per-host-ts" + } return 1 } From patchwork Wed Oct 7 17:59:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821427 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5FEEC17CF for ; Wed, 7 Oct 2020 18:18:52 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 341622173E for ; Wed, 7 Oct 2020 18:18:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 341622173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3640.10506 (Exim 4.92) (envelope-from ) id 1kQE18-0006ik-LG; Wed, 07 Oct 2020 18:18:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3640.10506; Wed, 07 Oct 2020 18:18:22 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE18-0006ia-HY; Wed, 07 Oct 2020 18:18:22 +0000 Received: by outflank-mailman (input) for mailman id 3640; Wed, 07 Oct 2020 18:18:20 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE16-0006UA-SC for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:20 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9e994920-52a7-45e0-a646-0d04426bbfe9; Wed, 07 Oct 2020 18:18:17 +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 1kQDk5-0007CF-0w; Wed, 07 Oct 2020 19:00:45 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE16-0006UA-SC for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:20 +0000 X-Inumbo-ID: 9e994920-52a7-45e0-a646-0d04426bbfe9 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9e994920-52a7-45e0-a646-0d04426bbfe9; Wed, 07 Oct 2020 18:18:17 +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 1kQDk5-0007CF-0w; Wed, 07 Oct 2020 19:00:45 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 46/82] shared/reuse: Use @ for ts-xen-build-prep Date: Wed, 7 Oct 2020 18:59:48 +0100 Message-Id: <20201007180024.7932-47-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Pass @ from sg-run-job. This is the only call site for ts-xen-build-prep, so it can lose the open-coded test for SharedReady. Signed-off-by: Ian Jackson --- sg-run-job | 2 +- ts-xen-build-prep | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sg-run-job b/sg-run-job index 067b28db..d46a3a62 100755 --- a/sg-run-job +++ b/sg-run-job @@ -753,7 +753,7 @@ proc allocate-build-host {ostype} { proc prepare-build-host-linux {} { global jobinfo run-ts broken host-install(*) ts-host-install-twice + --build - run-ts . host-build-prep ts-xen-build-prep + run-ts . host-build-prep ts-xen-build-prep + @host } proc prepare-build-host-freebsd {} { diff --git a/ts-xen-build-prep b/ts-xen-build-prep index dabb9921..092bbffe 100755 --- a/ts-xen-build-prep +++ b/ts-xen-build-prep @@ -28,7 +28,6 @@ tsreadconfig(); our ($whhost) = @ARGV; $whhost ||= 'host'; our $ho= selecthost($whhost); -exit 0 if $ho->{SharedReady}; our ($vg,$lv); From patchwork Wed Oct 7 17:59:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821445 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37C0917D2 for ; Wed, 7 Oct 2020 18:20:02 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 10AC72173E for ; Wed, 7 Oct 2020 18:20:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10AC72173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3646.10567 (Exim 4.92) (envelope-from ) id 1kQE1u-0007HP-82; Wed, 07 Oct 2020 18:19:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3646.10567; Wed, 07 Oct 2020 18:19:10 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1u-0007HF-47; Wed, 07 Oct 2020 18:19:10 +0000 Received: by outflank-mailman (input) for mailman id 3646; Wed, 07 Oct 2020 18:19:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1s-00072Q-Fv for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:08 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b62c7e83-dbae-4cf4-a3c7-fb9d424626b2; Wed, 07 Oct 2020 18:19:01 +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 1kQDk5-0007CF-9J; Wed, 07 Oct 2020 19:00:45 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1s-00072Q-Fv for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:08 +0000 X-Inumbo-ID: b62c7e83-dbae-4cf4-a3c7-fb9d424626b2 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b62c7e83-dbae-4cf4-a3c7-fb9d424626b2; Wed, 07 Oct 2020 18:19:01 +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 1kQDk5-0007CF-9J; Wed, 07 Oct 2020 19:00:45 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 47/82] shared/reuse: Use @ for ts-host-install Date: Wed, 7 Oct 2020 18:59:49 +0100 Message-Id: <20201007180024.7932-48-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Pass @ from sg-run-job. These are all the call sites for ts-host-install-*, so we can lose the open-coded test for SharedReady. Signed-off-by: Ian Jackson --- sg-run-job | 6 +++--- ts-host-install | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sg-run-job b/sg-run-job index d46a3a62..c454d4ea 100755 --- a/sg-run-job +++ b/sg-run-job @@ -85,7 +85,7 @@ proc run-job {job} { } } - per-host-ts broken host-install/@(*) ts-host-install-twice + per-host-ts @broken host-install/@(*) ts-host-install-twice per-host-prep @@ -675,7 +675,7 @@ proc examine-host-prep {} { run-ts broken = ts-hosts-allocate + host } proc examine-host-install-debian {} { - run-ts broken host-install ts-host-install-twice + host + run-ts broken host-install ts-host-install-twice + @host } proc examine-host-install-xen {} { examine-host-install-debian @@ -752,7 +752,7 @@ proc allocate-build-host {ostype} { } proc prepare-build-host-linux {} { global jobinfo - run-ts broken host-install(*) ts-host-install-twice + --build + run-ts broken host-install(*) ts-host-install-twice + --build @host run-ts . host-build-prep ts-xen-build-prep + @host } diff --git a/ts-host-install b/ts-host-install index 924c1e06..b0fd2028 100755 --- a/ts-host-install +++ b/ts-host-install @@ -53,7 +53,6 @@ our ($whhost) = @ARGV; $whhost ||= 'host'; our $ho= selecthost($whhost); exit 0 if $ho->{Flags}{'no-reinstall'}; -exit 0 if $ho->{SharedReady}; our %timeout= qw(ReadPreseed 350 Sshd 2400); From patchwork Wed Oct 7 17:59:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821487 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 46B2414D5 for ; Wed, 7 Oct 2020 18:27:54 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1CD612177B for ; Wed, 7 Oct 2020 18:27:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CD612177B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3692.10879 (Exim 4.92) (envelope-from ) id 1kQE9o-0002HC-D9; Wed, 07 Oct 2020 18:27:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3692.10879; Wed, 07 Oct 2020 18:27:20 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9n-0002Ge-Va; Wed, 07 Oct 2020 18:27:19 +0000 Received: by outflank-mailman (input) for mailman id 3692; Wed, 07 Oct 2020 18:27:19 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6n-00072Q-RX for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:13 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 03699dbd-5e37-4648-863d-40c47704ce6f; Wed, 07 Oct 2020 18:21:54 +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 1kQDk5-0007CF-FJ; Wed, 07 Oct 2020 19:00:45 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6n-00072Q-RX for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:13 +0000 X-Inumbo-ID: 03699dbd-5e37-4648-863d-40c47704ce6f Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 03699dbd-5e37-4648-863d-40c47704ce6f; Wed, 07 Oct 2020 18:21:54 +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 1kQDk5-0007CF-FJ; Wed, 07 Oct 2020 19:00:45 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 48/82] shared/reuse: Use @ for freebsd host prep Date: Wed, 7 Oct 2020 18:59:50 +0100 Message-Id: <20201007180024.7932-49-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson These are all the relevant call sites for ts-freebsd-host-install and ts-freebsd-build-prep. (There's a ts-freebsd-host-install in ts-memdisk-try-append but that's for host examination and does not uee or want sharing or reuse.) Signed-off-by: Ian Jackson --- sg-run-job | 12 +++++++++--- ts-build-prep-freebsd | 1 - ts-freebsd-host-install | 1 - 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sg-run-job b/sg-run-job index c454d4ea..0b2e20e7 100755 --- a/sg-run-job +++ b/sg-run-job @@ -758,9 +758,15 @@ proc prepare-build-host-linux {} { proc prepare-build-host-freebsd {} { global jobinfo - if {[recipe-flag testinstall]} { set broken fail } { set broken broken } - run-ts $broken host-install(*) ts-freebsd-host-install - run-ts . host-build-prep ts-build-prep-freebsd + if {[recipe-flag testinstall]} { + set broken fail + set isprep {} + } { + set broken broken + set isprep @ + } + run-ts $broken host-install(*) ts-freebsd-host-install + ${isprep}host + run-ts . host-build-prep ts-build-prep-freebsd + ${isprep}host } proc need-hosts/coverity {} { return BUILD_LINUX } diff --git a/ts-build-prep-freebsd b/ts-build-prep-freebsd index ef880503..9606c0f7 100755 --- a/ts-build-prep-freebsd +++ b/ts-build-prep-freebsd @@ -28,7 +28,6 @@ tsreadconfig(); our ($whhost) = @ARGV; $whhost ||= 'host'; our $ho= selecthost($whhost); -exit 0 if $ho->{SharedReady}; sub install_deps () { my @packages = qw(git glib pkgconf yajl gmake pixman markdown gettext diff --git a/ts-freebsd-host-install b/ts-freebsd-host-install index 3c3e9c34..9feb98cd 100755 --- a/ts-freebsd-host-install +++ b/ts-freebsd-host-install @@ -65,7 +65,6 @@ our ($whhost) = @ARGV; $whhost ||= 'host'; our $ho= selecthost($whhost); exit 0 if $ho->{Flags}{'no-reinstall'}; -exit 0 if $ho->{SharedReady}; our $timeout = 1000; From patchwork Wed Oct 7 17:59:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821559 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0B5C714D5 for ; Wed, 7 Oct 2020 18:29:08 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D3E292168B for ; Wed, 7 Oct 2020 18:29:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D3E292168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3739.11214 (Exim 4.92) (envelope-from ) id 1kQEAu-0005Rm-Ps; Wed, 07 Oct 2020 18:28:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3739.11214; Wed, 07 Oct 2020 18:28:28 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAu-0005R2-2x; Wed, 07 Oct 2020 18:28:28 +0000 Received: by outflank-mailman (input) for mailman id 3739; Wed, 07 Oct 2020 18:28:25 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3y-00072Q-KE for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:18 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 086ee261-506d-4c6b-b4bd-b2f9e49e314b; Wed, 07 Oct 2020 18:20:03 +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 1kQDk5-0007CF-LX; Wed, 07 Oct 2020 19:00:45 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3y-00072Q-KE for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:18 +0000 X-Inumbo-ID: 086ee261-506d-4c6b-b4bd-b2f9e49e314b Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 086ee261-506d-4c6b-b4bd-b2f9e49e314b; Wed, 07 Oct 2020 18:20:03 +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 1kQDk5-0007CF-LX; Wed, 07 Oct 2020 19:00:45 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 49/82] host reuse: sg-run-job: per-host prep: Use @ for per-host-ts Date: Wed, 7 Oct 2020 18:59:51 +0100 Message-Id: <20201007180024.7932-50-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson These are the steps that will be skipped when we reuse a test host. No functional change yet since we don't allocate the host shared yet. Signed-off-by: Ian Jackson --- sg-run-job | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sg-run-job b/sg-run-job index 0b2e20e7..af43008d 100755 --- a/sg-run-job +++ b/sg-run-job @@ -25,9 +25,9 @@ readconfig source-method JobDB proc per-host-prep {} { - per-host-ts . host-ping-check-native/@ ts-host-ping-check - per-host-ts . xen-install/@ ts-xen-install - per-host-ts . xen-boot/@ ts-host-reboot + per-host-ts @. host-ping-check-native/@ ts-host-ping-check + per-host-ts @. xen-install/@ ts-xen-install + per-host-ts @. xen-boot/@ ts-host-reboot per-host-ts . host-ping-check-xen/@ ts-host-ping-check per-host-ts . =(*) { ts-leak-check basis } From patchwork Wed Oct 7 17:59:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821525 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E69B417D2 for ; Wed, 7 Oct 2020 18:28:22 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B60B22168B for ; Wed, 7 Oct 2020 18:28:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B60B22168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3695.10915 (Exim 4.92) (envelope-from ) id 1kQE9u-0002Zw-Sj; Wed, 07 Oct 2020 18:27:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3695.10915; Wed, 07 Oct 2020 18:27:26 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9u-0002ZD-DM; Wed, 07 Oct 2020 18:27:26 +0000 Received: by outflank-mailman (input) for mailman id 3695; Wed, 07 Oct 2020 18:27:24 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5V-00072Q-OH for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:53 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f414edb5-514b-4fae-969b-d7da8e64f6e4; Wed, 07 Oct 2020 18:21:12 +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 1kQDk5-0007CF-Sz; Wed, 07 Oct 2020 19:00:45 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5V-00072Q-OH for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:53 +0000 X-Inumbo-ID: f414edb5-514b-4fae-969b-d7da8e64f6e4 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f414edb5-514b-4fae-969b-d7da8e64f6e4; Wed, 07 Oct 2020 18:21:12 +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 1kQDk5-0007CF-Sz; Wed, 07 Oct 2020 19:00:45 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 50/82] shared/reuse: Rely on @ for ts-host-ping-check Date: Wed, 7 Oct 2020 18:59:52 +0100 Message-Id: <20201007180024.7932-51-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Remove the check for SharedReady. The existence of this check is perplexing. It was introduced in ts-host-ping-check: Do not run if host is being reused in 8f1dc3f7c401 (from 2015). At that time we only share build hosts, and build hosts never ran this script. So I don't understand what that was hoping to achieve. Maybe it made some difference in a now-lost pre-rebase situation. Anyway, in our current tree I think we want to rerun the ts-host-ping-check when we reuse a test host. My change to add @ to parts of per-host-prep in sg-run-job deliberately omitted the step with testid host-ping-check-xen/@. Signed-off-by: Ian Jackson --- ts-host-ping-check | 2 -- 1 file changed, 2 deletions(-) diff --git a/ts-host-ping-check b/ts-host-ping-check index a670680c..512aaec3 100755 --- a/ts-host-ping-check +++ b/ts-host-ping-check @@ -27,8 +27,6 @@ our ($whhost) = @ARGV; $whhost ||= 'host'; our $ho= selecthost($whhost); -exit 0 if $ho->{SharedReady}; - $_ = `ping -D -i 0.2 -c 100 $ho->{Ip} | tee -a /dev/stderr`; m/\b([0-9.]+)% packet loss\b/ or die "$_ ?"; From patchwork Wed Oct 7 17:59:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821507 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 245A317CF for ; Wed, 7 Oct 2020 18:28:11 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1F1B2168B for ; Wed, 7 Oct 2020 18:28:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1F1B2168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3688.10825 (Exim 4.92) (envelope-from ) id 1kQE9c-0001k7-Pw; Wed, 07 Oct 2020 18:27:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3688.10825; Wed, 07 Oct 2020 18:27:08 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9c-0001iw-5A; Wed, 07 Oct 2020 18:27:08 +0000 Received: by outflank-mailman (input) for mailman id 3688; Wed, 07 Oct 2020 18:27:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE43-00072Q-KX for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:23 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f0fb4a81-ea99-4022-a703-ec12d3b33d0a; Wed, 07 Oct 2020 18:20:05 +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 1kQDk6-0007CF-4E; Wed, 07 Oct 2020 19:00:46 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE43-00072Q-KX for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:23 +0000 X-Inumbo-ID: f0fb4a81-ea99-4022-a703-ec12d3b33d0a Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f0fb4a81-ea99-4022-a703-ec12d3b33d0a; Wed, 07 Oct 2020 18:20:05 +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 1kQDk6-0007CF-4E; Wed, 07 Oct 2020 19:00:46 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 51/82] host reuse: Reuse test hosts within a flight Date: Wed, 7 Oct 2020 18:59:53 +0100 Message-Id: <20201007180024.7932-52-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Mark the host shareable, and unshareable, as appropriate. There is still a lot more cleanup and improvement to do. Signed-off-by: Ian Jackson --- sg-run-job | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sg-run-job b/sg-run-job index af43008d..1e2fcfee 100755 --- a/sg-run-job +++ b/sg-run-job @@ -29,6 +29,8 @@ proc per-host-prep {} { per-host-ts @. xen-install/@ ts-xen-install per-host-ts @. xen-boot/@ ts-host-reboot + per-host-ts broken = { ts-host-reuse start-test } + per-host-ts . host-ping-check-xen/@ ts-host-ping-check per-host-ts . =(*) { ts-leak-check basis } } @@ -64,6 +66,8 @@ proc run-job {job} { if {!$ok} return if {[llength $need_xen_hosts]} { + per-host-ts broken = { ts-host-reuse prealloc } + if {!$ok} return eval run-ts broken = ts-hosts-allocate + $need_xen_hosts } @@ -120,6 +124,7 @@ proc run-job {job} { set ok 0 } + if {$ok} { per-host-ts . = { ts-host-reuse post-test } } if {$ok} { setstatus pass } if {[llength $need_build_host] && $ok} { jobdb::preserve-task 90 } From patchwork Wed Oct 7 17:59:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821567 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 74E6017CF for ; Wed, 7 Oct 2020 18:29:17 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 499202168B for ; Wed, 7 Oct 2020 18:29:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 499202168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3771.11326 (Exim 4.92) (envelope-from ) id 1kQEBN-0006j9-25; Wed, 07 Oct 2020 18:28:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3771.11326; Wed, 07 Oct 2020 18:28:56 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEBM-0006i9-Cp; Wed, 07 Oct 2020 18:28:56 +0000 Received: by outflank-mailman (input) for mailman id 3771; Wed, 07 Oct 2020 18:28:54 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE64-00072Q-Py for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:28 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 029da054-f876-40dd-a094-2e3f3d07448a; Wed, 07 Oct 2020 18:21:29 +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 1kQDk6-0007CF-BH; Wed, 07 Oct 2020 19:00:46 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE64-00072Q-Py for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:28 +0000 X-Inumbo-ID: 029da054-f876-40dd-a094-2e3f3d07448a Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 029da054-f876-40dd-a094-2e3f3d07448a; Wed, 07 Oct 2020 18:21:29 +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 1kQDk6-0007CF-BH; Wed, 07 Oct 2020 19:00:46 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 52/82] host allocation: Group jobs by their reuse parameters Date: Wed, 7 Oct 2020 18:59:54 +0100 Message-Id: <20201007180024.7932-53-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This promotes reuse by arranging that jobs that can reuse a host get to run consecutively. Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 47 +++++++++++++++++++++++++++++++++++++ Osstest/JobDB/Standalone.pm | 2 ++ ts-host-reuse | 1 + ts-hosts-allocate-Executive | 4 ++++ 4 files changed, 54 insertions(+) diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index 30629572..8c235d45 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -389,6 +389,53 @@ END } } +sub jobdb_set_hosts_infraprioritygroup ($$$$;$) { # method + my ($mo, $flight, $job, $group_key, $rref) = @_; + # Sets the runvar hosts_infraprioritygroup in $flight,$job + # The runvar values are NUM:GROUPKEY + # such that each GROUPKEY always has the same NUM, within the flight + # $rref is \%r (for use within a ts-*) or undef + + my $vn = 'hosts_infraprioritygroup'; + + my $queryq = $dbh_tests->prepare(<prepare(<execute($job, $flight, $vn); + while (my ($tjob, $tval, $thisjob) = $queryq->fetchrow_array()) { + if ($thisjob) { + logm("$vn: job is already in group $tval"); + return; + } + $tval =~ m/^(\d+)\:/ or die "$flight $job $tval ?"; + if ($' eq $group_key) { + $use = $1; + last; + } elsif ($1 >= $use) { + $use = $1 + 1; + } + } + $resulting = "$use:$group_key"; + logm("$vn: inserting job into group $resulting"); + $insertq->execute($flight,$job,$vn, $resulting); + }); + $rref->{$vn} = $resulting if $rref && defined $resulting; +} + sub jobdb_flight_started_for_log_capture ($$) { #method my ($mo, $flight) = @_; my $started= $dbh_tests->selectrow_array(<{Ident}, "reuse-$sharetype"); + $mjobdb->jobdb_set_hosts_infraprioritygroup($flight, $job, $sharetype, \%r); } sub act_start_test () { diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index fc107c08..a50f8bf3 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -733,9 +733,13 @@ sub alloc_hosts () { ? -10000 : -10 * @hids; + my $infrapriority = + ($r{hosts_infraprioritygroup} // '') =~ m/^(\d+):/ ? $1 : undef; + my $ok = alloc_resources(WaitStart => ($ENV{OSSTEST_RESOURCE_WAITSTART} || $fi->{started}), WaitStartAdjust => $waitstartadjust, + InfraPriority => $infrapriority, DebugFh => \*DEBUG, \&attempt_allocation); From patchwork Wed Oct 7 17:59:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821469 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE94317CF for ; Wed, 7 Oct 2020 18:27:29 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C196D21707 for ; Wed, 7 Oct 2020 18:27:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C196D21707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3678.10710 (Exim 4.92) (envelope-from ) id 1kQE9M-000108-Cx; Wed, 07 Oct 2020 18:26:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3678.10710; Wed, 07 Oct 2020 18:26:52 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9M-0000zu-7e; Wed, 07 Oct 2020 18:26:52 +0000 Received: by outflank-mailman (input) for mailman id 3678; Wed, 07 Oct 2020 18:26:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4c-00072Q-Lr for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:58 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2537cdee-d122-4b24-b466-4f1c53d8830e; Wed, 07 Oct 2020 18:20:24 +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 1kQDk6-0007CF-IF; Wed, 07 Oct 2020 19:00:46 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4c-00072Q-Lr for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:58 +0000 X-Inumbo-ID: 2537cdee-d122-4b24-b466-4f1c53d8830e Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2537cdee-d122-4b24-b466-4f1c53d8830e; Wed, 07 Oct 2020 18:20:24 +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 1kQDk6-0007CF-IF; Wed, 07 Oct 2020 19:00:46 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 53/82] host reuse: Jiggle the infra-priority a bit, within a flight Date: Wed, 7 Oct 2020 18:59:55 +0100 Message-Id: <20201007180024.7932-54-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index a50f8bf3..c1002fc9 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -733,8 +733,13 @@ sub alloc_hosts () { ? -10000 : -10 * @hids; - my $infrapriority = - ($r{hosts_infraprioritygroup} // '') =~ m/^(\d+):/ ? $1 : undef; + my $infrapriority; + if (($r{hosts_infraprioritygroup} // '') =~ m/^(\d+):/) { + $infrapriority = ($1 * 100) + ($$ % 100); + # $$ provides a pseudorandom element, which arranges that jobs + # in a group roughly take turns to take the scheduling lead, + # which will hopefully help them converge. + } my $ok = alloc_resources(WaitStart => ($ENV{OSSTEST_RESOURCE_WAITSTART} || $fi->{started}), From patchwork Wed Oct 7 17:59:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821457 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57AFD17CF for ; Wed, 7 Oct 2020 18:20:18 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2B4A72173E for ; Wed, 7 Oct 2020 18:20:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B4A72173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3650.10615 (Exim 4.92) (envelope-from ) id 1kQE2D-0007fg-Sf; Wed, 07 Oct 2020 18:19:29 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3650.10615; Wed, 07 Oct 2020 18:19:29 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2D-0007fV-PI; Wed, 07 Oct 2020 18:19:29 +0000 Received: by outflank-mailman (input) for mailman id 3650; Wed, 07 Oct 2020 18:19:28 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2C-00072Q-Gs for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:28 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 989061d0-f358-42fb-b8df-8c1884493470; Wed, 07 Oct 2020 18:19:11 +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 1kQDk6-0007CF-Qb; Wed, 07 Oct 2020 19:00:46 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2C-00072Q-Gs for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:28 +0000 X-Inumbo-ID: 989061d0-f358-42fb-b8df-8c1884493470 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 989061d0-f358-42fb-b8df-8c1884493470; Wed, 07 Oct 2020 18:19:11 +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 1kQDk6-0007CF-Qb; Wed, 07 Oct 2020 19:00:46 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 54/82] host reuse: Use literal for the hosts_infraprioritygroup runvar Date: Wed, 7 Oct 2020 18:59:56 +0100 Message-Id: <20201007180024.7932-55-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson At some point this might make the database smarter about indexing. It's certainly clearer. Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index 8c235d45..8fde2934 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -403,19 +403,19 @@ sub jobdb_set_hosts_infraprioritygroup ($$$$;$) { # method (job = ?) AS thisjob FROM runvars WHERE flight=? - AND name=? + AND name='$vn' ORDER BY thisjob DESC END my $insertq = $dbh_tests->prepare(<execute($job, $flight, $vn); + $queryq->execute($job, $flight); while (my ($tjob, $tval, $thisjob) = $queryq->fetchrow_array()) { if ($thisjob) { logm("$vn: job is already in group $tval"); @@ -431,7 +431,7 @@ END } $resulting = "$use:$group_key"; logm("$vn: inserting job into group $resulting"); - $insertq->execute($flight,$job,$vn, $resulting); + $insertq->execute($flight,$job, $resulting); }); $rref->{$vn} = $resulting if $rref && defined $resulting; } From patchwork Wed Oct 7 17:59:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821441 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 633EE17CF for ; Wed, 7 Oct 2020 18:19:58 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 35DEF2176B for ; Wed, 7 Oct 2020 18:19:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35DEF2176B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3648.10591 (Exim 4.92) (envelope-from ) id 1kQE24-0007TL-58; Wed, 07 Oct 2020 18:19:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3648.10591; Wed, 07 Oct 2020 18:19:20 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE24-0007TC-0L; Wed, 07 Oct 2020 18:19:20 +0000 Received: by outflank-mailman (input) for mailman id 3648; Wed, 07 Oct 2020 18:19:18 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE22-00072Q-GH for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:18 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5472e11f-a4db-4b0f-8b11-e7ba43b978da; Wed, 07 Oct 2020 18:19:06 +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 1kQDk7-0007CF-2d; Wed, 07 Oct 2020 19:00:47 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE22-00072Q-GH for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:18 +0000 X-Inumbo-ID: 5472e11f-a4db-4b0f-8b11-e7ba43b978da Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5472e11f-a4db-4b0f-8b11-e7ba43b978da; Wed, 07 Oct 2020 18:19:06 +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 1kQDk7-0007CF-2d; Wed, 07 Oct 2020 19:00:47 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 55/82] host reuse: Bump host share reuse bonus Date: Wed, 7 Oct 2020 18:59:57 +0100 Message-Id: <20201007180024.7932-56-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson In test jobs this is now contending with the variation bonus. If we fail to vary properly this time, we get another go in the next flight, so this is not so critical. This increases the amount of test host reuse. Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index c1002fc9..b216186a 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -673,7 +673,7 @@ sub hid_recurse ($$) { $prevfail_bonus //= 7.0*86400; my $prevfail_equiv_bonus = $prevfail_bonus * (6.5 / 7.0); - my $share_reuse_bonus = $r{hostalloc_bonus_sharereuse} // 10000; + my $share_reuse_bonus = $r{hostalloc_bonus_sharereuse} // 20000; my $cost= $start_time + $duration_for_cost From patchwork Wed Oct 7 17:59:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821509 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 32EDB14D5 for ; Wed, 7 Oct 2020 18:28:12 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 081122168B for ; Wed, 7 Oct 2020 18:28:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 081122168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3681.10747 (Exim 4.92) (envelope-from ) id 1kQE9Q-0001AU-1U; Wed, 07 Oct 2020 18:26:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3681.10747; Wed, 07 Oct 2020 18:26:55 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9P-0001AE-Si; Wed, 07 Oct 2020 18:26:55 +0000 Received: by outflank-mailman (input) for mailman id 3681; Wed, 07 Oct 2020 18:26:54 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5k-00072Q-Op for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:08 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b7be757a-7ef1-4450-aafd-609299bbaff6; Wed, 07 Oct 2020 18:21:19 +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 1kQDk7-0007CF-AN; Wed, 07 Oct 2020 19:00:47 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5k-00072Q-Op for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:08 +0000 X-Inumbo-ID: b7be757a-7ef1-4450-aafd-609299bbaff6 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b7be757a-7ef1-4450-aafd-609299bbaff6; Wed, 07 Oct 2020 18:21:19 +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 1kQDk7-0007CF-AN; Wed, 07 Oct 2020 19:00:47 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 56/82] subst_netboot_template: Do not use all of %r Date: Wed, 7 Oct 2020 18:59:58 +0100 Message-Id: <20201007180024.7932-57-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Instead of copying all of %r into %v, have the template substitutor fall back to %r from %v. This is going to be important when we have host-reuse-related access control to %r. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index be6b7119..634d6d2e 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -2876,6 +2876,7 @@ sub subst_netboot_template ($$$) { $pat =~ s{\%(\w*)\%}{ $1 eq '' ? '%' : defined($v->{$1}) ? $v->{$1} : + defined($r{$1}) ? $r{$1} : next; }ge; # and return the first pattern we managed to completely substitute @@ -2890,7 +2891,7 @@ sub host_netboot_file ($;$) { # returns the full netboot filename path # in array context, returns (dir, pathtail) # where dir does not depend on $templatekeytail - my %v = %r; + my %v; my $firmware = get_host_property($ho, "firmware"); my $templatekeybase = $firmware eq 'uefi' ? 'NetGrub' : 'Pxe'; $templatekeytail //= 'Templates'; From patchwork Wed Oct 7 17:59:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821429 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EA3D214D5 for ; Wed, 7 Oct 2020 18:19:03 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC2B62173E for ; Wed, 7 Oct 2020 18:19:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC2B62173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3637.10471 (Exim 4.92) (envelope-from ) id 1kQE0t-0006Vt-Kq; Wed, 07 Oct 2020 18:18:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3637.10471; Wed, 07 Oct 2020 18:18:07 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE0t-0006Vk-Hn; Wed, 07 Oct 2020 18:18:07 +0000 Received: by outflank-mailman (input) for mailman id 3637; Wed, 07 Oct 2020 18:18:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE0r-0006UA-RO for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:05 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id bb70c138-20c1-4e8d-987d-9f2ded624cf7; Wed, 07 Oct 2020 18:18:03 +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 1kQDk7-0007CF-Ge; Wed, 07 Oct 2020 19:00:47 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE0r-0006UA-RO for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:05 +0000 X-Inumbo-ID: bb70c138-20c1-4e8d-987d-9f2ded624cf7 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id bb70c138-20c1-4e8d-987d-9f2ded624cf7; Wed, 07 Oct 2020 18:18:03 +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 1kQDk7-0007CF-Ge; Wed, 07 Oct 2020 19:00:47 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 57/82] TestSupport: Provide runvar_is_synth Date: Wed, 7 Oct 2020 18:59:59 +0100 Message-Id: <20201007180024.7932-58-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Internally we use an array %r_notsynth. This allows us to avoid adding code to store_runvar etc. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 634d6d2e..ce13d3a6 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -52,7 +52,7 @@ BEGIN { store_runvar get_runvar get_runvar_maybe get_runvar_default need_runvars unique_incrementing_runvar next_unique_name - stashfilecontents + stashfilecontents runvar_is_synth target_cmd_root_status target_cmd_output_root_status target_cmd_root target_cmd target_cmd_build @@ -147,7 +147,7 @@ BEGIN { @EXPORT_OK = qw(); } -our (%r,$flight,$job,$stash); +our (%r,$flight,$job,$stash,%r_,%r_notsynth); our %timeout= qw(RebootDown 100 RebootUp 400 @@ -178,12 +178,13 @@ sub tsreadconfig () { logm("starting $flight.$job"); my $q= $dbh_tests->prepare(<execute($flight, $job); my $row; while ($row= $q->fetchrow_hashref()) { $r{ $row->{name} }= $row->{val}; + $r_notsynth{ $row->{name} }= !$row->{synth}; logm("setting $row->{name}=$row->{val}"); } $q->finish(); @@ -434,6 +435,11 @@ END return $value; } +sub runvar_is_synth ($) { + my ($key) = @_; + return !$r_notsynth{$key}; +} + sub target_adjust_timeout ($$) { my ($ho,$timeoutref) = @_; # $ho might be a $gho my $nestinglvl = $ho->{NestingLevel} // $ho->{Host}{NestingLevel}; From patchwork Wed Oct 7 18:00:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821439 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 76E4417CF for ; Wed, 7 Oct 2020 18:19:47 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5221A21775 for ; Wed, 7 Oct 2020 18:19:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5221A21775 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3647.10579 (Exim 4.92) (envelope-from ) id 1kQE1y-0007Mn-PS; Wed, 07 Oct 2020 18:19:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3647.10579; Wed, 07 Oct 2020 18:19:14 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1y-0007Md-L0; Wed, 07 Oct 2020 18:19:14 +0000 Received: by outflank-mailman (input) for mailman id 3647; Wed, 07 Oct 2020 18:19:13 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1x-00072Q-GG for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:13 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a6c7b4c3-36aa-4ac6-a6a4-36a2a11e9a31; Wed, 07 Oct 2020 18:19:03 +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 1kQDk7-0007CF-Nc; Wed, 07 Oct 2020 19:00:47 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1x-00072Q-GG for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:13 +0000 X-Inumbo-ID: a6c7b4c3-36aa-4ac6-a6a4-36a2a11e9a31 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a6c7b4c3-36aa-4ac6-a6a4-36a2a11e9a31; Wed, 07 Oct 2020 18:19:03 +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 1kQDk7-0007CF-Nc; Wed, 07 Oct 2020 19:00:47 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 58/82] runvar access: Introduce access control machinery Date: Wed, 7 Oct 2020 19:00:00 +0100 Message-Id: <20201007180024.7932-59-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This will allow us to trap accesses, during test host setup, to runvars which weren't included in ithe calculation of the sharing scope. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 53 ++++++++++++++++++++++++++++++++++++++++++ README | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index ce13d3a6..b1eca0a9 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -33,6 +33,7 @@ use File::Basename; use IO::Handle; use Carp; use Digest::SHA; +use File::FnMatch qw(:fnmatch); BEGIN { use Exporter (); @@ -141,6 +142,8 @@ BEGIN { target_core_dump_setup sha256file host_shared_mark_ready gitcache_setup + + @accessible_runvar_pats ); %EXPORT_TAGS = ( ); @@ -156,6 +159,10 @@ our %timeout= qw(RebootDown 100 our $logm_handle= new IO::File ">& STDERR" or die $!; our $logm_prefix= ''; +# When runvar_access_restrict is called, it will limit reading +# of non-synth runvars to ones which match these glob patterns. +our @accessible_runvar_pats = qw(test-host-setup-runvars-will-appear-here); + #---------- test script startup ---------- sub tsreadconfig () { @@ -3164,4 +3171,50 @@ END 'home-osstest-gitconfig'); } +sub runvar_access_restrict () { + # restricts runvars to those in @accessible_runvar_pats + return if "@accessible_runvar_pats" eq "*"; + return if tied %r; + tie %r, 'RunvarMonitor', %r; +} + +sub runvar_access_check ($$) { + my ($key, $what) = @_; + return if grep { fnmatch $_, $key } @accessible_runvar_pats; + my $m = "reuse-uncontrolled runvar $what '$key'\n". + " (controlled runvars are @accessible_runvar_pats)"; + confess $m unless $ENV{OSSTEST_UNCONTROLLED_SHARE_RUNVAR_WARNONLY}; + Carp::cluck $m; +} + +package RunvarMonitor; +use Carp; +use Osstest; +use Osstest::TestSupport; + +sub TIEHASH { + my $self = shift; + logm("reuse: restricting runvars to @accessible_runvar_pats"); + return bless { @_ }, $self; +} + +sub _ok { + my $self = shift; + my $key = shift; + Osstest::TestSupport::runvar_access_check($key, 'access'); +} + +sub FIRSTKEY { + confess + "reuse-uncontrolled runvar scanning - change to use runvar_glob!"; +} +sub FETCH { my ($self, $key) = @_; $self->_ok($key); $self->{$key} } +sub EXISTS { my ($self, $key) = @_; $self->_ok($key); exists $self->{$key} } +sub STORE { my ($self, $key, $val) = @_; $self->{$key} = $val; } +sub DELETE { my ($self, $key) = @_; delete $self->{$key}; } + +sub CLEAR { confess } +sub SCALAR { confess } +sub UNTIE { confess } + 1; diff --git a/README b/README index ba4bea1d..a929010c 100644 --- a/README +++ b/README @@ -297,7 +297,7 @@ To run osstest in standalone mode: curl netcat chiark-utils-bin - libxml-libxml-perl + libxml-libxml-perl libfile-fnmatch-perl dctrl-tools libnet-snmp-perl (if you are going to use Masterswitch PDUs) From patchwork Wed Oct 7 18:00:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821483 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B78317CF for ; Wed, 7 Oct 2020 18:27:53 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 224DA2168B for ; Wed, 7 Oct 2020 18:27:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 224DA2168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3674.10663 (Exim 4.92) (envelope-from ) id 1kQE9C-0000oz-U6; Wed, 07 Oct 2020 18:26:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3674.10663; Wed, 07 Oct 2020 18:26:42 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9C-0000os-Pz; Wed, 07 Oct 2020 18:26:42 +0000 Received: by outflank-mailman (input) for mailman id 3674; Wed, 07 Oct 2020 18:26:41 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2W-00072Q-HT for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:48 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9dc5c5b6-8d1c-43ed-a943-f114e0982010; Wed, 07 Oct 2020 18:19:21 +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 1kQDk7-0007CF-UQ; Wed, 07 Oct 2020 19:00:48 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2W-00072Q-HT for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:48 +0000 X-Inumbo-ID: 9dc5c5b6-8d1c-43ed-a943-f114e0982010 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9dc5c5b6-8d1c-43ed-a943-f114e0982010; Wed, 07 Oct 2020 18:19:21 +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 1kQDk7-0007CF-UQ; Wed, 07 Oct 2020 19:00:48 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 59/82] runvar access: Provide runvar_glob Date: Wed, 7 Oct 2020 19:00:01 +0100 Message-Id: <20201007180024.7932-60-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson We will need this because when runvar access is restricted, accessing via %r directly won't work. We want to see what patterns the code is interested in (so that interest in a nonexistent runvar is properly tracked). Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index b1eca0a9..6403e52b 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -53,7 +53,7 @@ BEGIN { store_runvar get_runvar get_runvar_maybe get_runvar_default need_runvars unique_incrementing_runvar next_unique_name - stashfilecontents runvar_is_synth + stashfilecontents runvar_is_synth runvar_glob target_cmd_root_status target_cmd_output_root_status target_cmd_root target_cmd target_cmd_build @@ -3187,6 +3187,20 @@ sub runvar_access_check ($$) { Carp::cluck $m; } +sub runvar_glob { + my $monitor = tied %r; + my $realr = $monitor || \%r; + my @out; + foreach my $pat (@_) { + if ($monitor) { runvar_access_check($pat, 'scan') } + foreach my $key (sort keys %$realr) { + next unless fnmatch $pat, $key; + push @out, $key; + } + } + @out; +} + package RunvarMonitor; use Carp; use Osstest; From patchwork Wed Oct 7 18:00:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821531 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E57014D5 for ; Wed, 7 Oct 2020 18:28:31 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 76EDF2168B for ; Wed, 7 Oct 2020 18:28:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76EDF2168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3712.11103 (Exim 4.92) (envelope-from ) id 1kQEAV-0004Hn-8G; Wed, 07 Oct 2020 18:28:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3712.11103; Wed, 07 Oct 2020 18:28:02 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAT-0004FP-T6; Wed, 07 Oct 2020 18:28:01 +0000 Received: by outflank-mailman (input) for mailman id 3712; Wed, 07 Oct 2020 18:27:56 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6x-00072Q-S3 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:23 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f8f749b0-926d-4602-b095-e1080888c615; Wed, 07 Oct 2020 18:21:59 +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 1kQDk8-0007CF-6P; Wed, 07 Oct 2020 19:00:48 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6x-00072Q-S3 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:23 +0000 X-Inumbo-ID: f8f749b0-926d-4602-b095-e1080888c615 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f8f749b0-926d-4602-b095-e1080888c615; Wed, 07 Oct 2020 18:21:59 +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 1kQDk8-0007CF-6P; Wed, 07 Oct 2020 19:00:48 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 60/82] runvar access: Use runvar_glob for dmrestrict runvar search Date: Wed, 7 Oct 2020 19:00:02 +0100 Message-Id: <20201007180024.7932-61-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- Osstest/Debian.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 3fa26e45..ae3c1d33 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -1032,7 +1032,7 @@ END # security.d.o CDN seems unreliable right now # and jessie-updates is no more - if (grep { m/_dmrestrict$/ && $r{$_} } keys %r and + if (grep { $r{$_} } runvar_glob('*_dmrestrict') and $suite =~ m/stretch/) { preseed_backports_packages($ho, $sfx, \%xopts, $suite, qw(chiark-scripts)); From patchwork Wed Oct 7 18:00:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821519 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 514C714D5 for ; Wed, 7 Oct 2020 18:28:18 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 248982173E for ; Wed, 7 Oct 2020 18:28:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 248982173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3704.11015 (Exim 4.92) (envelope-from ) id 1kQEAC-0003Mi-1q; Wed, 07 Oct 2020 18:27:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3704.11015; Wed, 07 Oct 2020 18:27:43 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAB-0003Kr-0j; Wed, 07 Oct 2020 18:27:43 +0000 Received: by outflank-mailman (input) for mailman id 3704; Wed, 07 Oct 2020 18:27:38 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3Z-00072Q-JR for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:53 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e804b8aa-d6c1-408b-9e73-b72abd65494b; Wed, 07 Oct 2020 18:19:50 +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 1kQDk8-0007CF-Lq; Wed, 07 Oct 2020 19:00:48 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3Z-00072Q-JR for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:53 +0000 X-Inumbo-ID: e804b8aa-d6c1-408b-9e73-b72abd65494b Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e804b8aa-d6c1-408b-9e73-b72abd65494b; Wed, 07 Oct 2020 18:19:50 +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 1kQDk8-0007CF-Lq; Wed, 07 Oct 2020 19:00:48 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 61/82] runvar access: Introduce sharing_for_build Date: Wed, 7 Oct 2020 19:00:03 +0100 Message-Id: <20201007180024.7932-62-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Builds don't have so much contingent setup. We don't track the runvars; we just rely on the share-* hostflag set in the job. But selecthost() is going to automatically enable runvar access control for shared/reused hosts. So, provide a way to disable that. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 4 +++- ts-host-install | 2 ++ ts-xen-build-prep | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 6403e52b..c6bd6714 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -143,7 +143,7 @@ BEGIN { sha256file host_shared_mark_ready gitcache_setup - @accessible_runvar_pats + @accessible_runvar_pats sharing_for_build ); %EXPORT_TAGS = ( ); @@ -3171,6 +3171,8 @@ END 'home-osstest-gitconfig'); } +sub sharing_for_build () { @accessible_runvar_pats = qw(*); }; + sub runvar_access_restrict () { # restricts runvars to those in @accessible_runvar_pats return if "@accessible_runvar_pats" eq "*"; diff --git a/ts-host-install b/ts-host-install index b0fd2028..5badc706 100755 --- a/ts-host-install +++ b/ts-host-install @@ -49,6 +49,8 @@ while (@ARGV and $ARGV[0] =~ m/^-/) { } } +if ($build) { sharing_for_build(); } + our ($whhost) = @ARGV; $whhost ||= 'host'; our $ho= selecthost($whhost); diff --git a/ts-xen-build-prep b/ts-xen-build-prep index 092bbffe..fcabf75a 100755 --- a/ts-xen-build-prep +++ b/ts-xen-build-prep @@ -24,6 +24,7 @@ use Osstest::TestSupport; use Osstest::Debian; tsreadconfig(); +sharing_for_build(); our ($whhost) = @ARGV; $whhost ||= 'host'; From patchwork Wed Oct 7 18:00:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821569 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7AEF14D5 for ; Wed, 7 Oct 2020 18:29:20 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E46F2168B for ; Wed, 7 Oct 2020 18:29:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E46F2168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3762.11294 (Exim 4.92) (envelope-from ) id 1kQEBC-0006HR-VN; Wed, 07 Oct 2020 18:28:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3762.11294; Wed, 07 Oct 2020 18:28:46 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEBB-0006GE-N9; Wed, 07 Oct 2020 18:28:45 +0000 Received: by outflank-mailman (input) for mailman id 3762; Wed, 07 Oct 2020 18:28:43 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5u-00072Q-PO for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:18 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 56a087aa-63ef-43c8-b5ff-160335ac114f; Wed, 07 Oct 2020 18:21:25 +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 1kQDk8-0007CF-T2; Wed, 07 Oct 2020 19:00:48 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5u-00072Q-PO for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:18 +0000 X-Inumbo-ID: 56a087aa-63ef-43c8-b5ff-160335ac114f Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 56a087aa-63ef-43c8-b5ff-160335ac114f; Wed, 07 Oct 2020 18:21:25 +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 1kQDk8-0007CF-T2; Wed, 07 Oct 2020 19:00:48 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 62/82] runvar access: Introduce effects_gone_before_share_reuse Date: Wed, 7 Oct 2020 19:00:04 +0100 Message-Id: <20201007180024.7932-63-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson The syslog server, and its port, is used for things that happen in this job, but the syslog server is torn down and a new one started, when the host is reused. Signed-off-by: Ian Jackson --- Osstest/Debian.pm | 10 ++++++---- Osstest/TestSupport.pm | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index ae3c1d33..01930e1f 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -727,10 +727,12 @@ sub di_installcmdline_core ($$;@) { push @cl, "priority=$debconf_priority"; push @cl, "rescue/enable=true" if $xopts{RescueMode}; - if ($r{syslog_server}) { - $r{syslog_server} =~ m/:(\d+)$/ or die "$r{syslog_server} ?"; - push @cl, "log_host=$`", "log_port=$1"; - } + effects_gone_before_share_reuse(sub { + if ($r{syslog_server}) { + $r{syslog_server} =~ m/:(\d+)$/ or die "$r{syslog_server} ?"; + push @cl, "log_host=$`", "log_port=$1"; + } + }); return @cl; } diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index c6bd6714..752c36c5 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -144,6 +144,7 @@ BEGIN { gitcache_setup @accessible_runvar_pats sharing_for_build + effects_gone_before_share_reuse ); %EXPORT_TAGS = ( ); @@ -3173,6 +3174,11 @@ END sub sharing_for_build () { @accessible_runvar_pats = qw(*); }; +sub effects_gone_before_share_reuse ($) { + local @accessible_runvar_pats = qw(*); + $_[0](); +} + sub runvar_access_restrict () { # restricts runvars to those in @accessible_runvar_pats return if "@accessible_runvar_pats" eq "*"; From patchwork Wed Oct 7 18:00:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821515 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BEB95335C for ; Wed, 7 Oct 2020 18:28:12 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 920302168B for ; Wed, 7 Oct 2020 18:28:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 920302168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3703.11007 (Exim 4.92) (envelope-from ) id 1kQEAA-0003H0-8w; Wed, 07 Oct 2020 18:27:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3703.11007; Wed, 07 Oct 2020 18:27:41 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEA8-0003Ew-Sr; Wed, 07 Oct 2020 18:27:40 +0000 Received: by outflank-mailman (input) for mailman id 3703; Wed, 07 Oct 2020 18:27:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4m-00072Q-MQ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:08 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 28d148d1-a6a9-4f44-b524-7bf9d2054855; Wed, 07 Oct 2020 18:20:28 +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 1kQDk9-0007CF-3e; Wed, 07 Oct 2020 19:00:49 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4m-00072Q-MQ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:08 +0000 X-Inumbo-ID: 28d148d1-a6a9-4f44-b524-7bf9d2054855 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 28d148d1-a6a9-4f44-b524-7bf9d2054855; Wed, 07 Oct 2020 18:20:28 +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 1kQDk9-0007CF-3e; Wed, 07 Oct 2020 19:00:49 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 63/82] test host reuse: Switch to principled sharing scope runvar scheme Date: Wed, 7 Oct 2020 19:00:05 +0100 Message-Id: <20201007180024.7932-64-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson * When selecthost is passed an @host ident, indicating prep work, engage restricted runvar access. If no call to sharing_for_build was made, this means it can access only the runvars in the default value of @accessible_runvar_pats. * Make the sharetype for host reuse be based on the values of precisely those same runvars, rather than using an adhoc scheme. The set of covered runvars is bigger now as a result of testing... Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 23 ++++++++++++++++++++++- ts-host-reuse | 20 ++++++++------------ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 752c36c5..28381f05 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -162,7 +162,22 @@ our $logm_prefix= ''; # When runvar_access_restrict is called, it will limit reading # of non-synth runvars to ones which match these glob patterns. -our @accessible_runvar_pats = qw(test-host-setup-runvars-will-appear-here); +# The initial list is the runvars whih affect how a test host is +# set up, and for test jobs it isn't modified. synth runvars +# which are read-modify-write by host setup must be listed too. +our @accessible_runvar_pats = + qw( + *_dmrestrict *buildjob + arch console di_version dom0_mem enable_xsm freebsd_distpath + linux_boot_append os suite toolstack xen_boot_append xenable_xsm + host *_host + host_console *_host_console + host_hostflagadjust *_host_hostflagadjust + host_hostflags *_host_hostflags + host_linux_boot_append *_host_linux_boot_append + host_ip *_host_ip + host_power_install *_host_power_install + ); #---------- test script startup ---------- @@ -1274,6 +1289,12 @@ sub selecthost ($;$$) { return $child; } + #----- if we're sharing an actual host, make sure we do it right ----- + + if ($isprep) { + runvar_access_restrict(); + } + #----- calculation of the host's properties ----- # Firstly, hardcoded defaults diff --git a/ts-host-reuse b/ts-host-reuse index 29abe987..c852a858 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -64,18 +64,14 @@ sub sharetype_add ($$) { } sub compute_test_sharetype () { - $sharetype = - "test-$flight/$r{arch}/$r{xenbuildjob}/$r{kernbuildjob}/$r{buildjob}"; - - sharetype_add('suite', $ho->{Suite}); - sharetype_add('di', $ho->{DiVersion}); - - foreach my $runvar (qw(freebsd_distpath freebsdbuildjob - xenable_xsm toolstack kernkind - xen_boot_append toolstack)) { - my $val = $r{$runvar}; - die "$runvar $val ?" if defined $val && $val =~ m{[,/\%\\]}; - sharetype_add($runvar, $val); + $sharetype = "test-$flight"; + my %done; + foreach my $key (runvar_glob(@accessible_runvar_pats)) { + next if runvar_is_synth($key); + my $val = $r{$key}; + next if $done{$key}++; + $val =~ s{[^\"-\~]|\%}{ sprintf "%%%02x", ord $& }ge; + $sharetype .= "!$key=$r{$key}"; } return $sharetype; From patchwork Wed Oct 7 18:00:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821557 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 088BB14D5 for ; Wed, 7 Oct 2020 18:29:07 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D32D92168B for ; Wed, 7 Oct 2020 18:29:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D32D92168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3745.11246 (Exim 4.92) (envelope-from ) id 1kQEB3-0005oU-1N; Wed, 07 Oct 2020 18:28:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3745.11246; Wed, 07 Oct 2020 18:28:36 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEB1-0005nB-Qh; Wed, 07 Oct 2020 18:28:35 +0000 Received: by outflank-mailman (input) for mailman id 3745; Wed, 07 Oct 2020 18:28:33 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6J-00072Q-Qi for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:43 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e6619fc8-0a7b-4779-9558-9abc1873d78f; Wed, 07 Oct 2020 18:21:37 +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 1kQDk9-0007CF-AP; Wed, 07 Oct 2020 19:00:49 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6J-00072Q-Qi for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:23:43 +0000 X-Inumbo-ID: e6619fc8-0a7b-4779-9558-9abc1873d78f Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e6619fc8-0a7b-4779-9558-9abc1873d78f; Wed, 07 Oct 2020 18:21:37 +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 1kQDk9-0007CF-AP; Wed, 07 Oct 2020 19:00:49 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 64/82] hsot reuse: Hash the share type Date: Wed, 7 Oct 2020 19:00:06 +0100 Message-Id: <20201007180024.7932-65-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson We don't really want to duplicate (triplicate, actually) lots of the runvars. This will make the runvars table needlessly bloated. So hash the values. Signed-off-by: Ian Jackson --- README | 2 +- ts-host-reuse | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README b/README index a929010c..1703e076 100644 --- a/README +++ b/README @@ -297,7 +297,7 @@ To run osstest in standalone mode: curl netcat chiark-utils-bin - libxml-libxml-perl libfile-fnmatch-perl + libxml-libxml-perl libfile-fnmatch-perl libdigest-sha-perl dctrl-tools libnet-snmp-perl (if you are going to use Masterswitch PDUs) diff --git a/ts-host-reuse b/ts-host-reuse index c852a858..701070b2 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -43,6 +43,7 @@ use DBI; BEGIN { unshift @INC, qw(.); } use Osstest; use POSIX; +use Digest::SHA qw(sha224_base64); use Osstest::TestSupport; tsreadconfig(); @@ -64,16 +65,18 @@ sub sharetype_add ($$) { } sub compute_test_sharetype () { - $sharetype = "test-$flight"; + my @runvartexts; my %done; foreach my $key (runvar_glob(@accessible_runvar_pats)) { next if runvar_is_synth($key); my $val = $r{$key}; next if $done{$key}++; - $val =~ s{[^\"-\~]|\%}{ sprintf "%%%02x", ord $& }ge; - $sharetype .= "!$key=$r{$key}"; + $val =~ s{[^\!-\~]|\%}{ sprintf "%%%02x", ord $& }ge; + push @runvartexts, "$key=$r{$key}"; } - + my $digest = sha224_base64("@runvartexts"); + $sharetype = "test-$flight-$digest"; + logm "share type $sharetype; hash is of: @runvartexts"; return $sharetype; } From patchwork Wed Oct 7 18:00:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821431 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C7DC17CF for ; Wed, 7 Oct 2020 18:19:10 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D4D822173E for ; Wed, 7 Oct 2020 18:19:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4D822173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3641.10519 (Exim 4.92) (envelope-from ) id 1kQE1E-0006oy-Vz; Wed, 07 Oct 2020 18:18:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3641.10519; Wed, 07 Oct 2020 18:18:28 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1E-0006op-Rh; Wed, 07 Oct 2020 18:18:28 +0000 Received: by outflank-mailman (input) for mailman id 3641; Wed, 07 Oct 2020 18:18:27 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1C-0006nN-UK for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:26 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 102b99e3-6c34-4092-a542-156eab1bd2f5; Wed, 07 Oct 2020 18:18:19 +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 1kQDk9-0007CF-H3; Wed, 07 Oct 2020 19:00:49 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1C-0006nN-UK for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:26 +0000 X-Inumbo-ID: 102b99e3-6c34-4092-a542-156eab1bd2f5 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 102b99e3-6c34-4092-a542-156eab1bd2f5; Wed, 07 Oct 2020 18:18:19 +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 1kQDk9-0007CF-H3; Wed, 07 Oct 2020 19:00:49 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 65/82] hsot reuse: Make share type hash more easily greppable Date: Wed, 7 Oct 2020 19:00:07 +0100 Message-Id: <20201007180024.7932-66-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Use - and _ to make up the base64 alphabet instead of + and / Signed-off-by: Ian Jackson --- ts-host-reuse | 1 + 1 file changed, 1 insertion(+) diff --git a/ts-host-reuse b/ts-host-reuse index 701070b2..0ecbb0bd 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -75,6 +75,7 @@ sub compute_test_sharetype () { push @runvartexts, "$key=$r{$key}"; } my $digest = sha224_base64("@runvartexts"); + $digest =~ y{/+}{-_}; $sharetype = "test-$flight-$digest"; logm "share type $sharetype; hash is of: @runvartexts"; return $sharetype; From patchwork Wed Oct 7 18:00:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821433 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 434B114D5 for ; Wed, 7 Oct 2020 18:19:13 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0B1B42173E for ; Wed, 7 Oct 2020 18:19:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B1B42173E Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3636.10459 (Exim 4.92) (envelope-from ) id 1kQE0o-0006UM-DX; Wed, 07 Oct 2020 18:18:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3636.10459; Wed, 07 Oct 2020 18:18:02 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE0o-0006UF-9N; Wed, 07 Oct 2020 18:18:02 +0000 Received: by outflank-mailman (input) for mailman id 3636; Wed, 07 Oct 2020 18:18:01 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE0n-0006UA-1W for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:01 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8577cf09-0530-4663-b220-aa83a686d198; Wed, 07 Oct 2020 18:17:59 +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 1kQDk9-0007CF-Ot; Wed, 07 Oct 2020 19:00:49 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE0n-0006UA-1W for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:18:01 +0000 X-Inumbo-ID: 8577cf09-0530-4663-b220-aa83a686d198 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8577cf09-0530-4663-b220-aa83a686d198; Wed, 07 Oct 2020 18:17:59 +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 1kQDk9-0007CF-Ot; Wed, 07 Oct 2020 19:00:49 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 66/82] host lifecycle: Machinery, db, for tracking relevant events Date: Wed, 7 Oct 2020 19:00:08 +0100 Message-Id: <20201007180024.7932-67-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson When we reuse test hosts, we want to be able to give a list of the other jobs which might be responsible for any problem. In principle it would be possible to do this by digging into the db's history tables like sg-report-host-history does, but this is quite slow and also I don't have enough confidence in that approach to use it for this application. So instead, track the host lifecycle explicitly. The approach taken is a hybrid one. I first considered two and a half approaches: 1. Permanently record all host/share allocations and share state changes in a host history table. But it is nontrivial to update all the allocation machinery to keep this table up to date. It is also nontrivial to extract the necessary information from such a table: the allocation information would have to be correlated, using timestamps, with the steps table. That's slow and complex. We had such a table but it was never used for these reasons; I dropped that empty table recently. 1b. Like 1 but explicitly put a lifecycle sequence number in the allocations table,. This would make it easy to find relevant events but would involve even more complicated logic during allocation. 2. Record the host's lifecycle information in a file on the host. This means it gets wiped whenever the host does and makes finding the relevant jobs easy: read the file during logs capture, and we'll find everything of relevance. It then has to be permanently stored somewhere it can be used for logging and archaeology: a per-job runvar giving the relevant host history, up to the point where that job finished. does that job nicely. However, this has a serious problem: if the host crashes hard, we may not be able to recover the complete information about why! We really want to the information recorded outside the host in question. So I've taken a hybrid approach: effectively replicate the per-host file from (2), but put the information in the database. This necessites a call to clear the host lifecycle history, which we make at the *end* of the host install. As a bonus this might let us more easily identify if there are particular jobs that leave hosts in states that are hard to recover from, and it will make total host failure quite obvious because the host install log report will have a list of the failed attempts (longer in each successive job). For build jobs we only record the setup job, and concurrent jobs, in the runvar. This does not seem to have been a problem so far, and this avoids having to do work on other allocations (eg, mg-allocate). It also avoids having very long lists of previous builds listed in every build job. Test jobs are only shared within a flight and with much more limited scope so the same considerations don't arise. But by the same token, we also do not need to adjust mg-allocate etc., since the user ought not to allocate shares of test hosts unless they know what they are doing. In this commit we introduce: * The database table * The runvar syntax * The function for recording the lifecycle events We have what amounts to an ad-hoc compression scheme for the information in the lifecycle runvars. Otherwise this data might get quite voluminous, which can makes various other db queries slow. There isn't a very good way to represent out-of-job tasks in the lifecycle runvar. We could maybe put in something from the tasks table, but the entry in the tasks table might be gone by now and that would involve quoting (and it might be quite large). But this will only matter when a shared/reused host has been manually messed with, and recording the task is sufficient to (1) note the fact of such interference (2) if the task is static, or still going when the job reports, can actually be put in the report. (3) failing that provide something which could be grepped for in logs We do not call the recording function yet, so the db update is merely Preparatory. There is a bug in this patch: the calculation of $olive is wrong. This will be fixed in a moment. Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 211 ++++++++++++++++++++++++++++++++++++ Osstest/JobDB/Standalone.pm | 2 + Osstest/TestSupport.pm | 12 ++ schema/host-lifecycle.sql | 43 ++++++++ 4 files changed, 268 insertions(+) create mode 100644 schema/host-lifecycle.sql diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index 8fde2934..cf82b4cf 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -24,6 +24,7 @@ use Osstest; use Osstest::TestSupport; use Osstest::Executive; use Data::Dumper; +use Carp; BEGIN { use Exporter (); @@ -461,4 +462,214 @@ sub jobdb_db_glob ($$) { #method sub can_anoint ($) { return 1; } +sub jobdb_host_update_lifecycle_info ($$$) { #method + my ($mo, $ho, $mode) = @_; + # $mode is sigil + # selectprep 1 @ called several times, from selecthost, $isprep + # wiped 2 n/a called (usually) once, when install succeeds + # select 1 + called several times, from selecthost, !$isprep + # final 1 none called (hopefully) once, from capture-logs + # (once means within this job) + # Notes: + # 1 causes a new row to be added to the host lifecycle + # subject to sigil check + # 2 removes other rows from the host lifecycle + # + # Where "sigil" above is nonempty: we look at the runvar. If the + # runvar's final sigil is the same, we conclude that the needed + # work has already been done: ie, we do not need to add a row to + # the table nor do we necessarily need to update the runvar. + # + # If the sigil is not right, we replace the runvar with a history + # string derived from the lifecycle table, and (if appropriate) + # add a row. + # + # In principle it might be useful to update the runvar every time + # because the lifecycle table might have gained rows from other + # jobs, but we would like to avoid burdening select with more + # pratting about. So we leave that for capture-logs and + # reuse/final, ie when newsigil is none. + # + # The runvar is + # _lifecycle + # and contains space-separated entries + # [+@][.][]:[,] + # [+@] same flight, job, ident; new stepno + # "[""]" ie literal [ ] + # [+]? task not within a flight/job + # where omitted [,] means "host"; + # omitted and mean this runvar's flight and/or job; + # and then at then end most one of the sigils + # @ last call was selectprep + # + last call was select + # last call was final + # items with no such sigil don't appear in build jobs + # and instead appear as [] eg "[4]" + + return if $ho->{Host}; # This host *has* a host - ie, nested + + my $ttaskid = findtask(); + my $hostname = $ho->{Name}; + my $tident = $ho->{Ident}; + my $tstepno = $mo->current_stepno(); + + if ($mode eq 'wiped') { + db_retry($flight, [qw(running)], $dbh_tests,[], sub { + $dbh_tests->do(<prepare(< h.lcseq + AND h.isprep AND NOT h2.isprep + LEFT JOIN tasks t + ON h.taskid = t.taskid + WHERE h.hostname = ? + ORDER BY h.lcseq; +END + my $insertq = $dbh_tests->prepare(<.][] or ? + $scanq->execute($hostname); + + while (my $o = $scanq->fetchrow_hashref()) { + my $olive = + # Any job which appeared since we started thinking + # about this must have been concurrent with us, + # even if it is dead now. + (!$firstrun || $o->{live}) && + # If this task is still live, we need to have something + # with a live mark, generally all the prep will have + # occurred already, so we don't mark the prep as live + # if there's a later nonprep step. + !$o->{later_notprep}; + + my $olivemark = !!$olive && '+'; + if (defined($flight) && defined($o->{flight}) && + $o->{flight} eq $flight && + $o->{job} eq $job) { + # Don't put the + mark on our own entries. + $olivemark = ''; + } + + my $oisprepmark = !!$o->{isprep} && '@'; + my $omarks = $olivemark.$oisprepmark; + + my $otj = ''; + if (!defined $o->{flight}) { + $otj .= "?$o->{taskid}"; + } else { + $otj .= "$o->{flight}." if $o->{flight} ne $flight; + $otj .= $o->{job} if $o->{job} ne $job; + } + next if $tj_seen{$oisprepmark.$otj}++; + + if (!$omarks && !$olive && defined($o->{flight}) && + $ho->{Shared} && + $ho->{Shared}{Type} =~ m/^build-/ && + !$tj_seen{"\@$otj"} # do not elide use if we showed prep + ) { + # elide previous, non-concurrent, build jobs + if (!$elided) { $elided = [ scalar(@lifecycle), 0]; } + $lifecycle[$elided->[0]] = "[".(++$elided->[1])."]"; + next; + } + + my $osuffix = !!(defined($o->{ident}) && $o->{ident} ne 'host') + && ",$o->{ident}"; + + my ($lastuncompr,) = grep { !m{^\W*\d+$} } reverse @lifecycle; + if (defined($lastuncompr) && + $lastuncompr =~ m{^\W*\Q$otj\E:\d+\Q$osuffix\E$}) { + push @lifecycle, "$omarks$o->{stepno}"; + } else { + push @lifecycle, "$omarks$otj:$o->{stepno}$osuffix"; + } + } + if (defined $flight) { + $insertq->execute($hostname, $ttaskid, + $flight, $job, + ($mode eq 'selectprep')+0, + # ^ DBD::Pg doesn't accept perl canonical false for bool! + # https://rt.cpan.org/Public/Bug/Display.html?id=133229 + $tident, $tstepno); + } else { + $insertq->execute($hostname, $ttaskid, + undef,undef, + undef, + undef,undef); + } + }); + + if (defined $flight) { + push @lifecycle, $newsigil if length $newsigil; + store_runvar($ojvn, "@lifecycle"); + } +} + +sub current_stepno ($) { #method + my ($jd) = @_; + my $testid = $ENV{OSSTEST_TESTID} // return undef; + my $checkq = $dbh_tests->prepare(<execute($flight,$job,$testid); + ($stepno) = $checkq->fetchrow_array(); + }); + return $stepno; +} + 1; diff --git a/Osstest/JobDB/Standalone.pm b/Osstest/JobDB/Standalone.pm index 1db4dc78..6e1ae158 100644 --- a/Osstest/JobDB/Standalone.pm +++ b/Osstest/JobDB/Standalone.pm @@ -137,4 +137,6 @@ sub jobdb_db_glob ($) { #method sub can_anoint ($) { return 0; } +sub jobdb_host_update_lifecycle_info { } #method + 1; diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 28381f05..22141981 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -88,6 +88,7 @@ BEGIN { serial_fetch_logs set_host_property modify_host_flag propname_massage propname_check hostprop_putative_record hostflag_putative_record + host_update_lifecycle_info get_stashed open_unique_stashfile compress_stashed dir_identify_vcs @@ -174,6 +175,7 @@ our @accessible_runvar_pats = host_console *_host_console host_hostflagadjust *_host_hostflagadjust host_hostflags *_host_hostflags + host_lifecycle *_host_lifecycle host_linux_boot_append *_host_linux_boot_append host_ip *_host_ip host_power_install *_host_power_install @@ -3166,6 +3168,16 @@ sub sha256file ($;$) { return $truncate ? substr($digest, 0, $truncate) : $digest; } +sub host_update_lifecycle_info ($$) { + my ($ho, $mode) = @_; + # $mode is + # selectprep called several times, from selecthost, $isprep + # wiped called once, when install succeeds + # select called several times, from selecthost, !$isprep + # final called hopefully once, from capture-logs + $mjobdb->jobdb_host_update_lifecycle_info($ho, $mode) +} + sub host_shared_mark_ready($$;$$) { my ($ho,$sharetype, $oldstate, $newstate) = @_; diff --git a/schema/host-lifecycle.sql b/schema/host-lifecycle.sql new file mode 100644 index 00000000..7f1f5bb0 --- /dev/null +++ b/schema/host-lifecycle.sql @@ -0,0 +1,43 @@ +-- ##OSSTEST## 012 Preparatory +-- +-- Records the jobs which have touched a host, for host sharing/reuse +-- The information here is ephemeral - it is cleared when a host is +-- reinitialised. The information is persisted by being copied +-- into a runvar for each job. + +CREATE SEQUENCE host_lifecycle_lcseq_seq + NO CYCLE; + +CREATE TABLE host_lifecycle ( + hostname TEXT NOT NULL, + lcseq INTEGER NOT NULL DEFAULT nextval('host_lifecycle_lcseq_seq'), + taskid INTEGER NOT NULL, -- no constraint, tasks can get deleted + flight INTEGER, + job TEXT, + stepno INTEGER, + ident TEXT, + isprep BOOLEAN, + PRIMARY KEY (hostname, lcseq), +-- restype TEXT GENERATED ALWAYS AS ('host'), +-- FOREIGN KEY (restype,hostname) REFERENCES resources(restype, resname), +-- ^ those two omitted because not supported until pgsql 13 +-- FOREIGN KEY (flight, job) REFERENCES jobs(flight, job), +-- ^ omitted because the next constraint implies it + FOREIGN KEY (flight, job, stepno) REFERENCES steps(flight, job, stepno), + CHECK (( + flight IS NOT NULL AND + job IS NOT NULL AND + stepno IS NOT NULL AND + ident IS NOT NULL AND + isprep IS NOT NULL + ) OR ( + flight IS NULL AND + job IS NULL AND + stepno IS NULL AND + ident IS NULL AND + isprep IS NULL + )) +); + +ALTER SEQUENCE host_lifecycle_lcseq_seq + OWNED BY host_lifecycle.lcseq; From patchwork Wed Oct 7 18:00:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821527 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F100217CF for ; Wed, 7 Oct 2020 18:28:26 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD3792168B for ; Wed, 7 Oct 2020 18:28:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD3792168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3708.11053 (Exim 4.92) (envelope-from ) id 1kQEAJ-0003kF-Ug; Wed, 07 Oct 2020 18:27:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3708.11053; Wed, 07 Oct 2020 18:27:51 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAI-0003j1-PV; Wed, 07 Oct 2020 18:27:50 +0000 Received: by outflank-mailman (input) for mailman id 3708; Wed, 07 Oct 2020 18:27:49 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6i-00072Q-RM for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:08 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9e085007-4ceb-414a-9a23-2ce256872ea1; Wed, 07 Oct 2020 18:21:52 +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 1kQDk9-0007CF-W7; Wed, 07 Oct 2020 19:00:50 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE6i-00072Q-RM for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:08 +0000 X-Inumbo-ID: 9e085007-4ceb-414a-9a23-2ce256872ea1 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9e085007-4ceb-414a-9a23-2ce256872ea1; Wed, 07 Oct 2020 18:21:52 +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 1kQDk9-0007CF-W7; Wed, 07 Oct 2020 19:00:50 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 67/82] host lifecycle: Fix detection of concurrent jobs Date: Wed, 7 Oct 2020 19:00:09 +0100 Message-Id: <20201007180024.7932-68-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 The previous algorithm was wrong here. This commit was originally considerably later than the previous one. I'm avoiding squshing this commit, to make future archaeology easier. The effect of the bug is to report other tasks as live too often, so hosts show up as shared rather than reused. Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index cf82b4cf..3a8308e9 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -561,17 +561,15 @@ END END my $ojvn = "$ho->{Ident}_lifecycle"; - my $firstrun; if (length $r{$ojvn}) { my ($oldsigil,) = reverse split / /, $r{$ojvn}; $oldsigil = '' unless $oldsigil =~ m/^\W$/; return if $newsigil ne '' && $oldsigil eq $newsigil; - } else { - $firstrun = 1; } my @lifecycle; + my $seen_us; db_retry($dbh_tests,[], sub { my $elided; @lifecycle = (); @@ -581,10 +579,10 @@ END while (my $o = $scanq->fetchrow_hashref()) { my $olive = - # Any job which appeared since we started thinking - # about this must have been concurrent with us, - # even if it is dead now. - (!$firstrun || $o->{live}) && + # Any job with any entry after we put ourselves in the + # table must have been concurrent with us, even if it is + # dead now. + ($seen_us || $o->{live}) && # If this task is still live, we need to have something # with a live mark, generally all the prep will have # occurred already, so we don't mark the prep as live @@ -597,6 +595,7 @@ END $o->{job} eq $job) { # Don't put the + mark on our own entries. $olivemark = ''; + $seen_us = 1; } my $oisprepmark = !!$o->{isprep} && '@'; From patchwork Wed Oct 7 18:00:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821505 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E662A17D2 for ; Wed, 7 Oct 2020 18:28:08 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6FD521789 for ; Wed, 7 Oct 2020 18:28:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6FD521789 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3682.10759 (Exim 4.92) (envelope-from ) id 1kQE9S-0001Ga-G2; Wed, 07 Oct 2020 18:26:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3682.10759; Wed, 07 Oct 2020 18:26:58 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9S-0001GC-Av; Wed, 07 Oct 2020 18:26:58 +0000 Received: by outflank-mailman (input) for mailman id 3682; Wed, 07 Oct 2020 18:26:57 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4h-00072Q-M9 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:03 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e10c92d9-2c86-48a5-a857-634025a4b23d; Wed, 07 Oct 2020 18:20:26 +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 1kQDkA-0007CF-6l; Wed, 07 Oct 2020 19:00:50 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4h-00072Q-M9 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:03 +0000 X-Inumbo-ID: e10c92d9-2c86-48a5-a857-634025a4b23d Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e10c92d9-2c86-48a5-a857-634025a4b23d; Wed, 07 Oct 2020 18:20:26 +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 1kQDkA-0007CF-6l; Wed, 07 Oct 2020 19:00:50 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 68/82] host lifecycle: Prevent referential integrity violation Date: Wed, 7 Oct 2020 19:00:10 +0100 Message-Id: <20201007180024.7932-69-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson We can't use normal constraints for either of these, sadly. We can make the constraints into a single query which says "OK". Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index 3a8308e9..f69ce277 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -553,6 +553,28 @@ END ON h.taskid = t.taskid WHERE h.hostname = ? ORDER BY h.lcseq; +END + # We simulate two foreign key constraints which can't be in the + # db schema, by checking the values we are going to insert. + # + # For "resources" we would need a foreign key constraint + # with a literal value as part of the foreign key, which is + # not supported until PostgreSQL 13. + # + # For "tasks" we only want to apply the constraint on inserts into + # "host_lifecycle" - in particular, we want to allow delet6ions + # from "tasks" to render the taskid foreign key unresolvable. + # This could be done with a trigger, but since here is the only + # place we do insertions into host_lifecycle, this seems easier. + my $constraintsq = $dbh_tests->prepare(<prepare(<{stepno}$osuffix"; } } + $constraintsq->execute($hostname, $ttaskid); + $constraintsq->fetchrow_array() or confess "$hostname ?"; + if (defined $flight) { $insertq->execute($hostname, $ttaskid, $flight, $job, From patchwork Wed Oct 7 18:00:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821461 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04B2114D5 for ; Wed, 7 Oct 2020 18:20:39 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CDBC621775 for ; Wed, 7 Oct 2020 18:20:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDBC621775 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3652.10627 (Exim 4.92) (envelope-from ) id 1kQE2J-0007mE-8x; Wed, 07 Oct 2020 18:19:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3652.10627; Wed, 07 Oct 2020 18:19:35 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2J-0007m5-4E; Wed, 07 Oct 2020 18:19:35 +0000 Received: by outflank-mailman (input) for mailman id 3652; Wed, 07 Oct 2020 18:19:33 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2H-00072Q-H9 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:33 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f893354c-fbd2-4f1f-81a5-8981f15d37d1; Wed, 07 Oct 2020 18:19:13 +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 1kQDkA-0007CF-DW; Wed, 07 Oct 2020 19:00:50 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2H-00072Q-H9 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:33 +0000 X-Inumbo-ID: f893354c-fbd2-4f1f-81a5-8981f15d37d1 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f893354c-fbd2-4f1f-81a5-8981f15d37d1; Wed, 07 Oct 2020 18:19:13 +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 1kQDkA-0007CF-DW; Wed, 07 Oct 2020 19:00:50 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 69/82] host lifecycle: Record lifecycle in db and runvar Date: Wed, 7 Oct 2020 19:00:11 +0100 Message-Id: <20201007180024.7932-70-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This is just the calls to host_update_lifecycle_info. Now the db table is Needed. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 2 ++ schema/host-lifecycle.sql | 2 +- ts-freebsd-host-install | 1 + ts-host-install | 1 + ts-host-reuse | 1 + ts-logs-capture | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 22141981..163862f8 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1418,6 +1418,8 @@ sub selecthost ($;$$) { } } + host_update_lifecycle_info($ho, $isprep ? 'selectprep' : 'select'); + return $ho; } diff --git a/schema/host-lifecycle.sql b/schema/host-lifecycle.sql index 7f1f5bb0..7e4fc2aa 100644 --- a/schema/host-lifecycle.sql +++ b/schema/host-lifecycle.sql @@ -1,4 +1,4 @@ --- ##OSSTEST## 012 Preparatory +-- ##OSSTEST## 012 Needed -- -- Records the jobs which have touched a host, for host sharing/reuse -- The information here is ephemeral - it is cleared when a host is diff --git a/ts-freebsd-host-install b/ts-freebsd-host-install index 9feb98cd..31e14d57 100755 --- a/ts-freebsd-host-install +++ b/ts-freebsd-host-install @@ -295,3 +295,4 @@ setup_netboot_local($ho); # Proceed with the install install(); +host_update_lifecycle_info($ho, 'wiped'); diff --git a/ts-host-install b/ts-host-install index 5badc706..276c6af8 100755 --- a/ts-host-install +++ b/ts-host-install @@ -297,3 +297,4 @@ END } install(); +host_update_lifecycle_info($ho, 'wiped'); diff --git a/ts-host-reuse b/ts-host-reuse index 0ecbb0bd..85beb51e 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -158,6 +158,7 @@ sub act_post_test () { return unless $ho->{Shared}; die unless $ho->{Shared}{State} eq 'mid-test'; post_test_cleanup(); + host_update_lifecycle_info($ho, 'final'); host_shared_mark_ready($ho, $sharetype, 'mid-test', 'ready'); } diff --git a/ts-logs-capture b/ts-logs-capture index ec494fe1..0b0b6af6 100755 --- a/ts-logs-capture +++ b/ts-logs-capture @@ -309,3 +309,4 @@ if (fetch_logs_host()) { } } logm("logs captured to $stash"); +host_update_lifecycle_info($ho, 'final'); From patchwork Wed Oct 7 18:00:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821543 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5CF714D5 for ; Wed, 7 Oct 2020 18:28:47 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B0B72168B for ; Wed, 7 Oct 2020 18:28:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B0B72168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3725.11170 (Exim 4.92) (envelope-from ) id 1kQEAn-000544-19; Wed, 07 Oct 2020 18:28:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3725.11170; Wed, 07 Oct 2020 18:28:20 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAl-00051z-9S; Wed, 07 Oct 2020 18:28:19 +0000 Received: by outflank-mailman (input) for mailman id 3725; Wed, 07 Oct 2020 18:28:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5a-00072Q-Oa for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:58 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0cc44eaa-1422-4344-b38e-de78d4195244; Wed, 07 Oct 2020 18:21:14 +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 1kQDkA-0007CF-Jv; Wed, 07 Oct 2020 19:00:50 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5a-00072Q-Oa for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:58 +0000 X-Inumbo-ID: 0cc44eaa-1422-4344-b38e-de78d4195244 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0cc44eaa-1422-4344-b38e-de78d4195244; Wed, 07 Oct 2020 18:21:14 +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 1kQDkA-0007CF-Jv; Wed, 07 Oct 2020 19:00:50 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 70/82] sg-report-flight: Refactor runvar access Date: Wed, 7 Oct 2020 19:00:12 +0100 Message-Id: <20201007180024.7932-71-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Collect the runvars query into local perl variables. This will allow us to reuse the information without going back to the db. No functional change. Signed-off-by: Ian Jackson --- sg-report-flight | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index 07834581..281361c0 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -1142,6 +1142,16 @@ END my $ji = $htmlout_jobq->fetchrow_hashref(); die unless $ji; + my $varsq= db_prepare(<execute($fi->{Flight}, $job); + my $runvar_table = $varsq->fetchall_arrayref({}); + my %runvar_map; + $runvar_map{$_->{name}} = $_ foreach @$runvar_table; + print H <$title @@ -1244,14 +1254,8 @@ END

Test control variables

END - my $varsq= db_prepare(<execute($fi->{Flight}, $job); - while (my $varrow= $varsq->fetchrow_arrayref()) { - my ($vn,$vv,$synth) = (@$varrow); + foreach my $varrow (@$runvar_table) { + my ($vn,$vv,$synth) = (@$varrow{qw(name val synth)}); print H ""; print H "
NameValueSource
".encode_entities($vn).""; my $url; From patchwork Wed Oct 7 18:00:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821545 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1FF1A17CF for ; Wed, 7 Oct 2020 18:28:53 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E89C82168B for ; Wed, 7 Oct 2020 18:28:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E89C82168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3743.11238 (Exim 4.92) (envelope-from ) id 1kQEB0-0005iS-LC; Wed, 07 Oct 2020 18:28:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3743.11238; Wed, 07 Oct 2020 18:28:34 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAz-0005hm-Qh; Wed, 07 Oct 2020 18:28:33 +0000 Received: by outflank-mailman (input) for mailman id 3743; Wed, 07 Oct 2020 18:28:32 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4I-00072Q-LE for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:38 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8753e621-b9c0-488d-8e4f-27cb8b4ac0a2; Wed, 07 Oct 2020 18:20:14 +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 1kQDkA-0007CF-QM; Wed, 07 Oct 2020 19:00:50 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4I-00072Q-LE for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:21:38 +0000 X-Inumbo-ID: 8753e621-b9c0-488d-8e4f-27cb8b4ac0a2 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8753e621-b9c0-488d-8e4f-27cb8b4ac0a2; Wed, 07 Oct 2020 18:20:14 +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 1kQDkA-0007CF-QM; Wed, 07 Oct 2020 19:00:50 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 71/82] resource reporting, nfc: split a here document Date: Wed, 7 Oct 2020 19:00:13 +0100 Message-Id: <20201007180024.7932-72-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Signed-off-by: Ian Jackson --- sg-report-flight | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sg-report-flight b/sg-report-flight index 281361c0..a1f424c5 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -1213,6 +1213,9 @@ END
Status:$ji->{status}

+END + + print H <Logfiles etc. For main test script logfiles, see entries in steps table.

From patchwork Wed Oct 7 18:00:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821455 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6E0ED14D5 for ; Wed, 7 Oct 2020 18:20:10 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3375B2177B for ; Wed, 7 Oct 2020 18:20:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3375B2177B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3645.10554 (Exim 4.92) (envelope-from ) id 1kQE1o-0007CV-Ss; Wed, 07 Oct 2020 18:19:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3645.10554; Wed, 07 Oct 2020 18:19:04 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1o-0007CO-Pg; Wed, 07 Oct 2020 18:19:04 +0000 Received: by outflank-mailman (input) for mailman id 3645; Wed, 07 Oct 2020 18:19:03 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1n-00072Q-Fm for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:03 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 348605a2-3329-47c3-ae29-9223e6c5d1b0; Wed, 07 Oct 2020 18:18:58 +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 1kQDkB-0007CF-1O; Wed, 07 Oct 2020 19:00:51 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE1n-00072Q-Fm for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:03 +0000 X-Inumbo-ID: 348605a2-3329-47c3-ae29-9223e6c5d1b0 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 348605a2-3329-47c3-ae29-9223e6c5d1b0; Wed, 07 Oct 2020 18:18:58 +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 1kQDkB-0007CF-1O; Wed, 07 Oct 2020 19:00:51 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 72/82] resource reporting: Report host reuse/sharing in job report Date: Wed, 7 Oct 2020 19:00:14 +0100 Message-Id: <20201007180024.7932-73-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Compatibility: in principle this might generate erroneous reports which omit sharing/reuse information for allocations made by jobs using older versions of osstest. However, we do not share or reuse hosts across different osstest versions, so this cannot occur. Signed-off-by: Ian Jackson --- sg-report-flight | 331 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 330 insertions(+), 1 deletion(-) diff --git a/sg-report-flight b/sg-report-flight index a1f424c5..0413a730 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -29,9 +29,10 @@ use POSIX; use IPC::Open2; use Data::Dumper; use File::Path; +use Carp; use Osstest; -use Osstest::Executive; +use Osstest::Executive qw(:DEFAULT :colours); our $specflight; our %specver; @@ -1122,6 +1123,68 @@ END return @failures; } +# Machinery for generating WITH ... VALUES common table expressions. +# Use it like this: +# +# 1. $some_accum = {} +# +# 2. valuestable_add_row($some_accum, $val, $val, $val) +# # ^ zero or more times +# +# 3. $qtxt = "WITH\n"; +# @qparams = (); +# valuestable_with(\$qtxt, \@qparams, 'cte_name', +# qw(txtcol1 txtcol2 intcol::integer boolcol::bool ...)); +# +# The resulting CTE table will have the name, and column names, +# you specified. For non-TEXT columns you must specify the type +# because [Postgre]SQL's type inference doesn't work properly here. +# +# valuestable_with will always leave $qtxt ending with ",\n" +# so you can call it multiple times. + +sub valuestable_add_row ($@) { + my ($accum, @row) = @_; + # $accum->{Ncols} + # $accum->{Params}[] + # $accum->{Qtxt} + $accum->{Ncols} //= scalar @row; + confess unless $accum->{Ncols} == @row; + push @{ $accum->{Params} }, @row; + $accum->{Qtxt} //= ''; + $accum->{Qtxt} =~ s/.$/$&,/; + $accum->{Qtxt} .= " (".join(',', ('?',) x @row).")\n"; +} +sub valuestable_with ($$$@) { + my ($qtxtr, $paramsr, $ctename, $accum, @cols) = @_; + my $limit = ''; + $accum->{Qtxt} //= do { + # Oh my god + # select * from (values ); + # => ERROR: syntax error at or near ")" + $limit = 'LIMIT 0'; + " (".join(',', + map { m/::/ ? "NULL::$'" : "NULL" } + @cols).")\n"; + }; + $accum->{Ncols} //= scalar @cols; + confess "$accum->{Ncols} != ".(scalar @cols) + unless $accum->{Ncols} == @cols; + my $cols = join(', ', @cols); + my $colsnotypes = join(', ', map { m/::/ ? $` : $_ } @cols); + $$qtxtr .= <{Qtxt} $limit) $ctename ($colsnotypes)), + +END + push @$paramsr, @{ $accum->{Params} // [ ] }; +} + +sub nullcols { + join ", ", map { m/::/ ? "NULL::$' as $`" : "NULL as $_" } @_; +} + sub htmloutjob ($$) { my ($fi,$job) = @_; return unless defined $htmldir; @@ -1213,6 +1276,272 @@ END Status:$ji->{status}

+END + + # ---------- resource reuse/sharing report ---------- + + # We translate the lifecycle runvars into a set of questions + # for the db. But rather than doing one db query for each + # such question, we aggregate the questions into VALUES + # expressions and ask the db to produce a collated list of + # relevant information. This has fewer round trips. + + my $shareq_elided_accum = {}; + my $shareq_tasks_accum = {}; + my $shareq_main_accum = {}; + foreach my $lc_var_row (@$runvar_table) { + next unless $lc_var_row->{name} =~ m{^(.*_?host)_lifecycle$}; + my $tident = $1; + my $hostname = ($runvar_map{$tident} // next)->{val}; + my $last_uncompr; + my $sort_index; + print DEBUG "SHARE LC $job $tident $lc_var_row->{val}\n"; + foreach (split / /, $lc_var_row->{val}) { + $sort_index++; + if (m/^[\@\+]$/) { + valuestable_add_row $shareq_elided_accum, + $tident, $hostname, undef, $&, $sort_index; + next; + } + if (m/^\[(\d+)\]$/) { # elided + valuestable_add_row $shareq_elided_accum, + $tident, $hostname, $1, undef, $sort_index; + next; + } + my $olive = s/^\+//; + if (m/^\?(\d+)$/) { # tasks + valuestable_add_row $shareq_tasks_accum, + $tident, $hostname, $olive+0, $1, $sort_index; + next; + } + my $oisprep = s/^\@//; + s{^\d+$}{ join ":$&", @$last_uncompr }e if $last_uncompr; + if (my ($tprefix, $oflight, $ojob, + $ostepno, $tsuffix, $oident) = + m{^((?:(\d+)\.)?([^:]+)?)\:(\d+)((?:,([^:]+))?)$}) { + # main + $last_uncompr = [ $tprefix, $tsuffix ]; + $oflight ||= $specflight; + $ojob ||= $job; + $oident ||= 'host'; + valuestable_add_row $shareq_main_accum, + $tident, $hostname, $oflight, $ojob, $ostepno, + $oisprep+0, $oident, $olive+0; + next; + } + confess "$tident $hostname $_ ?"; + } + } + my @shareq_params; + my $shareq_txt = <execute(@shareq_params); + + my $share_any; + my $altcolour=1; + while (my $srow = $shareq->fetchrow_hashref()) { + print DEBUG "SHARE SROW ".Dumper($srow); + print H <Task(s) which might have affected this job's host(s) +

+ + +END + my $bgcolour = report_altcolour($altcolour ^= 1); + printf H < + + +END + $srow->{tident}, + "$c{ResultsHtmlPubBaseUrl}/host/$srow->{hostname}.html", + $srow->{hostname}; + my $rel = $srow->{olive} ? + "" + : $srow->{prep_started} ? + "" + : + ""; + if (defined $srow->{flight}) { + my $furl = "$c{ReportHtmlPubBaseUrl}/$srow->{flight}/"; + my $jurl = "$furl/$srow->{job}/info.html"; + if ($srow->{flight} != $specflight) { + printf H <%s + +END + $furl, $srow->{flight}, + $jurl, $srow->{job}; + } elsif ($srow->{job} ne $job) { + printf H <this + +END + $jurl, $srow->{job}; + } else { + printf H < + + +END + } + printf H <%s + +END + encode_entities($srow->{oidents}), + map { $_ ? show_abs_time($_) : '' } + $srow->{prep_started}, + $srow->{rest_started}, + !$srow->{olive} && $srow->{finished}; + my $info = report_run_getinfo($srow); + print H <{ColourAttr}>$info->{Content} +END + } elsif (defined $srow->{elided}) { + printf H <{elided}; + +END + } elsif (defined $srow->{elided_sigil}) { + printf H < +this job incomplete, unknown number of other jobs elided + +END + } elsif (defined $srow->{taskid}) { + printf H <?%s: %s +END + $srow->{taskid}, + report_rogue_task_description($srow); + } else { + confess Dumper($srow)." ?"; + } + print H < +END + } + print H < END print H < X-Patchwork-Id: 11821493 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85CEB14D5 for ; Wed, 7 Oct 2020 18:27:59 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 590832168B for ; Wed, 7 Oct 2020 18:27:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 590832168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3699.10955 (Exim 4.92) (envelope-from ) id 1kQEA1-0002pX-2v; Wed, 07 Oct 2020 18:27:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3699.10955; Wed, 07 Oct 2020 18:27:32 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9z-0002oK-PO; Wed, 07 Oct 2020 18:27:31 +0000 Received: by outflank-mailman (input) for mailman id 3699; Wed, 07 Oct 2020 18:27:27 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2b-00072Q-Hn for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:53 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1ecb5c37-fa98-4803-bc1c-312631f56aa1; Wed, 07 Oct 2020 18:19:24 +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 1kQDkB-0007CF-8n; Wed, 07 Oct 2020 19:00:51 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2b-00072Q-Hn for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:53 +0000 X-Inumbo-ID: 1ecb5c37-fa98-4803-bc1c-312631f56aa1 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1ecb5c37-fa98-4803-bc1c-312631f56aa1; Wed, 07 Oct 2020 18:19:24 +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 1kQDkB-0007CF-8n; Wed, 07 Oct 2020 19:00:51 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 73/82] host reuse: sg-run-job: Reanme post-test-ok parameter Date: Wed, 7 Oct 2020 19:00:15 +0100 Message-Id: <20201007180024.7932-74-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson This is more accurate. No overall functional change. Signed-off-by: Ian Jackson --- sg-run-job | 2 +- ts-host-reuse | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sg-run-job b/sg-run-job index 1e2fcfee..2feb67d9 100755 --- a/sg-run-job +++ b/sg-run-job @@ -124,7 +124,7 @@ proc run-job {job} { set ok 0 } - if {$ok} { per-host-ts . = { ts-host-reuse post-test } } + if {$ok} { per-host-ts . = { ts-host-reuse post-test-ok } } if {$ok} { setstatus pass } if {[llength $need_build_host] && $ok} { jobdb::preserve-task 90 } diff --git a/ts-host-reuse b/ts-host-reuse index 85beb51e..aad45bdd 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -152,7 +152,7 @@ sub act_start_test () { host_shared_mark_ready($ho, $sharetype, \%oldstate, 'mid-test'); } -sub act_post_test () { +sub act_post_test_ok () { compute_test_sharetype(); $ho = selecthost($whhost); return unless $ho->{Shared}; From patchwork Wed Oct 7 18:00:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821517 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D4D417D2 for ; Wed, 7 Oct 2020 18:28:14 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 40A302168B for ; Wed, 7 Oct 2020 18:28:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40A302168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3705.11027 (Exim 4.92) (envelope-from ) id 1kQEAD-0003RO-S6; Wed, 07 Oct 2020 18:27:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3705.11027; Wed, 07 Oct 2020 18:27:45 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAC-0003Pd-Fp; Wed, 07 Oct 2020 18:27:44 +0000 Received: by outflank-mailman (input) for mailman id 3705; Wed, 07 Oct 2020 18:27:41 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2g-00072Q-Hx for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:58 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1118d174-7391-494e-9ba2-91552627002b; Wed, 07 Oct 2020 18:19:26 +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 1kQDkB-0007CF-Gj; Wed, 07 Oct 2020 19:00:51 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2g-00072Q-Hx for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:19:58 +0000 X-Inumbo-ID: 1118d174-7391-494e-9ba2-91552627002b Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1118d174-7391-494e-9ba2-91552627002b; Wed, 07 Oct 2020 18:19:26 +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 1kQDkB-0007CF-Gj; Wed, 07 Oct 2020 19:00:51 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 74/82] host reuse: ts-host-reuse: Prepare for argument handling Date: Wed, 7 Oct 2020 19:00:16 +0100 Message-Id: <20201007180024.7932-75-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson No functional change. Signed-off-by: Ian Jackson --- ts-host-reuse | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ts-host-reuse b/ts-host-reuse index aad45bdd..21d77500 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -48,9 +48,9 @@ use Osstest::TestSupport; tsreadconfig(); -die unless @ARGV==2; - -our ($action, $whhost) = @ARGV; +die unless @ARGV>=2; +our $action = shift @ARGV; +our $whhost = shift @ARGV; our $ho; @@ -137,6 +137,7 @@ sub noop_if_playing () { #---------- actions ---------- sub act_prealloc () { + die if @ARGV; noop_if_playing(); compute_test_sharetype(); $ho = selecthost($whhost, undef, 1); @@ -145,6 +146,7 @@ sub act_prealloc () { } sub act_start_test () { + die if @ARGV; compute_test_sharetype(); $ho = selecthost($whhost); return unless $ho->{Shared}; @@ -153,6 +155,7 @@ sub act_start_test () { } sub act_post_test_ok () { + die if @ARGV; compute_test_sharetype(); $ho = selecthost($whhost); return unless $ho->{Shared}; From patchwork Wed Oct 7 18:00:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821491 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 283AD17CF for ; Wed, 7 Oct 2020 18:27:57 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1A402168B for ; Wed, 7 Oct 2020 18:27:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1A402168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3697.10928 (Exim 4.92) (envelope-from ) id 1kQE9x-0002gA-EN; Wed, 07 Oct 2020 18:27:29 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3697.10928; Wed, 07 Oct 2020 18:27:29 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9w-0002fj-OQ; Wed, 07 Oct 2020 18:27:28 +0000 Received: by outflank-mailman (input) for mailman id 3697; Wed, 07 Oct 2020 18:27:25 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE72-00072Q-S6 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:28 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1300e0d7-471c-47ba-a7b7-9128edadea9e; Wed, 07 Oct 2020 18:22:01 +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 1kQDkB-0007CF-Od; Wed, 07 Oct 2020 19:00:51 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE72-00072Q-S6 for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:24:28 +0000 X-Inumbo-ID: 1300e0d7-471c-47ba-a7b7-9128edadea9e Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1300e0d7-471c-47ba-a7b7-9128edadea9e; Wed, 07 Oct 2020 18:22:01 +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 1kQDkB-0007CF-Od; Wed, 07 Oct 2020 19:00:51 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 75/82] host reuse: New protocol between sg-run-job and ts-host-reuse Date: Wed, 7 Oct 2020 19:00:17 +0100 Message-Id: <20201007180024.7932-76-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Abolish post-test-ok (which runs only if successful) and replace it with final (which sets the runvar to indicate finality, and runs regardless). This allows a subsequent job which reuses the host to see that this job had finished using the host. This is relevant for builds, where a host can be reused even after a failed job. "Lies", where we claim the use of the host was done, are avoided (barring unlikely races) because selecthost de-finalises the runvar. Signed-off-by: Ian Jackson --- sg-run-job | 8 +++++++- ts-host-reuse | 25 ++++++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/sg-run-job b/sg-run-job index 2feb67d9..dd76d4f2 100755 --- a/sg-run-job +++ b/sg-run-job @@ -124,7 +124,13 @@ proc run-job {job} { set ok 0 } - if {$ok} { per-host-ts . = { ts-host-reuse post-test-ok } } + if {[llength $need_build_host]} { + run-ts !broken = ts-host-reuse final host + } + set reuse {} + if {$ok} { lappend reuse --post-test-ok } + eval [list per-host-ts !broken = { ts-host-reuse final }] $reuse + if {$ok} { setstatus pass } if {[llength $need_build_host] && $ok} { jobdb::preserve-task 90 } diff --git a/ts-host-reuse b/ts-host-reuse index 21d77500..ae967304 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -154,15 +154,22 @@ sub act_start_test () { host_shared_mark_ready($ho, $sharetype, \%oldstate, 'mid-test'); } -sub act_post_test_ok () { - die if @ARGV; - compute_test_sharetype(); - $ho = selecthost($whhost); - return unless $ho->{Shared}; - die unless $ho->{Shared}{State} eq 'mid-test'; - post_test_cleanup(); - host_update_lifecycle_info($ho, 'final'); - host_shared_mark_ready($ho, $sharetype, 'mid-test', 'ready'); +sub act_final () { + if (!@ARGV) { + $ho = selecthost($whhost); + return unless $ho; + host_update_lifecycle_info($ho, 'final'); + } elsif ("@ARGV" eq "--post-test-ok") { + compute_test_sharetype(); + $ho = selecthost($whhost); + return unless $ho->{Shared}; + die unless $ho->{Shared}{State} eq 'mid-test'; + post_test_cleanup(); + host_update_lifecycle_info($ho, 'final'); + host_shared_mark_ready($ho, $sharetype, 'mid-test', 'ready'); + } else { + die; + } } $action =~ y/-/_/; From patchwork Wed Oct 7 18:00:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821549 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0406414D5 for ; Wed, 7 Oct 2020 18:28:56 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C6A052168B for ; Wed, 7 Oct 2020 18:28:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6A052168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3728.11183 (Exim 4.92) (envelope-from ) id 1kQEAp-0005BN-E6; Wed, 07 Oct 2020 18:28:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3728.11183; Wed, 07 Oct 2020 18:28:23 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAn-00059i-V7; Wed, 07 Oct 2020 18:28:21 +0000 Received: by outflank-mailman (input) for mailman id 3728; Wed, 07 Oct 2020 18:28:17 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3U-00072Q-JQ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:48 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 63ddb3e7-36d5-4845-aacd-4b3ceeeb0b9b; Wed, 07 Oct 2020 18:19:48 +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 1kQDkB-0007CF-VH; Wed, 07 Oct 2020 19:00:52 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3U-00072Q-JQ for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:48 +0000 X-Inumbo-ID: 63ddb3e7-36d5-4845-aacd-4b3ceeeb0b9b Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 63ddb3e7-36d5-4845-aacd-4b3ceeeb0b9b; Wed, 07 Oct 2020 18:19:48 +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 1kQDkB-0007CF-VH; Wed, 07 Oct 2020 19:00:52 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 76/82] sg-report-flight: Reformat slightly Date: Wed, 7 Oct 2020 19:00:18 +0100 Message-Id: <20201007180024.7932-77-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 This is more regular and will make the next commit easier to understand. Signed-off-by: Ian Jackson --- sg-report-flight | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index 0413a730..7dc218cf 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -1472,9 +1472,11 @@ END $srow->{tident}, "$c{ResultsHtmlPubBaseUrl}/host/$srow->{hostname}.html", $srow->{hostname}; - my $rel = $srow->{olive} ? + my $rel = + $srow->{olive} ? "" - : $srow->{prep_started} ? + : + $srow->{prep_started} ? "" : ""; From patchwork Wed Oct 7 18:00:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821533 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B132117CF for ; Wed, 7 Oct 2020 18:28:37 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8591921707 for ; Wed, 7 Oct 2020 18:28:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8591921707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3713.11112 (Exim 4.92) (envelope-from ) id 1kQEAX-0004Nc-3h; Wed, 07 Oct 2020 18:28:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3713.11112; Wed, 07 Oct 2020 18:28:04 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAW-0004Ls-0B; Wed, 07 Oct 2020 18:28:04 +0000 Received: by outflank-mailman (input) for mailman id 3713; Wed, 07 Oct 2020 18:27: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 1kQE3P-00072Q-JN for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:43 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2aa5d4f6-6676-4d7e-804c-ee3b484a641d; Wed, 07 Oct 2020 18:19:47 +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 1kQDkC-0007CF-7M; Wed, 07 Oct 2020 19:00:52 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3P-00072Q-JN for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:43 +0000 X-Inumbo-ID: 2aa5d4f6-6676-4d7e-804c-ee3b484a641d Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2aa5d4f6-6676-4d7e-804c-ee3b484a641d; Wed, 07 Oct 2020 18:19:47 +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 1kQDkC-0007CF-7M; Wed, 07 Oct 2020 19:00:52 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 77/82] sg-report-flight: Improvements to other job (share/reuse) reporting Date: Wed, 7 Oct 2020 19:00:19 +0100 Message-Id: <20201007180024.7932-78-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 * Prefer to show "prep" (purple) rather than "share". * Show our own relationship, in particular to show if it was prep. Signed-off-by: Ian Jackson --- sg-report-flight | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index 7dc218cf..2a79db13 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -1473,12 +1473,12 @@ END "$c{ResultsHtmlPubBaseUrl}/host/$srow->{hostname}.html", $srow->{hostname}; my $rel = - $srow->{olive} ? - "" - : $srow->{prep_started} ? "" : + $srow->{olive} ? + "" + : ""; if (defined $srow->{flight}) { my $furl = "$c{ReportHtmlPubBaseUrl}/$srow->{flight}/"; @@ -1499,8 +1499,10 @@ END END $jurl, $srow->{job}; } else { - printf H < + confess unless $rel =~ m{([0-9a-z. ]+)\$}; + $rel = '' if $1 eq 'reuse'; + printf H <this END From patchwork Wed Oct 7 18:00:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821511 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F56917CF for ; Wed, 7 Oct 2020 18:28:12 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1146D21775 for ; Wed, 7 Oct 2020 18:28:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1146D21775 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3701.10978 (Exim 4.92) (envelope-from ) id 1kQEA4-00032C-VX; Wed, 07 Oct 2020 18:27:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3701.10978; Wed, 07 Oct 2020 18:27:36 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEA4-00030S-01; Wed, 07 Oct 2020 18:27:36 +0000 Received: by outflank-mailman (input) for mailman id 3701; Wed, 07 Oct 2020 18:27:31 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4w-00072Q-Mt for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:18 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6c4a2380-59ee-4efa-b349-fac56b8f829b; Wed, 07 Oct 2020 18:20:31 +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 1kQDkC-0007CF-Eb; Wed, 07 Oct 2020 19:00:52 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4w-00072Q-Mt for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:18 +0000 X-Inumbo-ID: 6c4a2380-59ee-4efa-b349-fac56b8f829b Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6c4a2380-59ee-4efa-b349-fac56b8f829b; Wed, 07 Oct 2020 18:20:31 +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 1kQDkC-0007CF-Eb; Wed, 07 Oct 2020 19:00:52 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 78/82] flight other job reporting: Put nulls last in the report Date: Wed, 7 Oct 2020 19:00:20 +0100 Message-Id: <20201007180024.7932-79-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson Cosmetic change only, but this makes the results easier to understand. Signed-off-by: Ian Jackson --- sg-report-flight | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sg-report-flight b/sg-report-flight index 2a79db13..d8829932 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -1434,7 +1434,10 @@ END SELECT * FROM r_elided ORDER BY tident, hostname, kind_sort, - finished, prep_started, rest_started, flight, job, oidents, + prep_started NULLS LAST, + rest_started NULLS LAST, + finished NULLS LAST, + flight, job, oidents, sort_index END From patchwork Wed Oct 7 18:00:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821465 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E37917CF for ; Wed, 7 Oct 2020 18:27:22 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 134A221707 for ; Wed, 7 Oct 2020 18:27:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 134A221707 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3677.10695 (Exim 4.92) (envelope-from ) id 1kQE9L-0000wu-47; Wed, 07 Oct 2020 18:26:51 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3677.10695; Wed, 07 Oct 2020 18:26:51 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9K-0000wd-Ps; Wed, 07 Oct 2020 18:26:50 +0000 Received: by outflank-mailman (input) for mailman id 3677; Wed, 07 Oct 2020 18:26:49 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5B-00072Q-Nf for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:33 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5aab6441-1978-40d2-b11a-5aa8d7b68ec3; Wed, 07 Oct 2020 18:20:59 +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 1kQDkC-0007CF-Nl; Wed, 07 Oct 2020 19:00:52 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE5B-00072Q-Nf for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:33 +0000 X-Inumbo-ID: 5aab6441-1978-40d2-b11a-5aa8d7b68ec3 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5aab6441-1978-40d2-b11a-5aa8d7b68ec3; Wed, 07 Oct 2020 18:20:59 +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 1kQDkC-0007CF-Nl; Wed, 07 Oct 2020 19:00:52 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Jackson Subject: [OSSTEST PATCH 79/82] flight other job reporting: Further improvements to ordering Date: Wed, 7 Oct 2020 19:00:21 +0100 Message-Id: <20201007180024.7932-80-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 From: Ian Jackson We want to definitely put these NULLs last. Signed-off-by: Ian Jackson --- sg-report-flight | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index d8829932..8f99bb69 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -1389,7 +1389,9 @@ END r_main AS (SELECT tident, hostname, bool_or(olive) AS olive, - 1 AS kind_sort, + CASE WHEN min(prep_started) + IS NOT NULL + THEN 1 ELSE 3 END AS kind_sort, flight, job, (SELECT status FROM jobs @@ -1416,7 +1418,9 @@ END r_elided AS (SELECT tident, hostname, FALSE as olive, - 2 AS kind_sort, + CASE WHEN count + IS NOT NULL + THEN 2 ELSE 4 END AS kind_sort, $nullcols_main, $nullcols_tasks, count AS elided, From patchwork Wed Oct 7 18:00:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821475 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 440D117CF for ; Wed, 7 Oct 2020 18:27:40 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 19CD62168B for ; Wed, 7 Oct 2020 18:27:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19CD62168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3679.10718 (Exim 4.92) (envelope-from ) id 1kQE9M-00011E-W3; Wed, 07 Oct 2020 18:26:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3679.10718; Wed, 07 Oct 2020 18:26:52 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9M-000110-J9; Wed, 07 Oct 2020 18:26:52 +0000 Received: by outflank-mailman (input) for mailman id 3679; Wed, 07 Oct 2020 18:26:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4r-00072Q-Ma for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:13 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 63f7e1ad-c494-4b89-b87a-6c792056477b; Wed, 07 Oct 2020 18:20:30 +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 1kQDkC-0007CF-V0; Wed, 07 Oct 2020 19:00:53 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE4r-00072Q-Ma for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:22:13 +0000 X-Inumbo-ID: 63f7e1ad-c494-4b89-b87a-6c792056477b Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 63f7e1ad-c494-4b89-b87a-6c792056477b; Wed, 07 Oct 2020 18:20:30 +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 1kQDkC-0007CF-V0; Wed, 07 Oct 2020 19:00:53 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 80/82] tsreadconfig: Change misleading "setting" message Date: Wed, 7 Oct 2020 19:00:22 +0100 Message-Id: <20201007180024.7932-81-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 These are the *existing* runvars and it is confusing that we print "setting" for them. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 163862f8..f2d8a0e1 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -210,7 +210,7 @@ END while ($row= $q->fetchrow_hashref()) { $r{ $row->{name} }= $row->{val}; $r_notsynth{ $row->{name} }= !$row->{synth}; - logm("setting $row->{name}=$row->{val}"); + logm("runvar $row->{name}=$row->{val}"); } $q->finish(); }); From patchwork Wed Oct 7 18:00:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821537 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC96D17CF for ; Wed, 7 Oct 2020 18:28:40 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C48432168B for ; Wed, 7 Oct 2020 18:28:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C48432168B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3714.11123 (Exim 4.92) (envelope-from ) id 1kQEAa-0004VD-1i; Wed, 07 Oct 2020 18:28:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3714.11123; Wed, 07 Oct 2020 18:28:07 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQEAY-0004TL-Cq; Wed, 07 Oct 2020 18:28:06 +0000 Received: by outflank-mailman (input) for mailman id 3714; Wed, 07 Oct 2020 18:28:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3K-00072Q-JE for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:38 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 445c0d87-e272-473b-9656-7b1803bf3f30; Wed, 07 Oct 2020 18:19:45 +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 1kQDkD-0007CF-76; Wed, 07 Oct 2020 19:00:53 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE3K-00072Q-JE for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:38 +0000 X-Inumbo-ID: 445c0d87-e272-473b-9656-7b1803bf3f30 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 445c0d87-e272-473b-9656-7b1803bf3f30; Wed, 07 Oct 2020 18:19:45 +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 1kQDkD-0007CF-76; Wed, 07 Oct 2020 19:00:53 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 81/82] sg-report-flight: Sharing reports: more task finished info Date: Wed, 7 Oct 2020 19:00:23 +0100 Message-Id: <20201007180024.7932-82-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 Other steps from jobs affecting this host either started after we are running, and therefore didn't affect the stuff we're reporting, or already in the db. Furthermore, any such effects for steps which have finished must have completed by the max finished time But if there are unfinished steps, we don't know the finish time. Signed-off-by: Ian Jackson --- sg-report-flight | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index 8f99bb69..33f953ca 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -1355,7 +1355,8 @@ END # table rows to the overall union (sum type) rows. my $nullcols_main = nullcols(qw( flight::integer job status oidents - started::integer rest_started::integer finished::integer + started::integer rest_started::integer + finished::integer all_finished::boolean )); my $nullcols_tasks = nullcols(qw( taskid::integer type refkey username comment @@ -1382,7 +1383,11 @@ END (SELECT max(finished) FROM steps s WHERE s.flight = q.flight - AND s.job = q.job) AS finished + AND s.job = q.job) AS finished, + (SELECT every(finished IS NOT NULL) + FROM steps s + WHERE s.flight = q.flight + AND s.job = q.job) AS all_finished FROM Q ORDER BY q.tident), @@ -1401,6 +1406,7 @@ END min(prep_started) AS prep_started, min(rest_started) AS rest_started, max(finished) AS finished, + every(all_finished) AS all_finished, $nullcols_tasks, $nullcols_elided, NULL::integer AS sort_index @@ -1466,7 +1472,7 @@ END END @@ -1522,7 +1528,7 @@ END map { $_ ? show_abs_time($_) : '' } $srow->{prep_started}, $srow->{rest_started}, - !$srow->{olive} && $srow->{finished}; + (!$srow->{olive} || $srow->{all_finished}) && $srow->{finished}; my $info = report_run_getinfo($srow); print H <{ColourAttr}>$info->{Content} From patchwork Wed Oct 7 18:00:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11821477 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A6EC714D5 for ; Wed, 7 Oct 2020 18:27:42 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CBF821775 for ; Wed, 7 Oct 2020 18:27:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CBF821775 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.3691.10867 (Exim 4.92) (envelope-from ) id 1kQE9k-00026I-F1; Wed, 07 Oct 2020 18:27:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 3691.10867; Wed, 07 Oct 2020 18:27:16 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE9k-00025O-0b; Wed, 07 Oct 2020 18:27:16 +0000 Received: by outflank-mailman (input) for mailman id 3691; Wed, 07 Oct 2020 18:27:14 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2q-00072Q-Iy for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:08 +0000 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1b6a0a65-23e5-4aea-a941-1dd37c7d206f; Wed, 07 Oct 2020 18:19:32 +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 1kQDkE-0007CF-6h; Wed, 07 Oct 2020 19:00:54 +0100 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kQE2q-00072Q-Iy for xen-devel@lists.xenproject.org; Wed, 07 Oct 2020 18:20:08 +0000 X-Inumbo-ID: 1b6a0a65-23e5-4aea-a941-1dd37c7d206f Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1b6a0a65-23e5-4aea-a941-1dd37c7d206f; Wed, 07 Oct 2020 18:19:32 +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 1kQDkE-0007CF-6h; Wed, 07 Oct 2020 19:00:54 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 82/82] sg-report-flight: Word-wrapping improvements to job and step names Date: Wed, 7 Oct 2020 19:00:24 +0100 Message-Id: <20201007180024.7932-83-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201007180024.7932-1-iwj@xenproject.org> References: <20201007180024.7932-1-iwj@xenproject.org> MIME-Version: 1.0 Use . Signed-off-by: Ian Jackson --- sg-report-flight | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index 33f953ca..a07e03cb 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -1185,6 +1185,15 @@ sub nullcols { join ", ", map { m/::/ ? "NULL::$' as $`" : "NULL as $_" } @_; } +sub encode_with_wbrs ($) { + my ($s) = @_; + my $re = qr{[-/]}; + join '', map { + my $b = s{^$re}{} ? (''. $& . '⁠') : ''; + $b.encode_entities($_); + } split m{(?=$re)}, $s; +} + sub htmloutjob ($$) { my ($fi,$job) = @_; return unless defined $htmldir; @@ -1666,11 +1675,9 @@ END print H "\n"; foreach my $col (@cols) { - my $th= $col; - $th =~ s/\-/ $&/g; print H ""; } @@ -1726,7 +1733,8 @@ END next if $this[1] == $worst[1] && $ei->{Step}{status} ne 'pass'; @worst=@this; push @worst, - encode_entities("$ei->{Step}{stepno}. $ei->{Step}{testid}"); + encode_entities("$ei->{Step}{stepno}. "). + encode_with_wbrs($ei->{Step}{testid}); } push @worstrow1, ""; push @worstrow2, "";
role
(here) +
hostname +rel. +flight +job +role(s)
(there) +
install / prep.
started +
use
started +
last step
ended +
job
status +
%s%sshareprep.reuse%s%sthisthis%s%s%s%d earlier job(s) elidedshareprep.reuseshareprep.sharereusethisrole(s)
(there)
install / prep.
started
use
started -
last step
ended +
last relevant step
ended
job
status
"; print H ""; - print H encode_entities($th); + print H encode_with_wbrs($col); print H ""; print H "",$worst[3],"",$worst[0],"