Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Daniel Verite <daniel(at)manitou-mail(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Erik Rijkers <er(at)xs4all(dot)nl>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Date: 2017-03-29 14:14:59
Message-ID: 21747.1490796899@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
>> If we're sufficiently dead set on it, we could go back to the TAP-based
>> approach,

> Hmmm. You rejected it. I agree that TAP tests are not well suited for some
> simple tests because of their initdb overhead.

>> but I still doubt that this test is worth the amount of overhead that
>> would add.

> I think that there is an underlying issue with keeping on rejecting tests
> which aim at having a reasonable code coverage of features by exercising
> different paths.

There's certainly a fair amount of psql behavior that's not adequately
testable within the standard regression test infrastructure. Parsing of
command line arguments and exit codes for unusual cases both fall into
that area, and then there's things like prompts and tab completion.
If someone were to put together a TAP test suite that covered all that
and made for a meaningful improvement in psql's altogether-miserable
code coverage report[1], I would think that that would be a useful
expenditure of buildfarm time. What I'm objecting to is paying the
overhead for such a suite in order to test just this one thing. I don't
think that that passes the bang-for-buck test; or in other words, this
isn't the place I would start if I were creating a TAP suite for psql.

regards, tom lane

[1] https://coverage.postgresql.org/src/bin/psql/index.html

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2017-03-29 14:24:41 Re: [PATCH] Reduce src/test/recovery verbosity
Previous Message Masahiko Sawada 2017-03-29 14:14:53 Re: Transactions involving multiple postgres foreign servers