From patchwork Wed Feb 25 12:16:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 45045 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E09812142A for ; Wed, 25 Feb 2015 12:17:02 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf3130759wiw.0 for ; Wed, 25 Feb 2015 04:17:02 -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:in-reply-to :references: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=v1Oz/1iO0SRn3HynWjjwgjmhMHrdhvaVMxE//F1Qxso=; b=LXlR7L26AZfdvgDK1NIaarvhYJX/FgvzpFiKl5cIVZWLmjbXi8E05uohvXDK1w/wJs q6YCWUbiwoXYN3lyz0dAlOkN7qugFkQMkvF4KYHpS1DfNug27qnlWK18Wp4ztOvmUejY AwXwWuClxlMKpoxSsR7Fe7+kOOEZAwAyZCSQLaW085qJ6Vf3hFn1S3qQald6/1HKPBQx VmHbgvksaWVbhDx0loXgwsHABjB672nUdjHmOHGvfv7MQ8Z1xEcJSLa2jVDQoKpRRE1a BGIZUWAvYwrBxMiPuEL5PGUcmg0RuWlv8VfAummy1Z6rR2Ycp3Vm5NQuvH5M9VL3+Hfj pDdA== X-Gm-Message-State: ALoCoQnnpAkkSmOtg+boWkf+n8/9Xnshp9N3+FHJbR9GhW4b2vRopTd09z5C8zKRzAwRAi36wBpd X-Received: by 10.112.222.131 with SMTP id qm3mr420408lbc.1.1424866621999; Wed, 25 Feb 2015 04:17:01 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.165 with SMTP id m5ls829907lag.31.gmail; Wed, 25 Feb 2015 04:17:01 -0800 (PST) X-Received: by 10.112.215.35 with SMTP id of3mr2477924lbc.101.1424866621855; Wed, 25 Feb 2015 04:17:01 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id my5si28911630lbb.93.2015.02.25.04.17.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 04:17:01 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by labgf13 with SMTP id gf13so3390418lab.9 for ; Wed, 25 Feb 2015 04:17:01 -0800 (PST) X-Received: by 10.112.181.41 with SMTP id dt9mr2634876lbc.56.1424866621764; Wed, 25 Feb 2015 04:17:01 -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 h5csp2578521lbj; Wed, 25 Feb 2015 04:17:01 -0800 (PST) X-Received: by 10.140.105.97 with SMTP id b88mr6082870qgf.94.1424866620582; Wed, 25 Feb 2015 04:17:00 -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 w71si15799948qha.90.2015.02.25.04.16.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 25 Feb 2015 04:17:00 -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 1YQatd-00068N-9u; Wed, 25 Feb 2015 12:16:57 +0000 Received: from mail-wi0-f176.google.com ([209.85.212.176]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQatR-00067f-N8 for lng-odp@lists.linaro.org; Wed, 25 Feb 2015 12:16:45 +0000 Received: by mail-wi0-f176.google.com with SMTP id h11so32824371wiw.3 for ; Wed, 25 Feb 2015 04:16:40 -0800 (PST) X-Received: by 10.194.87.100 with SMTP id w4mr5351858wjz.65.1424866599887; Wed, 25 Feb 2015 04:16:39 -0800 (PST) Received: from e106441.cambridge.arm.com ([2001:41d0:a:3cb4::1]) by mx.google.com with ESMTPSA id u16sm25388747wjr.5.2015.02.25.04.16.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Feb 2015 04:16:39 -0800 (PST) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Wed, 25 Feb 2015 12:16:00 +0000 Message-Id: <1424866561-3728-3-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1424866561-3728-1-git-send-email-stuart.haslam@linaro.org> References: <1424866561-3728-1-git-send-email-stuart.haslam@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/3] validation: pktio: destroy interface specific pools 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: stuart.haslam@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.42 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 Signed-off-by: Stuart Haslam --- test/validation/odp_pktio.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c index 6bcec6c..effe059 100644 --- a/test/validation/odp_pktio.c +++ b/test/validation/odp_pktio.c @@ -621,12 +621,31 @@ static int init_pktio_suite(void) static int term_pktio_suite(void) { + char pool_name[ODP_POOL_NAME_LEN]; + odp_pool_t pool; + int i; + int ret = 0; + + for (i = 0; i < num_ifaces; ++i) { + snprintf(pool_name, sizeof(pool_name), + "pkt_pool_%s", iface_name[i]); + pool = odp_pool_lookup(pool_name); + if (pool == ODP_POOL_INVALID) + continue; + + if (odp_pool_destroy(pool) != 0) { + fprintf(stderr, "error: failed to destroy pool %s\n", + pool_name); + ret = -1; + } + } + if (odp_pool_destroy(default_pkt_pool) != 0) { fprintf(stderr, "error: failed to destroy default pool\n"); - return -1; + ret = -1; } - return 0; + return ret; } CU_TestInfo pktio_tests[] = {