From patchwork Fri Jun 30 16:25:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 9820093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C4ACF603F2 for ; Fri, 30 Jun 2017 16:28:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2277286A4 for ; Fri, 30 Jun 2017 16:28:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6BB3286B9; Fri, 30 Jun 2017 16:28:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 670E6286B4 for ; Fri, 30 Jun 2017 16:28:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQyjk-0005uf-Da; Fri, 30 Jun 2017 16:25:40 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQyji-0005ih-Kn for xen-devel@lists.xenproject.org; Fri, 30 Jun 2017 16:25:38 +0000 Received: from [85.158.143.35] by server-9.bemta-6.messagelabs.com id 1B/C7-03406-28B76595; Fri, 30 Jun 2017 16:25:38 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeJIrShJLcpLzFFi42JxWrohUreuOiz S4N8mNYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNePQq71sBTt4Kpq+bGRuYDzC2cXIwSEh4C/x 5rd6FyMnB5uArkTTlr9sIGERARWJ23sNQMLMAgsYJR5+LwGxhQXCJc73PGICKWERUJVY9zMcJ Mwr4CUxa0MfK4gtISAncf74T2YQmxMo/nDaInYQW0jAU+LFuQksIK1CAmoSc9fHQ7QKSpyc+Y QFYpOExMEXL5gnMPLOQpKahSS1gJFpFaNGcWpRWWqRrqGpXlJRZnpGSW5iZo6uoYGZXm5qcXF iempOYlKxXnJ+7iZGYNAwAMEOxm/LAg4xSnIwKYnyrrwWGinEl5SfUpmRWJwRX1Sak1p8iFGG g0NJgndPZVikkGBRanpqRVpmDjB8YdISHDxKIryyQUBp3uKCxNzizHSI1ClGXY5XE/5/YxJiy cvPS5US5+WpAioSACnKKM2DGwGLpUuMslLCvIxARwnxFKQW5WaWoMq/YhTnYFQS5u0HmcKTmV cCt+kV0BFMQEcIzwgBOaIkESEl1cAYFaTZ2XPWOCnjzOLpcXoOXl+kntf2CwpdfXV/o6KO6JM f5b063OUWL0/3d1s90r907ePrRtdvj9lzG7hjmo+V7mOZw8zLP9c04oBkiHPZHOEKdn1Zd/UX Qgs0QvPfsB5fs/7Hnh1bj5xx2r520pK1L4Ln3LzJ3n9FkkdZhJfHc71xwa0FXwOUWIozEg21m IuKEwGgHQYcoAIAAA== X-Env-Sender: prvs=3471c4a24=Ian.Jackson@citrix.com X-Msg-Ref: server-6.tower-21.messagelabs.com!1498839931!48092292!3 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37018 invoked from network); 30 Jun 2017 16:25:34 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-6.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 30 Jun 2017 16:25:34 -0000 X-IronPort-AV: E=Sophos;i="5.40,287,1496102400"; d="scan'208";a="430028793" From: Ian Jackson To: Date: Fri, 30 Jun 2017 17:25:19 +0100 Message-ID: <1498839920-17025-17-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1498839920-17025-1-git-send-email-ian.jackson@eu.citrix.com> References: <1498839920-17025-1-git-send-email-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Cc: Andrew Cooper , Wei Liu , Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH 16/17] step logfiles: Populate logfile column with logfile name X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is part of a "Populate-then-rely" schema change, as described in schema/README.updates. Specifically, this is the final part of the step: 5. Commit: code to populate new column; changing `add' to status Needed and `constraint' to status Ready. Signed-off-by: Ian Jackson --- schema/steps-logfile-constraint.sql | 2 +- tcl/JobDB-Executive.tcl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/schema/steps-logfile-constraint.sql b/schema/steps-logfile-constraint.sql index 100bb31..462941e 100644 --- a/schema/steps-logfile-constraint.sql +++ b/schema/steps-logfile-constraint.sql @@ -1,4 +1,4 @@ --- ##OSSTEST## 004 Unfinished +-- ##OSSTEST## 004 Ready -- -- Previously, the logfile name was inferred from "stepno" and -- "testid". Newer code will need it to be set explicitly. diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index ed636e4..0734018 100644 --- a/tcl/JobDB-Executive.tcl +++ b/tcl/JobDB-Executive.tcl @@ -281,12 +281,13 @@ proc spawn-step-begin {flight job ts stepnovar} { } else { set stepno 1 } + set logfile [step-log-leafname $stepno $ts] db-execute " INSERT INTO steps (flight, job, stepno, - step, status, + step, logfile, status, testid) VALUES ([pg_quote $flight], [pg_quote $job], $stepno, - [pg_quote $ts], 'running', + [pg_quote $ts], [pg_quote $logfile], 'running', 'STARTING') " } emsg]} {