Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Taylor Blau <me@ttaylorr.com>, Siddharth Singh <siddhartth@google.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC PATCH 0/1] Unit tests for khash.h
Date: Thu, 1 Jun 2023 14:02:54 +0100	[thread overview]
Message-ID: <35bd6c86-66e8-13c8-4a8d-5822953fedb1@gmail.com> (raw)
In-Reply-To: <ZHfLwpX7nNVjBvE5@nand.local>

Hi Taylor

On 31/05/2023 23:35, Taylor Blau wrote:
> Hi Siddharth,
> 
> On Wed, May 31, 2023 at 05:51:41PM +0200, Siddharth Singh wrote:
>> This RFC patch adds unit tests for khash.h. It uses the C TAP harness
>> to illustrate the test cases [1]. This is not intended to be a
>> complete implementation. The purpose of this patch to get your
>> thoughts on the unit test content, not the test framework itself.
> 
> Thanks for working on this, and for opening the discussion up. I took
> only a brief look through the actual changes. But I think the much more
> interesting discussion is on the approach, so I'll refrain from
> commenting on the tests themselves.
> 
> I am somewhat skeptical of this as a productive direction, primarily
> because khash already has tests [1] that exercise its functionality. I'm
> not necessarily opposed to (light) testing of oid_set, oid_map, and
> oid_pos, which are khash structures, but declared by Git.

I agree that starting by adding tests for third party code is a bit 
curious, but those tests you linked to look like they're testing 
performance rather than correctness.

Best Wishes

Phillip

> Even still, I don't think that we are testing much in that case, since
> the boundary between Git and khash is limited to the KHASH_INIT macro.
> 
> So... I dunno. I'm not strongly opposed here, but I think this is
> probably not the most productive place to start adding tests.
> 
> Thanks,
> Taylor
> 
> [1]: https://github.com/attractivechaos/klib/blob/master/test/khash_test.c


  parent reply	other threads:[~2023-06-01 13:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 15:51 [RFC PATCH 0/1] Unit tests for khash.h Siddharth Singh
2023-05-31 15:51 ` [RFC PATCH 1/1] khash_test.c: add unit tests Siddharth Singh
2023-05-31 22:35 ` [RFC PATCH 0/1] Unit tests for khash.h Taylor Blau
2023-06-01  6:26   ` Junio C Hamano
2023-06-01 13:02   ` Phillip Wood [this message]
2023-05-31 23:35 ` Eric Wong
2023-06-01 13:23 ` Phillip Wood
2023-06-27 13:20 ` [RFC PATCH v2] khash_test.c : add unit tests Siddharth Singh
2023-06-30  0:53   ` Glen Choo
2023-07-07 15:04     ` Siddharth Singh
2023-07-07 21:12       ` Glen Choo
2023-06-30  1:05   ` Glen Choo

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=35bd6c86-66e8-13c8-4a8d-5822953fedb1@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=siddhartth@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).