[quagga-dev 8817] Re: [PATCH 1/2] lib: Optimize Fletcher and Internet checksums
paul at jakma.org
Thu Sep 8 13:52:37 BST 2011
On Thu, 8 Sep 2011, Joakim Tjernlund wrote:
> Just found out that the odd byte handling in my patch is wrong for BE
> archs(even the RFC got this wrong apparently)
So I was justified in not accepting this patch because it had no unit
Seriously though, patches need to come with unit-tests as much as
possible. Certainly, there's little reason code can not be organised so
that functional logic ('functional' in the "not dependent on state other
than the arguments" sense) is separated as much as possible from the
stateful logic. Then there should be no reason why the functional parts
at least can not be supplied with unit-tests.
Also, we need to get away from subjective justifications for patches, and
instead quantifiably measure their impact, if we want to get to an
objective basis for committing patches. So if there's a performance
justification for a patch, there ought to a test-case (preferably an
isolated one) to demonstrate the change in performance.
In summary, we need to get to a place where the norm for code
contributions is that they:
* Separate out functional logic, for ease of testing
* Come with unit-tests
* Come with an objective justification for their integration (e.g. fixes X
bugs, comes with a Y% perf improvement on this test-case).
Also, on a tangent, I've long gotten got quite sick of writing commit
messages for other people.
Paul Jakma paul at jakma.org Key ID: 64A2FF6A
It was Penguin lust... at its ugliest.
More information about the Quagga-dev