From patchwork Wed Mar 4 20:37:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 45444 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 67231204BC for ; Wed, 4 Mar 2015 20:38:20 +0000 (UTC) Received: by lbdu14 with SMTP id u14sf5377330lbd.3 for ; Wed, 04 Mar 2015 12:38:19 -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=UG5rs0UARtnPJjUA2e++EVRQZUSsxfYT7LylkHHkVcQ=; b=NKGwZzg7vDOH03H9BHd6iOXmZD4DK2ke/XBlwVO8qP3ZQLEQkxUZikiz9HNTSDkCj0 HiHbjyk7LElKJ87BqfeYqQvZwLvMkYdj8K0Uoyxf4VwBKIy3SEmaQrDW5v/8rR64ChL2 FFYusQ/X2K9qL5KeMs3Z299LkNFXmA1L00Qo4A2LfEiIJ/6XbyorSKblyFlSA376o/Ry 7W6iVckBpkrN9QN0hsPyJV7EEp74hLNl7azyRv3N9YhBzedaswtSSe1AQwEZPkiIawRl 7N+3jVn02sd9dHRYQyUyZ9NgYvqM+WbJQdWNjsFX0qzpNTkIIhbSAIqMpHCm3PWCn+L+ K6ug== X-Gm-Message-State: ALoCoQlD5oJ/H0h4hA4lkaE44eJgjEVB8KNKRk5PEKMgnNYNbpfit67SST1TGnskH/9r6UuOtnuJ X-Received: by 10.112.147.35 with SMTP id th3mr957545lbb.15.1425501499424; Wed, 04 Mar 2015 12:38:19 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.172 with SMTP id dd12ls259821lad.20.gmail; Wed, 04 Mar 2015 12:38:19 -0800 (PST) X-Received: by 10.112.90.193 with SMTP id by1mr4901931lbb.113.1425501498963; Wed, 04 Mar 2015 12:38:18 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id t4si3177817lbj.108.2015.03.04.12.38.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 12:38:18 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbvp9 with SMTP id p9so23980555lbv.8 for ; Wed, 04 Mar 2015 12:38:18 -0800 (PST) X-Received: by 10.152.26.201 with SMTP id n9mr4974894lag.29.1425501498879; Wed, 04 Mar 2015 12:38:18 -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 h5csp71936lbj; Wed, 4 Mar 2015 12:38:18 -0800 (PST) X-Received: by 10.140.82.71 with SMTP id g65mr7903968qgd.42.1425501497390; Wed, 04 Mar 2015 12:38:17 -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 h142si4388667qhc.30.2015.03.04.12.38.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Mar 2015 12:38:17 -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 1YTG3V-0006K7-Hc; Wed, 04 Mar 2015 20:38:09 +0000 Received: from mail-lb0-f169.google.com ([209.85.217.169]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YTG3I-0006HN-MZ for lng-odp@lists.linaro.org; Wed, 04 Mar 2015 20:37:56 +0000 Received: by lbiv13 with SMTP id v13so28323836lbi.1 for ; Wed, 04 Mar 2015 12:37:50 -0800 (PST) X-Received: by 10.112.133.225 with SMTP id pf1mr5079138lbb.33.1425501470429; Wed, 04 Mar 2015 12:37:50 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id ks4sm942546lac.23.2015.03.04.12.37.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Mar 2015 12:37:49 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Wed, 4 Mar 2015 21:37:44 +0100 Message-Id: <1425501464-10035-1-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: timers patch Subject: [lng-odp] [PATCH] 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.217.180 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://cards.linaro.org/browse/LNG-831 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) 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"); }