public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Matheus Alcantara <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] Add tests for psql tab completion
Date: Mon, 14 Feb 2022 16:19:40 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <d_urhkNm44odv8cuFV9T9BXXQEbLlPb5smujNZ6kXaxkwtOtlltHecv5tDMCfJ2XtbrnhWlHLt_9rLohGlDn0W-EB5-D781QVzI8LhhEIoU=@pm.me>
References: <cyYnAHiGk0M96LLOz3UUdsndyxD0LFdzDSJmCT49bKlPkr-p4GassX9_hEzWup_kkFr9n6ETce7BwvVRoxL59iJlkCNk1mPL82W2rXVeGX4=@pm.me>
	<[email protected]>
	<d_urhkNm44odv8cuFV9T9BXXQEbLlPb5smujNZ6kXaxkwtOtlltHecv5tDMCfJ2XtbrnhWlHLt_9rLohGlDn0W-EB5-D781QVzI8LhhEIoU=@pm.me>

[ Please keep the mailing list cc'd ]

Matheus Alcantara <[email protected]> writes:
> On Monday, February 14th, 2022 at 17:01, Tom Lane <[email protected]> wrote:
>> What exactly is the motivation for these particular tests?

> I was studying the source code and looking for projects that I could contribute so I decided
> to start with tests, so I ran coverage and started with files that had little coverage, realized
> that psql tab completion ones had little coverage so I decided to add some tests, I tried to
> start with the simplest.

> I understand that the patch may not be as much of a need, I just wanted to try and help with something.
> Do you think there would be other tests that should be done? I would like to try to contribute.

There's certainly lots of places that could use more test coverage.
But I think that making a meaningful difference in tab-complete.c
would require writing test cases to hit most of the if-else branches,
which doesn't seem very profitable either in terms of test-writing
effort or in terms of the cycles that'd be spent on running those
tests forevermore.  We try to be thrifty about how much work is
done by check-world, because it's a real advantage for development
that that takes a small number of minutes and not hours.  I'm not
really seeing that covering more of tab-complete would buy much.

As for areas that *do* need more coverage, the first one that
I come across in looking through the coverage report is GIST
index build: gistbuild.c is only showing 45% coverage, and
gistbuildbuffers.c a fat zero [1].  We've looked at that before [2]
but not made much progress on developing an adequately cheap test
case.  Maybe you could pick up where that thread left off?  Or if that
doesn't seem interesting to you, there's lots of other possibilities.
I'd suggest getting some buy-in from this list on what to work on
before you start, though.

			regards, tom lane

[1] https://coverage.postgresql.org/src/backend/access/gist/index.html

[2] https://www.postgresql.org/message-id/flat/10261.1588705157%40sss.pgh.pa.us#46b998e6585f0bf0fd7b7570...






view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Add tests for psql tab completion
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox