From patchwork Tue Feb 24 11:57:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 44935 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CB0552029F for ; Tue, 24 Feb 2015 11:58:26 +0000 (UTC) Received: by lbiw7 with SMTP id w7sf16645625lbi.0 for ; Tue, 24 Feb 2015 03:58:25 -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=Oad0XzzsL14INdbITn3xq4RGtU2W9FwuvWLdOFv+KXk=; b=lEXOVOdFV1PIk63NbEYVQ0EBil1QSQQwjQRHObOt3EIWXLqlT8KOlgiBS/cT2mHfJh TJYZMzmM/UJrLhT45yaRzn/jP3LS4ZEu5bUrcNJRnYkyQUheOxwHtvtTrQ7eSc5AJYHQ 8FSYKuG4eFMmcKxs1cDNV/gwXKOfyWHCemSSwGYyKfruDRd/50WnL+3vixedtGIpkfv2 pVBGwAJsNqfj6mTl2YMG/ykCKcjxXfDZMkpx7/eGhpg0ISU3k2CHNt6+5KiMVkVcQpXY 4/WXKV/x+NE+k2sL8JT3+RQkNIFDvG25ZxuZVhvwiB3YZXgvpl+plTI7Yi7UDNSywibU tc0g== X-Gm-Message-State: ALoCoQlWF2tQVK8UuxvU+MH3P+WOIvtmF2PbNzhp/ynJVUBncxxVJ0WXMZQWzbkU+fsR7v5RR6ge X-Received: by 10.180.105.129 with SMTP id gm1mr2024929wib.3.1424779105769; Tue, 24 Feb 2015 03:58:25 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.225.132 with SMTP id rk4ls220446lac.79.gmail; Tue, 24 Feb 2015 03:58:25 -0800 (PST) X-Received: by 10.152.198.203 with SMTP id je11mr13936660lac.48.1424779105607; Tue, 24 Feb 2015 03:58:25 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id ao10si28244188lac.42.2015.02.24.03.58.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 03:58:25 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by lams18 with SMTP id s18so25125004lam.11 for ; Tue, 24 Feb 2015 03:58:25 -0800 (PST) X-Received: by 10.152.88.4 with SMTP id bc4mr14149018lab.86.1424779105342; Tue, 24 Feb 2015 03:58:25 -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 h5csp1860420lbj; Tue, 24 Feb 2015 03:58:24 -0800 (PST) X-Received: by 10.140.239.150 with SMTP id k144mr8746884qhc.77.1424779103640; Tue, 24 Feb 2015 03:58:23 -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 g9si38986074qgd.25.2015.02.24.03.58.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 24 Feb 2015 03:58:23 -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 1YQE84-0006Bv-83; Tue, 24 Feb 2015 11:58:20 +0000 Received: from mail-wg0-f41.google.com ([74.125.82.41]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQE7w-00069Z-Tl for lng-odp@lists.linaro.org; Tue, 24 Feb 2015 11:58:13 +0000 Received: by wgha1 with SMTP id a1so4761880wgh.12 for ; Tue, 24 Feb 2015 03:58:07 -0800 (PST) X-Received: by 10.194.192.167 with SMTP id hh7mr32207106wjc.151.1424779086746; Tue, 24 Feb 2015 03:58:06 -0800 (PST) Received: from e106441.cambridge.arm.com ([2001:41d0:a:3cb4::1]) by mx.google.com with ESMTPSA id u18sm59911569wjq.42.2015.02.24.03.58.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Feb 2015 03:58:06 -0800 (PST) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Tue, 24 Feb 2015 11:57:51 +0000 Message-Id: <1424779071-22631-2-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1424779071-22631-1-git-send-email-stuart.haslam@linaro.org> References: <1424779071-22631-1-git-send-email-stuart.haslam@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/2] validation: common: catch odp_term_local/global failures 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.41 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 Failures in odp_term_local() or odp_term_global() are an indication that the test did not correctly clean up after itself so should cause the test to fail. Signed-off-by: Stuart Haslam --- test/validation/common/odp_cunit_common.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/validation/common/odp_cunit_common.c b/test/validation/common/odp_cunit_common.c index b8d3313..b23af26 100644 --- a/test/validation/common/odp_cunit_common.c +++ b/test/validation/common/odp_cunit_common.c @@ -75,8 +75,15 @@ int main(void) CU_cleanup_registry(); - odp_term_local(); - odp_term_global(); + if (0 != odp_term_local()) { + fprintf(stderr, "error: odp_term_local() failed.\n"); + return -1; + } + + if (0 != odp_term_global()) { + fprintf(stderr, "error: odp_term_global() failed.\n"); + return -1; + } return (ret) ? -1 : 0; }