From patchwork Thu Apr 2 17:21:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 46730 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 38BF3215A9 for ; Thu, 2 Apr 2015 17:21:45 +0000 (UTC) Received: by lbcne10 with SMTP id ne10sf11735516lbc.1 for ; Thu, 02 Apr 2015 10:21:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to: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=D2ADFAwjQax9Bev39lbFfuzGGsJOdXiXZklN2xmIkjA=; b=HPt7CTAqNBbll9gbFgbzyhPDhSGwtS5e5A8C1S07LsBNKrO2EMnFMrnWylYxZQqslw J7ZjVWLWBJX1SGhmNs1l4XVPr5JD4eCtak86VoA52H4HUaT8jwXVVn+NT9HD+5oW1vXg PkBZLX9C2zJYu+SiAV7dunhNGRt8xUtiaRsTgbZqFT3V7Eoa2p2DFiXDzZR8DTcQ8//2 uUR+clfG0A5eyO8RhOST7BloLP5PRKpNjYQzKqvxin0dTbTXg8T4bVTk/dDMgALsy/MV mTTJbZCbHgRLrHuV0wLNFYgAncdvf+DXg35yfppHSahlR8C2OaJ42GMUK9lEihX/ZI7N SSSQ== X-Gm-Message-State: ALoCoQlrGL3Wglcff5+2DYK5J7LdbGBXgQkvS9ivyJRykmqIYURRt5jOzhKiiDJfw4SjyvxeAWU+ X-Received: by 10.112.142.1 with SMTP id rs1mr10962214lbb.19.1427995304126; Thu, 02 Apr 2015 10:21:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.25.193 with SMTP id e1ls244728lag.80.gmail; Thu, 02 Apr 2015 10:21:44 -0700 (PDT) X-Received: by 10.152.87.46 with SMTP id u14mr41484350laz.82.1427995303978; Thu, 02 Apr 2015 10:21:43 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id es16si4704334lbc.122.2015.04.02.10.21.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2015 10:21:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lagg8 with SMTP id g8so65043466lag.1 for ; Thu, 02 Apr 2015 10:21:43 -0700 (PDT) X-Received: by 10.152.234.169 with SMTP id uf9mr3419729lac.88.1427995303861; Thu, 02 Apr 2015 10:21:43 -0700 (PDT) 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.57.201 with SMTP id k9csp1479902lbq; Thu, 2 Apr 2015 10:21:43 -0700 (PDT) X-Received: by 10.140.37.7 with SMTP id q7mr60963765qgq.29.1427995302434; Thu, 02 Apr 2015 10:21:42 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 3si5645481qhw.9.2015.04.02.10.21.41; Thu, 02 Apr 2015 10:21:42 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 692EC650B1; Thu, 2 Apr 2015 17:21:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 3FC43650B4; Thu, 2 Apr 2015 17:21:20 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9E1E1650B2; Thu, 2 Apr 2015 17:21:18 +0000 (UTC) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by lists.linaro.org (Postfix) with ESMTPS id 314DD650B0 for ; Thu, 2 Apr 2015 17:21:18 +0000 (UTC) Received: by wgra20 with SMTP id a20so91869459wgr.3 for ; Thu, 02 Apr 2015 10:21:17 -0700 (PDT) X-Received: by 10.180.83.227 with SMTP id t3mr26114485wiy.90.1427995277469; Thu, 02 Apr 2015 10:21:17 -0700 (PDT) Received: from e106441.cambridge.arm.com ([2001:41d0:a:3cb4::1]) by mx.google.com with ESMTPSA id hi6sm8095316wjc.34.2015.04.02.10.21.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Apr 2015 10:21:16 -0700 (PDT) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Thu, 2 Apr 2015 18:21:08 +0100 Message-Id: <1427995268-20530-2-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1427995268-20530-1-git-send-email-stuart.haslam@linaro.org> References: <1427995268-20530-1-git-send-email-stuart.haslam@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 2/2] validation: common: catch odp_term_local/global failures X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 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" 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.44 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 7359ce3..2af4410 100644 --- a/test/validation/common/odp_cunit_common.c +++ b/test/validation/common/odp_cunit_common.c @@ -83,8 +83,15 @@ int main(void) if (0 != tests_global_term()) return -1; - 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; }