From patchwork Thu Mar 5 09:47:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 45451 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B8F99204BC for ; Thu, 5 Mar 2015 09:47:38 +0000 (UTC) Received: by wiwh11 with SMTP id h11sf24425050wiw.1 for ; Thu, 05 Mar 2015 01:47:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=+Z6AGCfUG15b87Q8YJKi6fyjIxi0/mg8ERYZPswofbk=; b=Lr2r4v/T1h0dNgu5Iv0cliac2QhaKGYTL6IUy8KNrFfgeXiFRrjB0au/vdOZ0bl+iQ 8uztl2ggTL0P+xnh11951Gi05v+3idP1ni/RAQ7tBOBjs5w+bahZD325OHXf9vFn/9DJ m5cqQn07WpytDNbX5g0g5fey+P0/6O8TlYBO8O1BEoH1HqlVZNmulWvYZoF/ytyL/Pqb 1nkkbs5YhOk1f8A6dW9g7PbpDDfW9JngUHPOun33lzv3DsUV+1FKO32QtmYuaNJPb2pI BwhH0oBfXDzcbKLykbzAUH7RVR8G4nnDuNrXrFMPA5447DQ9TG9aZ5pWwzpq+8nY4PKu aHIg== X-Gm-Message-State: ALoCoQk3lIZ8uNKl4tVJNQUkXxYP8hRPqMK3/uj+dIcPRcS3VM2n0FuLbW9jQhWK4Q4zkV1/RZxC X-Received: by 10.180.109.34 with SMTP id hp2mr100035wib.4.1425548858018; Thu, 05 Mar 2015 01:47:38 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.246.38 with SMTP id xt6ls284858lac.102.gmail; Thu, 05 Mar 2015 01:47:37 -0800 (PST) X-Received: by 10.152.23.195 with SMTP id o3mr6822644laf.11.1425548857512; Thu, 05 Mar 2015 01:47:37 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id s4si4163662lbo.42.2015.03.05.01.47.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 01:47:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by labmn12 with SMTP id mn12so14044126lab.2 for ; Thu, 05 Mar 2015 01:47:37 -0800 (PST) X-Received: by 10.152.87.3 with SMTP id t3mr7101833laz.19.1425548857428; Thu, 05 Mar 2015 01:47:37 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp372997lbj; Thu, 5 Mar 2015 01:47:36 -0800 (PST) X-Received: by 10.55.55.81 with SMTP id e78mr15969090qka.107.1425548856070; Thu, 05 Mar 2015 01:47:36 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id s16si3317093qac.100.2015.03.05.01.47.34 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Mar 2015 01:47:36 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YTSNQ-0003Mc-T5; Thu, 05 Mar 2015 09:47:32 +0000 Received: from mail-la0-f49.google.com ([209.85.215.49]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YTSNL-0003MX-66 for lng-odp@lists.linaro.org; Thu, 05 Mar 2015 09:47:27 +0000 Received: by labgd6 with SMTP id gd6so3207636lab.3 for ; Thu, 05 Mar 2015 01:47:21 -0800 (PST) X-Received: by 10.112.239.1 with SMTP id vo1mr7152418lbc.110.1425548841050; Thu, 05 Mar 2015 01:47:21 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id yu8sm1190023lbb.26.2015.03.05.01.47.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Mar 2015 01:47:20 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Thu, 5 Mar 2015 10:47:15 +0100 Message-Id: <1425548835-5105-1-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: timers patch Subject: [lng-odp] [PATCHv2] validation: odp_timer: cleanup for clean termination X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ola.liljedahl@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Free queue and timeouts, destroy timeout pool before termination. https://bugs.linaro.org/show_bug.cgi?id=1285 Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) Removed reference to Linaro CARDS as this is internal. test/validation/odp_timer.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c index 88af61b..3e83367 100644 --- a/test/validation/odp_timer.c +++ b/test/validation/odp_timer.c @@ -336,6 +336,11 @@ static void *worker_entrypoint(void *arg) if (ev != ODP_EVENT_INVALID) CU_FAIL("Unexpected event received"); + odp_queue_destroy(queue); + for (i = 0; i < NTIMERS; i++) { + if (tt[i].ev != ODP_EVENT_INVALID) + odp_timeout_free(odp_timeout_from_event(tt[i].ev)); + } LOG_DBG("Thread %u: exiting\n", thr); return NULL; } @@ -426,6 +431,10 @@ static void test_odp_timer_all(void) /* Destroy timer pool, all timers must have been freed */ odp_timer_pool_destroy(tp); + /* Destroy timeout pool, all timeouts must have been freed */ + int rc = odp_pool_destroy(tbp); + CU_ASSERT(rc == 0); + CU_PASS("ODP timer test"); }