Test failure with latest code
Ton Voon
tonvoon at gmail.com
Fri Sep 3 18:12:32 CEST 2010
Hi!
I've noticed that there is a test failure in the Nagios Tinderbox
builds.
This started on 28th August: http://tinderbox.nagios.org/cgi-bin/tinder.cgi?tree=nagios&start-time=1283080801&display-hours=100
The test case is test_events, which does various tests on the events
code.
This is the test:
/* This test should have both services moved forward due to
not executing any service checks */
/* Will make svc2 move forward by a retry_interval amount */
execute_service_checks=0;
sigshutdown=FALSE;
currently_running_service_checks=0;
max_parallel_service_checks=1;
setup_events(now);
svc2->current_state=STATE_CRITICAL;
event_execution_loop();
ok(svc1->next_check == now+300, "svc1 rescheduled ahead -
normal interval" );
ok(svc2->next_check == now+60, "svc2 rescheduled ahead -
retry interval" );
svc1's next_check is moved forward because it executes. svc2 should
also get rescheduled, but doesn't - the next_check stays the same.
The change where run_event=TRUE was set in events.c is the culprit
(from http://tracker.nagios.org/view.php?id=152), but I don't
understand what it is trying to do and if the test is still valid.
In the tracker item, the other suggestion was to change the subsequent
if() to an else if(). This makes the test pass, which makes me believe
that resetting run_event to TRUE is causing different side effects.
I changed the max_parallel_service_checks to 2 and svc2 is still not
getting rescheduled.
So can anyone confirm if either the current code:
* causes breakage or
* means that the test is now invalid and svc2->next_check should ==
now
Ton
------------------------------------------------------------------------------
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
More information about the Developers
mailing list