From patchwork Mon Jan 26 10:08: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: 43729 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7952720D5D for ; Mon, 26 Jan 2015 10:09:03 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id d49sf3707972eek.2 for ; Mon, 26 Jan 2015 02:09:02 -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: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=TvIDbF9D08y++XTSMytjGB/276hAJzeu5CYuazV3Y1M=; b=Ufxu8RpTAi0CZl1+UXEp2mNhjJpFqqIgRYO0GHDE7hNG74KKx3var0pdblj2wg0g9K +zQ39x/aI6w/e1cqeWvHb6cbwv51BIH3f5k/MtNBI/a1izoZszxbOsscP4psEMReaAY1 lgmYfx5LfrHbW8qDOf+k52pg+mGNSa+8sakNgiYBZlW403Es4zDh16tEeC3gfINUkh3t B5cW89NUz3qIdXJgfb4etin09b89/+5jUIubO77M68ExrdLBPxBTJae+/rEKznwL4pM0 cP4aDbSniSppklZ58yYvxYWRdp+cH9dpGqf8aIVFL8CyhfIbeyrBEpdbniaDX9znkseN p4+A== X-Gm-Message-State: ALoCoQlWtIWDvffOT0mralSwrpaary4gZBrOyJvNtxDnipVn6CzVzez2TXCFT4F2LWEoqK5VMK1d X-Received: by 10.112.140.65 with SMTP id re1mr1930968lbb.4.1422266942644; Mon, 26 Jan 2015 02:09:02 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.6.42 with SMTP id cr10ls17449lad.91.gmail; Mon, 26 Jan 2015 02:09:02 -0800 (PST) X-Received: by 10.112.83.104 with SMTP id p8mr9646908lby.70.1422266942349; Mon, 26 Jan 2015 02:09:02 -0800 (PST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id 2si8607390lai.59.2015.01.26.02.09.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Jan 2015 02:09:02 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id u10so6716261lbd.12 for ; Mon, 26 Jan 2015 02:09:02 -0800 (PST) X-Received: by 10.112.14.6 with SMTP id l6mr20460846lbc.91.1422266942225; Mon, 26 Jan 2015 02:09: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 h5csp728063lbj; Mon, 26 Jan 2015 02:09:01 -0800 (PST) X-Received: by 10.140.27.199 with SMTP id 65mr38081526qgx.24.1422266941057; Mon, 26 Jan 2015 02:09:01 -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 u7si12691958qab.16.2015.01.26.02.08.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 26 Jan 2015 02:09:01 -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 1YFgbJ-0004B7-PU; Mon, 26 Jan 2015 10:08:57 +0000 Received: from mail-lb0-f170.google.com ([209.85.217.170]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YFgbD-000490-Cf for lng-odp@lists.linaro.org; Mon, 26 Jan 2015 10:08:51 +0000 Received: by mail-lb0-f170.google.com with SMTP id w7so6734440lbi.1 for ; Mon, 26 Jan 2015 02:08:45 -0800 (PST) X-Received: by 10.112.236.41 with SMTP id ur9mr20335555lbc.44.1422266925675; Mon, 26 Jan 2015 02:08:45 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id uh6sm1361953lac.5.2015.01.26.02.08.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Jan 2015 02:08:45 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Mon, 26 Jan 2015 11:08:40 +0100 Message-Id: <1422266920-14724-1-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: timers patch Subject: [lng-odp] [PATCH] 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.181 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 d893646..291e5a9 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_buffer_t buf = odp_queue_deq(queue); if (buf != ODP_BUFFER_INVALID) {