From patchwork Fri Jun 30 16:25:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 9820079 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 E6E69603F2 for ; Fri, 30 Jun 2017 16:28:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 609E2286A4 for ; Fri, 30 Jun 2017 16:28:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 543B0286B4; Fri, 30 Jun 2017 16:28:14 +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 05247286A4 for ; Fri, 30 Jun 2017 16:28:14 +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 1dQyjg-0005mf-Ju; Fri, 30 Jun 2017 16:25:36 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQyje-0005jU-VX for xen-devel@lists.xenproject.org; Fri, 30 Jun 2017 16:25:35 +0000 Received: from [85.158.143.35] by server-11.bemta-6.messagelabs.com id 48/35-03612-E7B76595; Fri, 30 Jun 2017 16:25:34 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCIsWRWlGSWpSXmKPExsXitHRDpG5tdVi kQecEM4vvWyYzOTB6HP5whSWAMYo1My8pvyKBNeP3GeuCWTwVL46vY25g3MrVxcjJISHgL/F1 /1tWEJtNQFeiactfti5GDg4RARWJ23sNQMLMAgsYJR5+LwGxhQUcJN4+escIYrMIqEq8mNzLA mLzCnhJLGxaxgYxUk7i/PGfzCA2J1D84bRF7CC2kICnxItzE1hAxgsJqEnMXR8P0SoocXLmEx aIVRISB1+8YJ7AyDsLSWoWktQCRqZVjBrFqUVlqUW6hqZ6SUWZ6RkluYmZObqGBmZ6uanFxYn pqTmJScV6yfm5mxiBYcMABDsYvy0LOMQoycGkJMq78lpopBBfUn5KZUZicUZ8UWlOavEhRhkO DiUJ3j2VYZFCgkWp6akVaZk5wACGSUtw8CiJ8MoGAaV5iwsSc4sz0yFSpxiNOVbN/PmNiePVh P/fmIRY8vLzUqXEeXmqgEoFQEozSvPgBsEi6xKjrJQwLyPQaUI8BalFuZklqPKvGMU5GJWEef tBpvBk5pXA7XsFdAoT0CnCM0JATilJREhJNTAaqbxb8v3Wx/ulV069s6sp2bLvmGMBU5LQY79 Wx+/uNSv/edUckf23d32AT764eeKth+d86i7vdumryNj/Y5rHErvZ2r0fzymulJvxZKpM317B 7WUe93TVlG8YbN/Cxlx7w31V1CIjkzlXlbViP0949Etp+YcN3/XmzTH/75Fd2n7+LCvPbY4IJ ZbijERDLeai4kQAXAMPcKcCAAA= X-Env-Sender: prvs=3471c4a24=Ian.Jackson@citrix.com X-Msg-Ref: server-6.tower-21.messagelabs.com!1498839931!48092292!2 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 36965 invoked from network); 30 Jun 2017 16:25:33 -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:33 -0000 X-IronPort-AV: E=Sophos;i="5.40,287,1496102400"; d="scan'208";a="430028789" From: Ian Jackson To: Date: Fri, 30 Jun 2017 17:25:13 +0100 Message-ID: <1498839920-17025-11-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 10/17] step logfiles: Provide new column 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 We will write things into it, and use it, soon. This is the start of a "Populate-then-rely" schema change, as described in schema/README.updates. Specifically, the steps: 1. Commit: new schema update `add', status Preparatory 2. Commit: new schema update `constraint', status Unfinished Signed-off-by: Ian Jackson --- schema/steps-logfile-add.sql | 8 ++++++++ schema/steps-logfile-constraint.sql | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 schema/steps-logfile-add.sql create mode 100644 schema/steps-logfile-constraint.sql diff --git a/schema/steps-logfile-add.sql b/schema/steps-logfile-add.sql new file mode 100644 index 0000000..5e37b10 --- /dev/null +++ b/schema/steps-logfile-add.sql @@ -0,0 +1,8 @@ +-- ##OSSTEST## 003 Preparatory +-- +-- Previously, the logfile name was inferred from "stepno" and +-- "testid". We want to be able to set it explicitly for substeps. +-- +-- This change is compatible with old code. + +ALTER TABLE steps ADD COLUMN logfile TEXT; diff --git a/schema/steps-logfile-constraint.sql b/schema/steps-logfile-constraint.sql new file mode 100644 index 0000000..100bb31 --- /dev/null +++ b/schema/steps-logfile-constraint.sql @@ -0,0 +1,10 @@ +-- ##OSSTEST## 004 Unfinished +-- +-- Previously, the logfile name was inferred from "stepno" and +-- "testid". Newer code will need it to be set explicitly. + +UPDATE steps + SET logfile = stepno || '.' || step || '.log' + WHERE logfile is null; + +ALTER TABLE steps ALTER COLUMN logfile SET NOT NULL;