From patchwork Tue Feb 3 15:44:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44253 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1DE6621513 for ; Tue, 3 Feb 2015 15:44:58 +0000 (UTC) Received: by mail-we0-f197.google.com with SMTP id l61sf21471258wev.0 for ; Tue, 03 Feb 2015 07:44:57 -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=eXYuObd3kS0OgVATZZUm4imlaweTRhlV1ar01MKsM4Q=; b=gVxiEAmBtsiCW1IXdtoaqlO0DxgR64nj1FavBJpOHmjPKAe5oghTn365T/JJu5pH1G cuwOzOM+QpxeIHB2NRoRUw/Bdn4A8p5aOOhoQEZcHS6KkgJSZ6CuYXNMOmKd24gTB9KW kFkJNCW/qtkZ/LCQzScZjglljjzK643PT9ZUjNst3ULHS2V+eiSw0s2SUB3Bap6/ckKB BExW63lKHXtJ8V9lrSgYb28vr2yRPwPQzIbij0Upn4HUtUKX0qtw2EeDY0pP6UoWKe2J D1n1rlAwaBQQmlMcQn+SFRtRQq0pslAh/b89msVybDnoFXalhTMl+9SMv8Efc4M0VULV r0EA== X-Gm-Message-State: ALoCoQkkzzCG73AFwexEInGRDgOt2Eomzl/YA/tJAlCFqWxpjPkj+w0z3zX+5mNjyQlEsjhe+wwX X-Received: by 10.194.86.1 with SMTP id l1mr3216875wjz.0.1422978297223; Tue, 03 Feb 2015 07:44:57 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.162 with SMTP id dd2ls405975lad.81.gmail; Tue, 03 Feb 2015 07:44:57 -0800 (PST) X-Received: by 10.152.44.228 with SMTP id h4mr19591844lam.31.1422978297044; Tue, 03 Feb 2015 07:44:57 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id v4si19539209lav.14.2015.02.03.07.44.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 07:44:57 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id pn19so6971421lab.2 for ; Tue, 03 Feb 2015 07:44:57 -0800 (PST) X-Received: by 10.152.36.162 with SMTP id r2mr12179151laj.9.1422978296910; Tue, 03 Feb 2015 07:44:56 -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 h5csp2018827lbj; Tue, 3 Feb 2015 07:44:56 -0800 (PST) X-Received: by 10.224.80.135 with SMTP id t7mr53830608qak.65.1422978295497; Tue, 03 Feb 2015 07:44:55 -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 x4si25727361qai.103.2015.02.03.07.44.54 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 07:44:55 -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 1YIfem-0004vE-WE; Tue, 03 Feb 2015 15:44:53 +0000 Received: from mail-lb0-f179.google.com ([209.85.217.179]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIfeQ-0004si-70 for lng-odp@lists.linaro.org; Tue, 03 Feb 2015 15:44:30 +0000 Received: by mail-lb0-f179.google.com with SMTP id 10so39287849lbg.10 for ; Tue, 03 Feb 2015 07:44:24 -0800 (PST) X-Received: by 10.112.92.204 with SMTP id co12mr14409378lbb.43.1422978264607; Tue, 03 Feb 2015 07:44:24 -0800 (PST) Received: from localhost.localdomain (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id k2sm325464lah.32.2015.02.03.07.44.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Feb 2015 07:44:24 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Tue, 3 Feb 2015 16:44:12 +0100 Message-Id: <1422978253-7721-6-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422978253-7721-1-git-send-email-ola.liljedahl@linaro.org> References: <1422978253-7721-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: timers patch Subject: [lng-odp] [PATCHv4 5/6] validation: odp_timer.c: remove usage of perror/abort 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.43 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 Replace usage of perror and abort with CU_FAIL_FATAL in order for fatal errors not to disturb the overall validation flow. 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 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c index 5c997ee..5218406 100644 --- a/test/validation/odp_timer.c +++ b/test/validation/odp_timer.c @@ -11,7 +11,6 @@ /* For rand_r and nanosleep */ #define _POSIX_C_SOURCE 200112L #include -#include #include #include "odp_cunit_common.h" #include "test_debug.h" @@ -124,7 +123,7 @@ static void *worker_entrypoint(void *arg) struct test_timer *tt = malloc(sizeof(struct test_timer) * NTIMERS); if (tt == NULL) - perror("malloc"), abort(); + CU_FAIL_FATAL("malloc failed"); /* Prepare all timers */ for (i = 0; i < NTIMERS; i++) { @@ -215,7 +214,7 @@ static void *worker_entrypoint(void *arg) ts.tv_sec = 0; ts.tv_nsec = 1000000; /* 1ms */ if (nanosleep(&ts, NULL) < 0) - perror("nanosleep"), abort(); + CU_FAIL_FATAL("nanosleep failed"); } /* Cancel and free all timers */ @@ -246,7 +245,7 @@ static void *worker_entrypoint(void *arg) ts.tv_sec = 0; ts.tv_nsec = 1000000; /* 1ms */ if (nanosleep(&ts, NULL) < 0) - perror("nanosleep"), abort(); + CU_FAIL_FATAL("nanosleep failed"); while (nstale != 0) { odp_event_t ev = odp_queue_deq(queue); if (ev != ODP_EVENT_INVALID) {