Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fFvQS-0006vB-9q for pgsql-hackers@arkaria.postgresql.org; Tue, 08 May 2018 05:44:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fFvQQ-0004AZ-RU for pgsql-hackers@arkaria.postgresql.org; Tue, 08 May 2018 05:44:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fFvQQ-0004AO-Ag for pgsql-hackers@lists.postgresql.org; Tue, 08 May 2018 05:44:34 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fFvQI-0002LU-Aj for pgsql-hackers@postgresql.org; Tue, 08 May 2018 05:44:33 +0000 Received: by mail-lf0-x242.google.com with SMTP id t129-v6so4677655lff.3 for ; Mon, 07 May 2018 22:44:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=7iLaCKiX4Q5/gXXOK3jWKXqNiyTOTCMMaAsUd3uEuy0=; b=NY84xvw58Dq8qM78bCuDEWyWXJoJ2fyhvEF65ewvp8nEZ02QCuWKq+U7u9oU3tAng9 RAv4WcdoKFtRGMkFAGKCfaUzwJwfidQSCwn+IqJTPITb6CGQx3nS+0COR6Fxzc9GnnPa PoNwHnkUwx0EJJ7KM85YT9L0Uw6yzV5X06mlCMFXF4x3xLuKtaZaVjnfkeSDypdOduPQ k2xqVH91j2KI61P1tNGcHIKa1i04NSwz74wyyLKdNgE/BxkyLhs7k5e2h49ELvMCkjwl nmmx4PVo4CT0Ul5qt8IOs2JlfYzSObaD1Kv4z7NhwJrmo2PCn0dc4A9juu6NLR2Ug4M3 xlWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=7iLaCKiX4Q5/gXXOK3jWKXqNiyTOTCMMaAsUd3uEuy0=; b=SGzs2h0ze+5fTX+DCVmmk2HCY8gCZZp5LAhHwVVPoFPBvS0QWFZG6RUzouPstbxTlI U0bk93b26vLQYcEaugiPPlXZKgDd6aYGoFMZHw11cBo4na3fWZSdZljAkcoLLag40Que LX7Fw5zyPVqT9/ztFixy5WtVJHGjybhJYhvi3u1Wq5ADQQJXrba1sWsMgxAps5zuNA0K Icjxe2FjUL9PgFys3NP9+z8gQbAbMrNVz9jundspNFSB6X8dRlvqB9+UQXcQMvLTZ46f Ltomt6HYra0w1tLMbVZPE2X0xI13jljy8gjSGSc0FaxzbrrAIgtWBctj2WTq16MuLf8B OBeg== X-Gm-Message-State: ALQs6tAMfEATxd9Gd/oVLKLaWaiKv1CVfmcrKLgpnGupj6RrFQWYojMB 4QUXnS8kxQVYH1OKe5lFC/Eojg== X-Google-Smtp-Source: AB8JxZpQNNt98gXgPwcsfhovPnQRf4Oo4oeGwI9d3plYOtgMdGvjK/cW7d5cmnXsyznxklxC6O4BQg== X-Received: by 2002:a19:930f:: with SMTP id v15-v6mr9702472lfd.83.1525758263950; Mon, 07 May 2018 22:44:23 -0700 (PDT) Received: from [1.0.0.7] ([178.155.4.122]) by smtp.gmail.com with ESMTPSA id r11-v6sm1022237ljg.37.2018.05.07.22.44.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 May 2018 22:44:23 -0700 (PDT) Subject: Re: make installcheck-world in a clean environment To: Tom Lane , Robert Haas Cc: "pgsql-hackers@postgresql.org" References: <24834.1525712835@sss.pgh.pa.us> From: Alexander Lakhin Message-ID: Date: Tue, 8 May 2018 08:44:22 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <24834.1525712835@sss.pgh.pa.us> Content-Type: multipart/alternative; boundary="------------AC4C62FB2A91E58D36B4B061" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------AC4C62FB2A91E58D36B4B061 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 07.05.2018 20:07, Tom Lane wrote: > Robert Haas writes: >> After thinking about this some more, I think the question here is >> definitional. A first attempt at defining 'make installcheck' is to >> say that it runs the tests from the build tree against the running >> server. Certainly, we intend to use the SQL files that are present in >> the build tree, not the ones that were present in the build tree where >> the running server was built. But what about client programs that we >> use to connect to the server? You're suggesting that we use the >> pre-installed ones, but that is actually pretty problematic because >> the ones we see as installed might correspond neither to the contents >> of the build tree nor to the running server. If the contents of the source tree doesn't correspond to the running server, then I'm afraid, we can't installcheck it for sure. I think it's supposed that we use for installcheck exactly the same source files that was used to build the server. Regarding clients program, if we will not use/check it while installchecking, then by what means they can be tested when installed? I think, the pgsql-packagers would like to check whether the whole installation of PostgreSQL is working, not only the server. For me, very realistic and most useful scenario of installcheck is: install postgresql-x.rpm install postgresql-x.src.rpm ./configure --prefix=$target_path --enable-tap-tests, etc... make installcheck(-world) >> Conceivably we could end >> up having a mix of assets from three different places: (1) the running >> server, (2) the build tree, (3) whatever is in our path at the moment. >> That seems very confusing. So now I think it's probably right to >> define 'make installcheck' as using the assets from the build tree to >> test the running server. Under that definition, we're missing some >> dependencies, but USE_INSTALLED_ASSETS isn't a thing we need. I see another scenario, that was discussed a month ago - remote (or server-only) installcheck. ( https://www.postgresql.org/message-id/flat/CAM0nTJ6iorX_tmg5MX0mQU3z3w%3D9wk%2BpGK8zrvn7DNWqnyv%2BsQ%40mail.gmail.com ) It can be useful too and if it will be supported, then USE_INSTALLED_ASSETS usage should be extended to psql, etc. > Nah, I disagree with this. To me, the purpose of "make installcheck" > is to verify the correctness of an installation, which I take to include > the client programs as well as the server. I think that "make > installcheck" ought to use the installed version of any file that we > actually install, and go to the build tree only for things we don't > install (e.g. SQL test scripts). Yes, that's the proposed patches intended for.  I didn't encounter any problems with it during internal testing with Linux and mingw-builds. > If the user has screwed up his PATH or other environmental aspects so that > what he's testing isn't a single installation, that's his error, not > something that "make installcheck" ought to work around. Indeed, maybe > such aspects of his setup are intentional, and second-guessing them would > completely defeat his purpose. In any case, if you want to test the > build-tree assets, that's what "make check" is for. Even modified configs could lead to test failures (for example, lc_messages can break server log checking), so the installcheck should be performed against some clean and determinated installation anyway. Best regards, ------ Alexander Lakhin Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------AC4C62FB2A91E58D36B4B061 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
07.05.2018 20:07, Tom Lane wrote:
Robert Haas <robertmhaas@gmail.com> writes:
After thinking about this some more, I think the question here is
definitional.  A first attempt at defining 'make installcheck' is to
say that it runs the tests from the build tree against the running
server.  Certainly, we intend to use the SQL files that are present in
the build tree, not the ones that were present in the build tree where
the running server was built.  But what about client programs that we
use to connect to the server?  You're suggesting that we use the
pre-installed ones, but that is actually pretty problematic because
the ones we see as installed might correspond neither to the contents
of the build tree nor to the running server.
If the contents of the source tree doesn't correspond to the running server, then I'm afraid, we can't installcheck it for sure.
I think it's supposed that we use for installcheck exactly the same source files that was used to build the server.
Regarding clients program, if we will not use/check it while installchecking, then by what means they can be tested when installed?
I think, the pgsql-packagers would like to check whether the whole installation of PostgreSQL is working, not only the server.
For me, very realistic and most useful scenario of installcheck is:
install postgresql-x.rpm
install postgresql-x.src.rpm
./configure --prefix=$target_path --enable-tap-tests, etc...
make installcheck(-world)
  Conceivably we could end
up having a mix of assets from three different places: (1) the running
server, (2) the build tree, (3) whatever is in our path at the moment.
That seems very confusing.  So now I think it's probably right to
define 'make installcheck' as using the assets from the build tree to
test the running server.  Under that definition, we're missing some
dependencies, but USE_INSTALLED_ASSETS isn't a thing we need.
I see another scenario, that was discussed a month ago - remote (or server-only) installcheck.
( https://www.postgresql.org/message-id/flat/CAM0nTJ6iorX_tmg5MX0mQU3z3w%3D9wk%2BpGK8zrvn7DNWqnyv%2BsQ%40mail.gmail.com )
It can be useful too and if it will be supported, then USE_INSTALLED_ASSETS usage should be extended to psql, etc.
Nah, I disagree with this.  To me, the purpose of "make installcheck"
is to verify the correctness of an installation, which I take to include
the client programs as well as the server.  I think that "make
installcheck" ought to use the installed version of any file that we
actually install, and go to the build tree only for things we don't
install (e.g. SQL test scripts).
Yes, that's the proposed patches intended for.  I didn't encounter any problems with it during internal testing with Linux and mingw-builds.
If the user has screwed up his PATH or other environmental aspects so that
what he's testing isn't a single installation, that's his error, not
something that "make installcheck" ought to work around.  Indeed, maybe
such aspects of his setup are intentional, and second-guessing them would
completely defeat his purpose.  In any case, if you want to test the
build-tree assets, that's what "make check" is for.
Even modified configs could lead to test failures (for example, lc_messages can break server log checking), so the installcheck should be performed against some clean and determinated installation anyway.

Best regards,
------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


--------------AC4C62FB2A91E58D36B4B061--