From patchwork Thu Jan 29 15:32:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 43945 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 677D12410D for ; Thu, 29 Jan 2015 15:33:48 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf21200563lbv.1 for ; Thu, 29 Jan 2015 07:33:44 -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=wqCNl6ltVRmOyFZGdJu6Ng6oMKKowNClbxlEUi6DaIE=; b=cNwXlXnQtIEY+7kK79+ODvJoGfDYfHZ2bzstFCd3anUBCXB84OdCY+mAYwjfNHm+YQ N5h2C9F2I+bWz7XrPQyetQF6s9XazZLFE2QIRI3g/SAKQiHa/Ggvwa7OSYzlSI1v9j5V Q1q62WCbJNmMgr//q0dhuZjwliUEkadF0pJVx8C8FnAmWJpzLqwGrb4DHq0FztZC/Mxt mxoR0UK2lK3D7tunTdrmDyGVyFDqLG+9Ox6F/ey/jdBUFbBpqroNIW/E4gWw5y7J/Nsd rZ/GrPTB3gAzqV60o0hdAGAdAFVTYJMkED7wgQbucT2plW+58xIzGf6/C1QCLIQDF5W+ sM3Q== X-Gm-Message-State: ALoCoQk7cEnsPgDfN+5geRlQ8MMyjSjl/6dDpQZai2oMPF8dDdPauoRQAR7KuCuZnzUX2//c9scB X-Received: by 10.112.37.72 with SMTP id w8mr186669lbj.6.1422545606107; Thu, 29 Jan 2015 07:33:26 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.9 with SMTP id v9ls179827laa.34.gmail; Thu, 29 Jan 2015 07:33:25 -0800 (PST) X-Received: by 10.152.4.8 with SMTP id g8mr1562181lag.58.1422545605923; Thu, 29 Jan 2015 07:33:25 -0800 (PST) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id v18si7687299lbp.130.2015.01.29.07.33.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Jan 2015 07:33:25 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id p9so29351260lbv.8 for ; Thu, 29 Jan 2015 07:33:25 -0800 (PST) X-Received: by 10.152.3.70 with SMTP id a6mr1444211laa.71.1422545605834; Thu, 29 Jan 2015 07:33: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 h5csp1798729lbj; Thu, 29 Jan 2015 07:33:25 -0800 (PST) X-Received: by 10.224.90.5 with SMTP id g5mr2382388qam.24.1422545604199; Thu, 29 Jan 2015 07:33:24 -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 z1si10568957qar.33.2015.01.29.07.33.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Jan 2015 07:33:24 -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 1YGr5s-00045U-Md; Thu, 29 Jan 2015 15:33:20 +0000 Received: from mail-lb0-f172.google.com ([209.85.217.172]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YGr5X-00042o-97 for lng-odp@lists.linaro.org; Thu, 29 Jan 2015 15:32:59 +0000 Received: by mail-lb0-f172.google.com with SMTP id l4so29407007lbv.3 for ; Thu, 29 Jan 2015 07:32:53 -0800 (PST) X-Received: by 10.152.163.100 with SMTP id yh4mr1469485lab.98.1422545573602; Thu, 29 Jan 2015 07:32:53 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id rv1sm2172650lbb.25.2015.01.29.07.32.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jan 2015 07:32:52 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Thu, 29 Jan 2015 16:32:40 +0100 Message-Id: <1422545560-6466-6-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422545560-6466-1-git-send-email-ola.liljedahl@linaro.org> References: <1422545560-6466-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: timers patch Subject: [lng-odp] [PATCHv4 5/5] 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.217.177 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 d78f6b6..1f673c0 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) {