From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: "phillip.wood\@talktalk.net" <phillip.wood@talktalk.net>,
git@vger.kernel.org, Phillip Wood <phillip.wood@dunelm.org.uk>,
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Subject: Re: [PATCH] sequencer: assign only free()able strings to gpg_sign
Date: Fri, 22 Dec 2017 10:40:38 -0800 [thread overview]
Message-ID: <xmqqpo76sj15.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1.1712221817470.406@MININT-6BKU6QN.europe.corp.microsoft.com> (Johannes Schindelin's message of "Fri, 22 Dec 2017 18:20:31 +0100 (STD)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> I thought the bug could be triggered when commit.gpgsign was true and
>> it was not overriden on the commandline, is it worth adding a test for
>> that?
>
> ... If we want to verify that the
> gpg_sign is correctly allocated before it is free()d, then the test case I
> added *already* covers it,...
It depends on what we are testing, how we anticipate this code will
be broken by others in the future and how we want to futureproof the
code. We can say "already covers it" if we know the implementation
(especially, the code calls free() when it replaces opts->gpg_sign
always, so the other side you are choosing not to test will die the
same way) and assume it won't be broken (i.e. the attitude is OK for
whitebox testing).
I'd think that this particular case it is sufficient to test just
one; I doubt that adding another will increse the test load
measurably, though.
next prev parent reply other threads:[~2017-12-22 18:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-22 11:50 [PATCH] sequencer: assign only free()able strings to gpg_sign Johannes Schindelin
2017-12-22 12:58 ` phillip.wood
2017-12-22 17:20 ` Johannes Schindelin
2017-12-22 18:40 ` Junio C Hamano [this message]
2017-12-22 21:36 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqpo76sj15.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=kaartic.sivaraam@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=phillip.wood@talktalk.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).