Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ydv04-0002PW-Az for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2015 06:22:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ydv03-0008Dz-NG for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2015 06:22:39 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ydv02-0008Ds-A1 for pgsql-hackers@postgresql.org; Fri, 03 Apr 2015 06:22:38 +0000 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Yduzz-0002vy-8f for pgsql-hackers@postgresql.org; Fri, 03 Apr 2015 06:22:36 +0000 Received: by paboj16 with SMTP id oj16so26025540pab.0 for ; Thu, 02 Apr 2015 23:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=n7uoE1VPxn7SOyHna6OCRBHufVTt2MyM5dy8RDsMXxk=; b=OKmrcJTwwW8vhYheI3UTmuhRrVUwq/CvCiXR/KB04CqPE2qsuAoWflf17xZUxU4YfN ZT33xpPRbEFy0AgD0V0X7nKNVF1rq81jwjO3UM281lQIzXA6f9k9C/Vu4yfl+hrn7n2J 57rZRU+OXSFHscedl9vKNsnGasbO6BTd50J0k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=n7uoE1VPxn7SOyHna6OCRBHufVTt2MyM5dy8RDsMXxk=; b=aXjLIjB6NHqqFB4kKcYUdvQykOQb0dKZjhKjqfg75aecMlq2t8h2mTtJpfDrUPpw66 RMzwr551Bm/YT3fG3heTACTT89u87kDfDXNlE3h6MvbOBEz4GaRkROeGObm32jHJ322M gqwHatJ6hz0gKsalnRaU3oLUfZXoHlUMksF9BIJGeMJxE+r8IWu/yFqLi2Ptsg2kIvgU KzFJFfnJxTxQzn45XjWy97jplBVyeVxnvqVPwrfPXQtARDdfsnFV6MFOpTTV7/i2svl4 9EM47jbYSXut8jgsmpG1tIlCukUV59j1DVEd874u9DWllfZEZVtFM1ybzDVpxoaXU2Ej qaFw== X-Gm-Message-State: ALoCoQlHpIcwRKb9nzTM/c9RxpwmHzL+nfVHlIRjXzBiPZvaSd3Ki381W5yBXpuGJyo8nC8xqPQK X-Received: by 10.68.224.69 with SMTP id ra5mr1604533pbc.161.1428042153883; Thu, 02 Apr 2015 23:22:33 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by mx.google.com with ESMTPSA id cr1sm7037093pdb.7.2015.04.02.23.22.32 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 02 Apr 2015 23:22:33 -0700 (PDT) Date: Fri, 3 Apr 2015 02:22:30 -0400 From: Noah Misch To: Michael Paquier Cc: PostgreSQL mailing lists , peter_e@gmx.net, Heikki Linnakangas Subject: Re: Supporting TAP tests with MSVC and Windows Message-ID: <20150403062230.GA1153652@tornado.leadboat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Each Windows patch should cover all Windows build systems; patches that fix a problem in the src/tools/msvc build while leaving it broken in the GNU make build are a bad trend. In this case, I expect you'll need few additional changes to cover both. On Thu, Apr 02, 2015 at 06:30:02PM +0900, Michael Paquier wrote: > 2) tapcheck does not check if IPC::Run is installed or not. Should we > add a check in the code for that? If yes, should we bypass the test or > fail? The src/tools/msvc build system officially requires ActivePerl, and I seem to recall ActivePerl installs IPC::Run by default. A check is optional. > 7) TAP tests use sometimes top_builddir directly. I think that's ugly, > and if there are no objections I think that we should change it to use > a dedicated environment variable like TESTTOP or similar. I sense nothing ugly about a top_builddir reference, but see below. > --- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl > +++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl > open HBA, ">>$tempdir/pgdata/pg_hba.conf"; > -print HBA "local replication all trust\n"; > +# Windows builds do not support local connections > +if ($Config{osname} ne "MSWin32") > +{ > + print HBA "local replication all trust\n"; > +} > print HBA "host replication all 127.0.0.1/32 trust\n"; > print HBA "host replication all ::1/128 trust\n"; > close HBA; Test suites that run as part of "make check-world", including all src/bin TAP suites, _must not_ enable trust authentication on Windows. To do so would reintroduce CVE-2014-0067. (The standard alternative is to call "pg_regress --config-auth", which switches a data directory to SSPI authentication.) Suites not in check-world, though not obligated to follow that rule, will have a brighter future if they do so anyway. > --- a/src/test/perl/TestLib.pm > +++ b/src/test/perl/TestLib.pm > @@ -73,9 +74,19 @@ sub tempdir_short > sub standard_initdb > { > my $pgdata = shift; > - system_or_bail("initdb -D '$pgdata' -A trust -N >/dev/null"); > - system_or_bail("$ENV{top_builddir}/src/test/regress/pg_regress", > - '--config-auth', $pgdata); > + > + if ($Config{osname} eq "MSWin32") > + { > + system_or_bail("initdb -D $pgdata -A trust -N > NUL"); > + system_or_bail("$ENV{TESTREGRESS}", > + '--config-auth', $pgdata); > + } > + else > + { > + system_or_bail("initdb -D '$pgdata' -A trust -N >/dev/null"); > + system_or_bail("$ENV{top_builddir}/src/test/regress/pg_regress", > + '--config-auth', $pgdata); > + } > } Make all build systems set TESTREGRESS, and use it unconditionally. That's not a complete review, just some highlights. Thanks, nm -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers