From: Vegard Nossum <vegard.nossum@oracle.com>
To: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: [RFC][PATCH] index-pack: add testcases found using AFL
Date: Mon, 13 Mar 2017 12:07:32 +0100 [thread overview]
Message-ID: <ee3f01f0-2dc1-f919-223c-dad6032fa396@oracle.com> (raw)
In-Reply-To: <xmqq7f3uuzuu.fsf@gitster.mtv.corp.google.com>
On 12/03/2017 19:14, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
>> One further devil's advocate:
>>
>> If people really _do_ care about coverage, arguably the AFL tests are a
>> pollution of that concept. Because they are running the code, but doing
>> a very perfunctory job of testing it. IOW, our coverage of "code that
>> doesn't segfault or trigger ASAN" is improved, but our coverage of "code
>> that has been tested to be correct" is not (and since the tests are
>> lumped together, it's hard to get anything but one number).
>>
>> So I dunno. I remain on the fence about the patch.
>
> Yeah, I have been disturbed by your earlier remark "binary test
> cases that nobody, not even the author, understands", and the above
> summarizes it more clearly.
>
> Continuously running fuzzer tests on the codebase would have value,
> but how exactly are these fuzzballs generated? Don't they depend on
> the code being tested? IOW, how effective is a set of fuzzballs
> that forces the code to take more branches in the current codepath
> for the purpose of testing new code that updates the codepath,
> changing the structure of the codeflow? Unless a new set of
> fuzzballs to match the updated codeflow is generated, wouldn't the
> test coverage with these fuzzballs erode over time, making them less
> and less useful baggage we carry around, without nobody noticing that
> they no longer are effective to help test coverage?
Yes, the testcases are generated based on the feedback from the
instrumented code, so they are very clearly shaped by the code itself.
However, I think it's more useful to think of these testcases not as
"binary test that nobody knows what they are doing", but as "(sometimes
invalid) packfiles which tickle interesting code paths in the packfile
parser".
With this perspective it becomes clearer that while they were generated
from the code, they also in a sense describe the packfile format itself.
I did a few experiments in changing the code of the packfile reader in
various small ways (e.g. deleting a check, reordering some code) to see
the effects of the testcases found by fuzzing, and I have to admit it
was fairly disappointing. The testcases I added did not catch a single
buggy change, whereas the other testcases did catch many of them.
So I guess you are right -- these testcases are maybe really not that
useful as part of the test suite without explicit comparison between the
expected and actual results.
Forget about the patch, I will just put the testcases in a separate repo
instead. Maybe I will convert some of them into "real" tests.
Thanks, and sorry for the noise.
Vegard
next prev parent reply other threads:[~2017-03-13 11:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170310151556.18490-1-vegard.nossum@oracle.com>
2017-03-10 16:00 ` [RFC][PATCH] index-pack: add testcases found using AFL Vegard Nossum
2017-03-10 19:06 ` Jeff King
2017-03-10 19:34 ` Vegard Nossum
2017-03-10 19:42 ` Jeff King
2017-03-10 21:18 ` Vegard Nossum
2017-03-12 12:24 ` Jeff King
2017-03-10 22:58 ` Ævar Arnfjörð Bjarmason
2017-03-12 12:32 ` Jeff King
2017-03-12 13:44 ` Vegard Nossum
2017-03-12 18:14 ` Junio C Hamano
2017-03-13 11:07 ` Vegard Nossum [this message]
2017-03-13 17:11 ` Junio C Hamano
2017-03-13 19:13 ` Vegard Nossum
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=ee3f01f0-2dc1-f919-223c-dad6032fa396@oracle.com \
--to=vegard.nossum@oracle.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.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.
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 NNTP newsgroup(s).