From: Tanay Abhra <tanayabh@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>,
Ramkumar Ramachandra <artagnon@gmail.com>,
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Subject: Re: [PATCH v3 3/3] test-config: add usage examples for non-callback query functions
Date: Thu, 26 Jun 2014 14:10:08 +0530 [thread overview]
Message-ID: <53ABDC68.4090701@gmail.com> (raw)
In-Reply-To: <CAPig+cTf+8H38SSxoLMSuU9JUSPiEuTCm=8wHFe5QSCK3j8ELw@mail.gmail.com>
Hi,
I thought about adding a test*.sh file after sending the series.
No worries, I will rectify it in the next patch.
Also, I have read all your comments.
Thanks for the review.
Cheers,
Tanay Abhra.
On 6/25/2014 4:49 PM, Eric Sunshine wrote:
> On Mon, Jun 23, 2014 at 6:11 AM, Tanay Abhra <tanayabh@gmail.com> wrote:
>> Add different usage examples for 'git_config_get_string' and
>> `git_config_get_string_multi`. They will serve as documentation
>> on how to query for config values in a non-callback manner.
>
> This is a good start, but it's not fully what Matthieu was suggesting
> when he said that you should prove to other developers, by way of
> reproducible tests, that your changes work. What he meant, was that
> you should write a test-config program which exposes (as a runnable
> command) the new config C API you've added, and then write tests which
> exercise that API and implementation exhaustively.
>
> For example, take a look at test-string-list.c and
> t/t0063-string-list.sh. The C program does no checking itself. It
> merely exposes the C API via command-line arguments, such as "split",
> "filter", etc. The test script then employs that program to perform
> the actual testing in a reproducible and (hopefully) exhaustive
> fashion. Because t/t0063-string-list.sh is part of the test suite, the
> string-list tests are run regularly by many developers. It's not just
> something that someone might remember to run once in a while.
>
> Contrary to your commit message and the comment in the program itself,
> the purpose of test-config is not to serve as documentation or to
> provide examples of usage. (Real documentation is better suited for
> those purposes.) Instead, test-config should exist in support of a
> real test script in t/ which is run regularly. The new script you add
> to t/ should exercise the exposed C API as exhaustively as possible.
> This means checking each possible state: for instance, (1) when a key
> is absent, (2) when a value is boolean (NULL), (3) one non-boolean
> (non-NULL) value, (4) multiple values, etc. Moreover, it should check
> expected success _and_ expected failure modes. Check not only that it
> returns expected values, but that it fails when appropriate.
>
> More below.
>
prev parent reply other threads:[~2014-06-26 8:40 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 10:11 [PATCH v3 0/3] git config cache & special querying api utilizing the cache Tanay Abhra
2014-06-23 10:11 ` [PATCH v3 1/3] string-list: add string_list initialiser helper functions Tanay Abhra
2014-06-23 12:36 ` Torsten Bögershausen
2014-06-23 13:19 ` Tanay Abhra
2014-06-23 10:11 ` [PATCH v3 2/3] config: add hashtable for config parsing & retrieval Tanay Abhra
2014-06-23 11:55 ` Matthieu Moy
2014-06-24 12:06 ` Tanay Abhra
2014-06-25 20:25 ` Karsten Blees
2014-06-23 14:57 ` Ramsay Jones
2014-06-23 16:20 ` Tanay Abhra
2014-06-24 15:32 ` Ramsay Jones
2014-06-26 16:15 ` Matthieu Moy
2014-06-23 23:25 ` Junio C Hamano
2014-06-24 7:23 ` Tanay Abhra
2014-06-25 18:21 ` Junio C Hamano
2014-06-24 7:25 ` Tanay Abhra
2014-06-24 15:57 ` Ramsay Jones
2014-06-25 18:13 ` Junio C Hamano
2014-06-25 20:23 ` Karsten Blees
2014-06-25 20:53 ` Junio C Hamano
2014-06-26 17:37 ` Matthieu Moy
2014-06-26 19:00 ` Junio C Hamano
2014-06-26 19:19 ` Karsten Blees
2014-06-26 21:21 ` Junio C Hamano
2014-06-27 8:19 ` Karsten Blees
2014-06-27 8:19 ` Matthieu Moy
2014-06-27 17:13 ` Junio C Hamano
2014-06-23 23:14 ` Junio C Hamano
2014-06-24 12:21 ` Tanay Abhra
2014-06-26 16:27 ` Matthieu Moy
2014-06-25 21:44 ` Karsten Blees
2014-06-26 16:43 ` Matthieu Moy
2014-06-23 10:11 ` [PATCH v3 3/3] test-config: add usage examples for non-callback query functions Tanay Abhra
2014-06-25 11:19 ` Eric Sunshine
2014-06-26 8:40 ` Tanay Abhra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53ABDC68.4090701@gmail.com \
--to=tanayabh@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.