On 06/07/15 18:50, Maxim Uvarov wrote:
On 07/06/15 20:18, Zoltan Kiss wrote:
On 06/07/15 18:11, Zoltan Kiss wrote:
diff --git a/test/validation/queue/queue.c
b/test/validation/queue/queue.c
index 5f05e49..217c75e 100644
--- a/test/validation/queue/queue.c
+++ b/test/validation/queue/queue.c
@@ -91,6 +91,9 @@ static void queue_test_sunnydays(void)
*/
ret = odp_queue_enq_multi(queue_id, enev, MAX_BUFFER_QUEUE);
CU_ASSERT(MAX_BUFFER_QUEUE == ret);
+ for (i = ret; i < MAX_BUFFER_QUEUE; i++)
+ odp_event_free(enev[i]);
+
pev_tmp = deev;
do {
deq_ret = odp_queue_deq_multi(queue_id, pev_tmp,
Thinking further, we still has to make sure ret is not smaller than 0,
so the "if (ret < 0) ret = 0;" part would be necessary, isn't it?
Zoli
Does CU_ASSERT takes care about that?
I thought so too, but this one says only the *_FATAL versions do that:
http://cunit.sourceforge.net/doc/writing_tests.html
"Each assertion tests a single logical condition, and fails if the
condition evaluates to FALSE. Upon failure, the test function continues
unless the user chooses the 'xxx_FATAL' version of an assertion. In that
case, the test function is aborted and returns immediately. FATAL
versions of assertions should be used with caution! There is no
opportunity for the test function to clean up after itself once a FATAL
assertion fails. The normal suite cleanup function is not affected,
however."
Maxim.
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp