From patchwork Thu Jan 29 11:01:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 43922 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 1CABD24119 for ; Thu, 29 Jan 2015 11:02:04 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id f15sf18168089lbj.2 for ; Thu, 29 Jan 2015 03:02:03 -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=PYoWtF2J7tbZqWfJVxEScr43lsct9g98mK4NF7zWMLZnLg54GjE35PrD+N1EbdxgAf Q3IWlnxw/e/b4n/Ffbjw4pK6mnrkCiAxfR+55/ujI4+tYH0NLHIsB3VsVKO3vMW+y23q XejMmuSxkIr8Y85mglUo9YRAYUttRsGJZQb1kIfLF/k3YCVuftBSqoRfdFQxRuMMCN20 OlA1CGjpkv7uAHSz6ilmB5WkgBP4VRdOqohldfHO+I/tuD9WEuXSe5lMlOD/E6ImaRpA SPwRQKx/9XszsoFCUmQOYPTPvNQuHtp6b8mDRqcR2FUJ1DyXv+HJK9f2QGb3ejITOPQ/ ONIA== X-Gm-Message-State: ALoCoQnjAfoRGsLrq65nhRYJnWE4TH90sse9FuTPAwrXSUa7iYcQjtQHq2eSso7VwGY5r5rB7/Xw X-Received: by 10.112.30.131 with SMTP id s3mr1712146lbh.13.1422529323121; Thu, 29 Jan 2015 03:02:03 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.185.69 with SMTP id fa5ls263617lac.84.gmail; Thu, 29 Jan 2015 03:02:03 -0800 (PST) X-Received: by 10.152.21.228 with SMTP id y4mr13661256lae.72.1422529322980; Thu, 29 Jan 2015 03:02:02 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id rn9si3375675lbb.29.2015.01.29.03.02.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Jan 2015 03:02:02 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id 10so26737959lbg.6 for ; Thu, 29 Jan 2015 03:02:02 -0800 (PST) X-Received: by 10.112.180.135 with SMTP id do7mr13319073lbc.23.1422529322878; Thu, 29 Jan 2015 03:02:02 -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 h5csp1724175lbj; Thu, 29 Jan 2015 03:02:02 -0800 (PST) X-Received: by 10.140.90.112 with SMTP id w103mr43013qgd.65.1422529316652; Thu, 29 Jan 2015 03:01:56 -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 g6si9781438qga.61.2015.01.29.03.01.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Jan 2015 03:01:56 -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 1YGmrB-0007xo-Nd; Thu, 29 Jan 2015 11:01:53 +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 1YGmql-0007ss-NA for lng-odp@lists.linaro.org; Thu, 29 Jan 2015 11:01:27 +0000 Received: by mail-lb0-f176.google.com with SMTP id z12so26677339lbi.7 for ; Thu, 29 Jan 2015 03:01:22 -0800 (PST) X-Received: by 10.112.134.74 with SMTP id pi10mr128240lbb.67.1422529282175; Thu, 29 Jan 2015 03:01:22 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id s7sm2045761las.17.2015.01.29.03.01.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jan 2015 03:01:21 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Thu, 29 Jan 2015 12:01:13 +0100 Message-Id: <1422529273-31282-6-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422529273-31282-1-git-send-email-ola.liljedahl@linaro.org> References: <1422529273-31282-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: timers patch Subject: [lng-odp] [PATCHv3 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.175 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) {