Bug in exclude timeperiods code? (t-tap/test_timeperiods.c)

nap naparuba at gmail.com
Fri Sep 3 13:35:37 CEST 2010


On Mon, Aug 9, 2010 at 11:26 AM, Ton Voon <tonvoon at gmail.com> wrote:
>
> On 5 Aug 2010, at 13:43, nap wrote:
>
>> Hi,
>>
>> I can't code, but I can propose an algorithm that works (optimal I
>> don't know). It just need functions to get the start and end see from
>> a time we want for all daterange types (maybe there are already theses
>> functions).
>>
>> Then it' a recursive algo between valid/invalid (will always go
>> thurser and stop at begining+1 year so it will stop). The "next
>> invalid" function is like valid, for each daterange we search the next
>> invalid, check is this time is globally invalid (can be invalid for a
>> daterange but valid for another one) and take the min. Then check for
>> it's own exclude of course (so next valid for them).
>>
>> I hope someone will code it.
>>
>>
>> Jean
>
> Hi Jean,
>
> Can you clean up your test and add them as a TODO? This will help when
> we get round to coding it, to make sure it hits all the right cases.
>
> As many different examples as possible would be great.
>
> Ton
Hi Ton,

Here is the 2 patchs for a total of 4 test cases with exclude. They
call different type of daterange.


Jean


>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minimal.cfg.diff
Type: application/octet-stream
Size: 1424 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20100903/ae475621/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_timeperiods.c.diff
Type: application/octet-stream
Size: 2880 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20100903/ae475621/attachment-0001.obj>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list