From patchwork Tue Apr 27 18:00:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 12227103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51B69C433B4 for ; Tue, 27 Apr 2021 18:00: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 1394561006 for ; Tue, 27 Apr 2021 18:00:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1394561006 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.118789.225043 (Exim 4.92) (envelope-from ) id 1lbS0q-000288-VA; Tue, 27 Apr 2021 18:00:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 118789.225043; Tue, 27 Apr 2021 18:00:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0q-00027s-OW; Tue, 27 Apr 2021 18:00:44 +0000 Received: by outflank-mailman (input) for mailman id 118789; Tue, 27 Apr 2021 18:00:43 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0p-00027E-QX for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0p-0004pf-NX for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:43 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1lbS0p-0001lX-MX for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:43 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1lbS0n-0003ln-MJ; Tue, 27 Apr 2021 19:00:42 +0100 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=RKj3y4pvDAFofYle6tGS37iZPPboeDEgBiU4eIgQ5Oo=; b=Iv9qXyWlqrkF1561qEKKRTlVgV Qe0/MVYjEZkbbkYSRd4Bfo7qQg9vFhScsvBHH7Qojk9sV4pB8/tHk7Y014UxWvKs3Rm8fmKwnnoC/ UCJU4XIRjALRaumWidOn1G2w0Vc4Ks6/Dh5Q+55EoGSxVNOQwI4/Kp8deBNs6VZ7bQN4=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 1/7] mg-schema-test-database: posgtres compat: psql transactions Date: Tue, 27 Apr 2021 19:00:27 +0100 Message-Id: <20210427180033.9439-2-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210427180033.9439-1-iwj@xenproject.org> References: <20210427180033.9439-1-iwj@xenproject.org> MIME-Version: 1.0 Now (postgresql 11): * psql transaction behaviour has changed so that now we want to use the -1 option. This obviates a few BEGIN and COMMITs. * SET implicitly starts a transaction and DROP and CREATE DATABASE aren't transactional and now complain if they are run in a transaction. So we must add COMMIT after SET. Signed-off-by: Ian Jackson --- mg-schema-create | 2 +- mg-schema-test-database | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/mg-schema-create b/mg-schema-create index 9bb3040a..3a344db4 100755 --- a/mg-schema-create +++ b/mg-schema-create @@ -89,7 +89,7 @@ fi $progress "Populating database..." -$(get_psql_cmd) $quietopt -f schema/initial.sql +$(get_psql_cmd) $quietopt -1 -f schema/initial.sql if $do_updates; then ./mg-schema-update $quietopt apply-all "${updates[@]}" diff --git a/mg-schema-test-database b/mg-schema-test-database index dab536c5..e69b9881 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -132,7 +132,7 @@ psql_query () { } psql_do_cmd () { - echo "$(get_psql_cmd) ${OSSTEST_DEBUG:+-e -a}" + echo "$(get_psql_cmd) ${OSSTEST_DEBUG:+-e -a}" -1 } psql_do () { @@ -411,7 +411,9 @@ END #---------- create test db ---------- psql_do <>$t.import < X-Patchwork-Id: 12227105 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5407C43461 for ; Tue, 27 Apr 2021 18:00: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 83DEE610FB for ; Tue, 27 Apr 2021 18:00:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83DEE610FB 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.118790.225059 (Exim 4.92) (envelope-from ) id 1lbS0s-00029t-8t; Tue, 27 Apr 2021 18:00:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 118790.225059; Tue, 27 Apr 2021 18:00:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0s-00029k-5C; Tue, 27 Apr 2021 18:00:46 +0000 Received: by outflank-mailman (input) for mailman id 118790; Tue, 27 Apr 2021 18:00:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0q-00027J-68 for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0q-0004pi-47 for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:44 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1lbS0q-0001lo-3P for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:44 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1lbS0o-0003ln-9t; Tue, 27 Apr 2021 19:00:42 +0100 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=JK5vF50HzYVrWkX33Nf1/Ad7XzKV6qN4f/xq8FqYezg=; b=vo5YpuUM/wL0h3CDOEOROI4Bj+ dTs7EVQV9MsMXtzYn+eAoXoXgwKuwBV1JHx3K7bLipI93CV0cbK/uCh/3hkWpWcVT6Iir1likLsiL ceWsi8hej+ui/n4RRHpT82jsanJNGEciZZVOVeXtnR8VhfaP2vDwtYLJgD2K4ihfPziE=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 2/7] mg-schema-test-database: Be slightly more defensive Date: Tue, 27 Apr 2021 19:00:28 +0100 Message-Id: <20210427180033.9439-3-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210427180033.9439-1-iwj@xenproject.org> References: <20210427180033.9439-1-iwj@xenproject.org> MIME-Version: 1.0 Signed-off-by: Ian Jackson --- mg-schema-test-database | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mg-schema-test-database b/mg-schema-test-database index e69b9881..b49fbecf 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -381,7 +381,8 @@ END print "sequences+=\" $1\"\n"; } elsif (m/^CREATE TABLE (\w+)/) { $table=$1; - } elsif (m/^\s*flight\s+integer/) { + } elsif (m/^\s*flight\s+integer\s/) { + die unless $table; print "ftables+=\" $table\"\n"; } elsif ($table && m/^\)\;$/) { print "tables+=\" $table\"\n"; From patchwork Tue Apr 27 18:00:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 12227115 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8B83C4360C for ; Tue, 27 Apr 2021 18:01: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 7A2B3613BD for ; Tue, 27 Apr 2021 18:01:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A2B3613BD 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.118791.225064 (Exim 4.92) (envelope-from ) id 1lbS0s-0002Ak-NA; Tue, 27 Apr 2021 18:00:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 118791.225064; Tue, 27 Apr 2021 18:00:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0s-0002AP-GL; Tue, 27 Apr 2021 18:00:46 +0000 Received: by outflank-mailman (input) for mailman id 118791; Tue, 27 Apr 2021 18:00:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0q-00027c-IV for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0q-0004pl-Hh for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:44 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1lbS0q-0001mB-GM for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:44 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1lbS0o-0003ln-Mo; Tue, 27 Apr 2021 19:00:42 +0100 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=Kz6hhyMq9BuTwgBd5X7OokkNSvFgm9TeRwsQBEvDUck=; b=AUiANCSekuq3zAdpmX3MlnSqnT /QSY+HlUHsbncx0aIozCNl1OZW+CyCBq+6HgF+oamdePRCDRWTjsw+RvGTru5ZE/pOCJ+COhUSw1s Gj84cmONznb0CDR3tC+kYFI6NcHANYbdg5bP2ArUDVGxPbGjETijcssbxFG0hxCxcouc=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 3/7] mg-schema-test-database: posgtres compat: Cope with schema name Date: Tue, 27 Apr 2021 19:00:29 +0100 Message-Id: <20210427180033.9439-4-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210427180033.9439-1-iwj@xenproject.org> References: <20210427180033.9439-1-iwj@xenproject.org> MIME-Version: 1.0 The dump now (postgresql 11) contains lots of "public." which made these regexps not match. Signed-off-by: Ian Jackson --- mg-schema-test-database | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mg-schema-test-database b/mg-schema-test-database index b49fbecf..b5906d70 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -377,9 +377,10 @@ END # What tables are there ? perl -ne <$t.schema >$t.tablevars ' - if (m/^CREATE SEQUENCE (\w+)/) { + BEGIN { $sch_re = qr{(?:public\.)?}; } + if (m/^CREATE SEQUENCE $sch_re(\w+)/) { print "sequences+=\" $1\"\n"; - } elsif (m/^CREATE TABLE (\w+)/) { + } elsif (m/^CREATE TABLE $sch_re(\w+)\s+/) { $table=$1; } elsif (m/^\s*flight\s+integer\s/) { die unless $table; From patchwork Tue Apr 27 18:00:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 12227107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAD61C43462 for ; Tue, 27 Apr 2021 18:00: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 6F103613C0 for ; Tue, 27 Apr 2021 18:00:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F103613C0 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.118792.225076 (Exim 4.92) (envelope-from ) id 1lbS0t-0002Br-Bb; Tue, 27 Apr 2021 18:00:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 118792.225076; Tue, 27 Apr 2021 18:00:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0s-0002Be-Vh; Tue, 27 Apr 2021 18:00:46 +0000 Received: by outflank-mailman (input) for mailman id 118792; Tue, 27 Apr 2021 18:00:45 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0r-000290-7P for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:45 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0r-0004pr-6A for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:45 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1lbS0r-0001mZ-5C for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:45 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1lbS0p-0003ln-Ap; Tue, 27 Apr 2021 19:00:43 +0100 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=GPsVEgG49IbvxwSgXeOfWoV57FVaGCeJs+NVaTRdMcg=; b=MwcKLUDWBID14rZBNy1FTln4Wl 0V4UlsEqWjOkSIMETEXYMNjP/8lQFUQmGybeylmLKAhtTDhZR/SgAUpLjD7RyyIepLscF7RSrLo7L 833hUryWkOInZAN2UVnF0FmQpH4Jjdptv80sE4i45SBl8ymAHGKZYZFiSfkW96EwhTIU=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 4/7] mg-schema-test-database: GetOpt compat: work around arg bundling bug Date: Tue, 27 Apr 2021 19:00:30 +0100 Message-Id: <20210427180033.9439-5-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210427180033.9439-1-iwj@xenproject.org> References: <20210427180033.9439-1-iwj@xenproject.org> MIME-Version: 1.0 With -qff it now complains, daftly, that -q doesn't take a value. Signed-off-by: Ian Jackson --- mg-schema-test-database | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mg-schema-test-database b/mg-schema-test-database index b5906d70..26e35c5b 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -419,7 +419,7 @@ END END withtest ./mg-schema-create -q --no-updates - withtest ./mg-schema-update -qff apply $wantupdates + withtest ./mg-schema-update -q -f -f apply $wantupdates printf " (seqs)" seq_alters="" From patchwork Tue Apr 27 18:00:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 12227113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92375C43470 for ; Tue, 27 Apr 2021 18:01: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 5114761006 for ; Tue, 27 Apr 2021 18:01:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5114761006 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.118793.225087 (Exim 4.92) (envelope-from ) id 1lbS0t-0002DZ-VA; Tue, 27 Apr 2021 18:00:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 118793.225087; Tue, 27 Apr 2021 18:00:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0t-0002D2-Hr; Tue, 27 Apr 2021 18:00:47 +0000 Received: by outflank-mailman (input) for mailman id 118793; Tue, 27 Apr 2021 18:00:45 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0r-00029a-Ji for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:45 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0r-0004px-Ix for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:45 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1lbS0r-0001n0-IG for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:45 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1lbS0p-0003ln-Nj; Tue, 27 Apr 2021 19:00:43 +0100 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=BOGeV0UJXxuJsKF2TUUsYhyibwoa6RDq0MP2ZccTrRM=; b=yO53tsGjHmBT3w0CEv7d11HdZY 2eXRLo7szATEdBELG4lSlIrDOa9S0IXHaxqm2vgjtIZI1WWEgrUFoSQTgRBcorL97UQ3MfTngSdQV +rVZklXjGO/Kl11AhN8hr5U7AkswqWfDQC8WKPOqF6+QQMDMo0BTzOK5CDSATM8wFlMU=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 5/7] mg-schema-test-database: posgtres compat: Sequences Date: Tue, 27 Apr 2021 19:00:31 +0100 Message-Id: <20210427180033.9439-6-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210427180033.9439-1-iwj@xenproject.org> References: <20210427180033.9439-1-iwj@xenproject.org> MIME-Version: 1.0 Now (postgresql 11) start_value is in a different table. We don't really care about it very much and mostly care about the last value, so we fix that (and launder the for-db comparison dumps). Signed-off-by: Ian Jackson --- mg-schema-test-database | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/mg-schema-test-database b/mg-schema-test-database index 26e35c5b..eab0746e 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -425,16 +425,16 @@ END seq_alters="" for seq in $sequences; do orgseqval=$(psql_query <$t.schema.created - diff -u $t.schema.orig $t.schema.created + + for wh in orig created; do + perl -pe ' + next unless m{^CREATE SEQUENCE }..m{^\)}; + $_ = "" if m/^\s*START WITH \d+$/; + ' <$t.schema.$wh >$t.schema.$wh-laund + done + + diff -u $t.schema.orig-laund $t.schema.created-laund #---------- mark resources that we are going to borrow ---------- From patchwork Tue Apr 27 18:00:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 12227111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A924AC43600 for ; Tue, 27 Apr 2021 18:01: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 6369B613C0 for ; Tue, 27 Apr 2021 18:01:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6369B613C0 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.118794.225099 (Exim 4.92) (envelope-from ) id 1lbS0u-0002F3-MC; Tue, 27 Apr 2021 18:00:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 118794.225099; Tue, 27 Apr 2021 18:00:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0u-0002EO-3y; Tue, 27 Apr 2021 18:00:48 +0000 Received: by outflank-mailman (input) for mailman id 118794; Tue, 27 Apr 2021 18:00:46 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0s-00029f-3K for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:46 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0s-0004q5-2g for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:46 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1lbS0s-0001nc-1n for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:46 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1lbS0q-0003ln-4E; Tue, 27 Apr 2021 19:00:44 +0100 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=H7py3//w0QUlttXfH9n5X0hN6r5MeX1YzG0RyQXhqDo=; b=1X6l0pdLMSWa1b0n54OL3xljC8 r9TqZiJ38cL35NJ29N/Taw+8AEW4Ml9EmSAano2g4gUx1FxST+Zyh0izG2STsG+oCXY38eHB1/s+N vh8tjQsZPbzkNZv1r4vuyBDa54xS7yWmRtha9OW0CtshZUycbkiKrbPVqzGEIS3sLf3s=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 6/7] mg-schema-test-database: Fix following host_lifecycle Date: Tue, 27 Apr 2021 19:00:32 +0100 Message-Id: <20210427180033.9439-7-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210427180033.9439-1-iwj@xenproject.org> References: <20210427180033.9439-1-iwj@xenproject.org> MIME-Version: 1.0 This data doesn't really survive, since the tasks are all mangled. Rather than trying to transpose it, just don't transfer it for now. Signed-off-by: Ian Jackson --- mg-schema-test-database | 1 + 1 file changed, 1 insertion(+) diff --git a/mg-schema-test-database b/mg-schema-test-database index eab0746e..df83b65a 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -482,6 +482,7 @@ END for table in $tables; do case $table in schema_updates) continue ;; + host_lifecycle) continue ;; esac case " $ftables " in *" $table "*) From patchwork Tue Apr 27 18:00:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 12227101 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54A74C43460 for ; Tue, 27 Apr 2021 18:00: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 13B09613B2 for ; Tue, 27 Apr 2021 18:00:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13B09613B2 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.118795.225106 (Exim 4.92) (envelope-from ) id 1lbS0v-0002GN-8a; Tue, 27 Apr 2021 18:00:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 118795.225106; Tue, 27 Apr 2021 18:00:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0u-0002Fo-Kb; Tue, 27 Apr 2021 18:00:48 +0000 Received: by outflank-mailman (input) for mailman id 118795; Tue, 27 Apr 2021 18:00:46 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0s-0002A9-DN for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:46 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbS0s-0004qA-Bx for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:46 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1lbS0s-0001nm-B6 for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 18:00:46 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1lbS0q-0003ln-Gs; Tue, 27 Apr 2021 19:00:44 +0100 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=vRaPgoPnoLJb6QLe4U8c/AoTASF6SMKUVJYPeAdSMmI=; b=CXN2fELc3Awpay2InSBACFEa0k 0DpafSGB/pWIf5xuzQuO+dezyKIfuaNsYI9xl8DSf+59rFSOPBRrYXaW1tp54MVGCwWCbWgVXNm0M t7o7l++cBBkJsz5D//51urWw72cA5OCv7+LxLYMD7xF7YXT/lMCwG2mHGKh91AWChJOk=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 7/7] mg-schema-test-database: posgtres compat: tidy messages Date: Tue, 27 Apr 2021 19:00:33 +0100 Message-Id: <20210427180033.9439-8-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210427180033.9439-1-iwj@xenproject.org> References: <20210427180033.9439-1-iwj@xenproject.org> MIME-Version: 1.0 Now (postgresql 11) this prints a bunch of COPY notices. Suppress them with a -q. Signed-off-by: Ian Jackson --- mg-schema-test-database | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mg-schema-test-database b/mg-schema-test-database index df83b65a..357646bb 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -515,7 +515,7 @@ END printf "Copy..." printf "export..." - $(psql_do_cmd) -f $t.export + $(psql_do_cmd) -q -f $t.export printf "import..." $(withtest psql_do_cmd) -f $t.import