From nobody Sat May 10 19:49:05 2025
Delivered-To: importer@patchew.org
Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied
 by domain of lists.xenproject.org) client-ip=192.237.175.120;
 envelope-from=xen-devel-bounces@lists.xenproject.org;
 helo=lists.xenproject.org;
Authentication-Results: mx.zohomail.com;
	spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain
 of lists.xenproject.org)
  smtp.mailfrom=xen-devel-bounces@lists.xenproject.org
ARC-Seal: i=1; a=rsa-sha256; t=1555605195; cv=none;
	d=zoho.com; s=zohoarc;
	b=Qm817kGfX1Io/LaOaaNFnH0ALHcwuV74Dx3b1ZH3lvkg5Rk9nwSm9ygbiPR82LoeKdvjr5Rd5JQNv7SQFarwiEM+zzqbUGbGveSyIBhjPOvDAjR0FxbHvbGRQ/SIXany0QhBEItUOqXGzkJTu9yzNpbvSEI2S7jZbq2eGhysz/I=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com;
 s=zohoarc;
	t=1555605195;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results;
	bh=sHt3KZkRiTNEbMifnNedUe8EP/jR62IlYCtJGwfM1nI=;
	b=HJvJOeB4WS2symzecnVtkj0/69TdoND5vpsE5fPRJMrVq6eUXSQPu+EN8+SnTpvPgK8xmO+SWzyd0kUg/+8w4xa2ocxwfZqNjU6dSUlxJuwc2MSFbmCyegk2qP61GqLycIt14rTYz/0by1GvA01KJwv2BnKk/hy44KDojzji12o=
ARC-Authentication-Results: i=1; mx.zoho.com;
	spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain
 of lists.xenproject.org)
  smtp.mailfrom=xen-devel-bounces@lists.xenproject.org
Return-Path: <xen-devel-bounces@lists.xenproject.org>
Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120])
 by mx.zohomail.com
	with SMTPS id 1555605195617565.7815222672676;
 Thu, 18 Apr 2019 09:33:15 -0700 (PDT)
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.89)
	(envelope-from <xen-devel-bounces@lists.xenproject.org>)
	id 1hH9xL-00022m-T4; Thu, 18 Apr 2019 16:32:11 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from
 <SRS0=tvKn=SU=citrix.com=prvs=004dc2360=ian.jackson@srs-us1.protection.inumbo.net>)
 id 1hH9xK-00021L-CH
 for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:10 +0000
Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 819cb696-61f7-11e9-a51d-0bdd52c2ff68;
 Thu, 18 Apr 2019 16:32:07 +0000 (UTC)
X-Inumbo-ID: 819cb696-61f7-11e9-a51d-0bdd52c2ff68
X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913769"
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: <xen-devel@lists.xenproject.org>
Date: Thu, 18 Apr 2019 17:31:46 +0100
Message-ID: <20190418163158.11408-10-ian.jackson@eu.citrix.com>
X-Mailer: git-send-email 2.11.0
In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com>
References: <20190418163158.11408-1-ian.jackson@eu.citrix.com>
MIME-Version: 1.0
Subject: [Xen-devel] [OSSTEST PATCH 09/21] step handling: Preserve step
 states set by ts-* scripts
X-BeenThere: xen-devel@lists.xenproject.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: Xen developer discussion <xen-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>,
 <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-devel@lists.xenproject.org>
List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>,
 <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Errors-To: xen-devel-bounces@lists.xenproject.org
Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org>

sg-run-job would unconditionally set the step state to the value it
calculated, which would usually be `pass' or `fail' or
`broken' (according to the recipe).

Relax this interface somewhat to allow a test script to set the step
status itself: specifically, do not overwrite an existing status of
  aborted broken starved

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tcl/JobDB-Executive.tcl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl
index 70728953..57ded025 100644
--- a/tcl/JobDB-Executive.tcl
+++ b/tcl/JobDB-Executive.tcl
@@ -316,11 +316,14 @@ proc spawn-step-commit {flight job stepno testid} {
=20
 proc step-set-status {flight job stepno st} {
     transaction flights {
-        db-update-1 "
+        db-execute "
             UPDATE steps
                SET status=3D'$st',
                    finished=3D[clock seconds]
              WHERE flight=3D$flight AND job=3D'$job' AND stepno=3D$stepno
+               AND status<>'aborted'
+               AND status<>'broken'
+               AND status<>'starved'
         "
         set pause 0
         db-execute-array stopinfo "
--=20
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel