From patchwork Fri Nov 30 10:45:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 152506 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3500038ljp; Fri, 30 Nov 2018 02:45:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/UMSxoSU8860SKgC36Fdf4UAPGL7OnLIwuBhbk24nTeNCwa7IzYRLvvK8R7YU8qwZP7slEr X-Received: by 2002:a63:4f20:: with SMTP id d32mr4421097pgb.47.1543574718401; Fri, 30 Nov 2018 02:45:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543574718; cv=none; d=google.com; s=arc-20160816; b=n2Q4jzfOA4rwDBIoGc5Mb8ZZgGi731IrtGLhAGOpGeTt2WcS5Hb+PkRPIZ0idZjObU pWYPZ7n6gzZxHi3B2ZBlHUm+7qcWWDW4tvm9TyxjwRNINFrkeTj5cRKqt6sAS7PBmbp5 V8WChpvqFEOyM02sOAT4zIxw46URHQhP8P0rdEwqAKbLpSicOUbqiNhnqdfZAVow2R73 uojg/dHQl50T5osrUftFE89zMJijhsVPdIcI9YcC8wJWrODuxQfqcN0a0m58XeuAPuHt JMzHrl9ErfNcD7hF8gqFzF6KS6qq6Nwm/w4IB+CziBuKQORjKbZ8NjL+yxy1BPMMGsfA AVWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=Ntlv/3HOzI1K9dCrmAWb13eQhYmClkOecGpqRwwqQzM=; b=NrNy3c0NpzcCj0q9wl7yJRAgtSSc56mOoX9TWzkc3xbnrFsr7j5eKHPXbOUUtRcXGf ckzijuX2Gjie/km4wyP8Sgkf0F7rpquSro3Ss5wbvpa3r2zPK8+276wSBpISSFTdJ4hs J2GSSPQPZSgN6HcvFcPDrqD9rYhKmveLN++GiTodICDS5i/TufUlsxtmNxZqfylORxLH a4husa28/Kc7iWF2aIs+R99sun5avAlJ+g20MNi2Pb3KgM3X7PRbIeC7S7JdSj7LXEoB PjT1RkIbxkfMiPYvsXQ7W21YJVTj7U2oxP1YA8tnhTLV2edgyAZ4Pu5V1PGPkvSE+ejv rbIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of piglit-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=piglit-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id g2si4562056pgk.497.2018.11.30.02.45.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Nov 2018 02:45:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of piglit-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of piglit-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=piglit-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC8AE6E5F0; Fri, 30 Nov 2018 10:45:17 +0000 (UTC) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE1176E5F0 for ; Fri, 30 Nov 2018 10:45:15 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id y139so5248488wmc.5 for ; Fri, 30 Nov 2018 02:45:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=dTCLGTDBT3JKziJikwt8CBE5QtqHrxR+g8VSD4T6u5M=; b=REGLcR6eJpj7lLJgtzYRRQg9hZjBDyWJ2bGacEtWSg4y1rNh1HhprU6IaNVmlHUPE+ JIL/ilquViHNgzk9fPT9I1kdDp2wMXv7qb4BgR3cB22x0VDnCUDR5M97cgWOQnl7yoV/ 9PsDJrdh8hXtNG5KwMSzq98Z/dHDrrhqTY7GdGFIawvcBatVhY6aMvMopGa3kYkU/cEQ 6eMMF/wV9pMtemUt4rrwvN+KiLfR5laYmFdHT9yrYrdFv8xaO+Vy5iJ0/o6Ij/rDophI hQpmxnYOj7li1TDWkBE+mOnJhj1/2OuOi7nME1+rQwkzFJfjg1uCoq/OvkhxOWvCkkEx LoeQ== X-Gm-Message-State: AA+aEWZP+q6trIrlvEORKZFuXU/d9ypRBPnU5Pz749MjS/ayB7miBgUq 1eH4Zo/BhQ+dgC0cOZq1CnAXtA6iYVk= X-Received: by 2002:a1c:1849:: with SMTP id 70-v6mr4963104wmy.110.1543574713771; Fri, 30 Nov 2018 02:45:13 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id y138sm3566258wmc.16.2018.11.30.02.45.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 02:45:13 -0800 (PST) From: Ross Burton To: piglit@lists.freedesktop.org Date: Fri, 30 Nov 2018 10:45:05 +0000 Message-Id: <20181130104506.4658-2-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181130104506.4658-1-ross.burton@intel.com> References: <20181130104506.4658-1-ross.burton@intel.com> Subject: [Piglit] [PATCH 2/3] tests: Use FE_UPWARD only if its defined in fenv.h X-BeenThere: piglit@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: piglit-bounces@lists.freedesktop.org Sender: "Piglit" From: Khem Raj On ARM, musl does not define FE_* when arch does not have VFP, (which is right interpretation), therefore check if it is defined before using it. Fixes errors like: tests/general/roundmode-pixelstore.c:82:19: error: 'FE_UPWARD' undeclared (first use in this function) ret = fesetround(FE_UPWARD); ^~~~~~~~~ Signed-off-by: Khem Raj --- tests/general/roundmode-getintegerv.c | 2 ++ tests/general/roundmode-pixelstore.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/general/roundmode-getintegerv.c b/tests/general/roundmode-getintegerv.c index 28ecfaf55..5c275797b 100644 --- a/tests/general/roundmode-getintegerv.c +++ b/tests/general/roundmode-getintegerv.c @@ -81,7 +81,9 @@ piglit_init(int argc, char **argv) { int ret; bool pass = true; +#ifdef FE_UPWARD ret = fesetround(FE_UPWARD); +#endif if (ret != 0) { printf("Couldn't set rounding mode\n"); piglit_report_result(PIGLIT_SKIP); diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c index 8a029b257..51951a0d9 100644 --- a/tests/general/roundmode-pixelstore.c +++ b/tests/general/roundmode-pixelstore.c @@ -81,7 +81,9 @@ piglit_init(int argc, char **argv) { int ret; bool pass = true; +#ifdef FE_UPWARD ret = fesetround(FE_UPWARD); +#endif if (ret != 0) { printf("Couldn't set rounding mode\n"); piglit_report_result(PIGLIT_SKIP);