[Olsr-dev] -Werror. WAS: Android build & regex
Ferry Huberts
(spam-protected)
Mon Oct 15 17:11:32 CEST 2012
On 15-10-12 17:09, Hans of Guardian wrote:
>
> On Oct 15, 2012, at 11:03 AM, Henning Rogge wrote:
>
>> On Mon, Oct 15, 2012 at 4:57 PM, Hans of Guardian
>> <(spam-protected)> wrote:
>>>> I propose to enable the -Werror flag on DEBUG builds.
>>>>
>>>> Our default build is with debug and most people (like mdns)
>>>> build that way. Also, the debug builds (on my system) pass with
>>>> -Werror while the non-debug builds do not.
>>>
>>> As long as -Werror is not enabled when running "make", I can live
>>> with it being in a DEBUG mode, though I'll probably remove it
>>> frequently.
>>>
>>> But I think there is too much reliance on compiler warnings. I
>>> think olsrd would be better if that energy was spent on writing
>>> automated tests.
>>
>> I have written quite a few automatic tests for the basic framework
>> for OLSRv2, but writing tests for the routing code itself is very
>> difficult, even in the modularized new framework. In the current
>> code everything is connected to everything else... I don't know if
>> I could write tests for this.
>
> Runtime testing of routing would be very valuable, but yes, obviously
> not easy.
>
> For the kinds of stuff that compiler warnings will provide us, we can
> definitely write tests. Things like proper number formats and
> conversions, edge cases when using certain functions, buffer
> overflows and other exploits, etc.
>
> These tests can be bits of C code pretending to be the internals of
> olsrd with lots of fake data related to routing in order to get to
> the conditions needed for the test.
>
I think Henning would very much welcome your contributions in this area
to olsrd v2. For olsrd v1 it is impractical.
--
Ferry Huberts
More information about the Olsr-dev
mailing list