From patchwork Thu Feb 5 08:16:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44408 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 99D7F21173 for ; Thu, 5 Feb 2015 08:16:46 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf4253074lbv.1 for ; Thu, 05 Feb 2015 00:16:45 -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=lQLQ9rjlJ37jxt02dL8Q0UeCdP/4EI+oLYtXSk/HLEGguiwL+rsXxPBsSfeSdMOFhS 8aGyw640v8y1RCQEk+8XrFOlE5dQj05tSKjXiYGEFgwOtSubLDuxv6PXzE+uWCykmsWt tdsmZfvE6v3ktMumovP4y40qyK1Eo0wSbBs0vzmC/dOnDKrsxJeSDYjAWYrnbRXr4HJV FqdOjH88cx1jxObQriWbeYQzISoo5BpdYBzvi4lVKX3dfBVYufZbyMn3o0nFJAVHUOFa Nwb1hjBQCW4yLDCtnFkO0WM40cl01E1FI0rbLIPo6IKATt1Je0au9Qe5xfHmT3VF9v9H Kr+g== X-Gm-Message-State: ALoCoQmTfFxGBggq11M62rT//FQgigoypBb/fVJuoipLL1l291bIuFk4q+GW5VtlKF0x6CRHUWEl X-Received: by 10.113.5.167 with SMTP id cn7mr269128lbd.21.1423124205208; Thu, 05 Feb 2015 00:16:45 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.193 with SMTP id le1ls129781lab.11.gmail; Thu, 05 Feb 2015 00:16:45 -0800 (PST) X-Received: by 10.112.199.69 with SMTP id ji5mr2043326lbc.45.1423124204988; Thu, 05 Feb 2015 00:16:44 -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 g8si3345106laf.55.2015.02.05.00.16.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 00:16:44 -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 mail-la0-f41.google.com with SMTP id gm9so5937547lab.0 for ; Thu, 05 Feb 2015 00:16:44 -0800 (PST) X-Received: by 10.152.20.4 with SMTP id j4mr2071233lae.29.1423124204890; Thu, 05 Feb 2015 00:16:44 -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 h5csp991921lbj; Thu, 5 Feb 2015 00:16:44 -0800 (PST) X-Received: by 10.224.69.67 with SMTP id y3mr5559674qai.59.1423124203351; Thu, 05 Feb 2015 00:16:43 -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 jq6si5373138qcb.19.2015.02.05.00.16.42 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Feb 2015 00:16:43 -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 1YJHc8-0003cN-Jd; Thu, 05 Feb 2015 08:16:40 +0000 Received: from mail-lb0-f176.google.com ([209.85.217.176]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YJHbl-0003aF-8B for lng-odp@lists.linaro.org; Thu, 05 Feb 2015 08:16:17 +0000 Received: by mail-lb0-f176.google.com with SMTP id w7so1319004lbi.7 for ; Thu, 05 Feb 2015 00:16:11 -0800 (PST) X-Received: by 10.152.7.38 with SMTP id g6mr2074220laa.65.1423124171696; Thu, 05 Feb 2015 00:16:11 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id nq7sm807336lbb.49.2015.02.05.00.16.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Feb 2015 00:16:10 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Thu, 5 Feb 2015 09:16:00 +0100 Message-Id: <1423124161-18716-6-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423124161-18716-1-git-send-email-ola.liljedahl@linaro.org> References: <1423124161-18716-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: timers patch Subject: [lng-odp] [PATCHv5 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.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 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) {