From patchwork Fri Nov 30 16:33:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 152571 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3862383ljp; Fri, 30 Nov 2018 08:33:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/WAFpBOluyBdofionMB9qU9Ry0XsE/AjkhCXTEMJrmun7dUt+Bs5qKDiveBUFLy+wloCsW8 X-Received: by 2002:a63:2d46:: with SMTP id t67mr4307449pgt.140.1543595613111; Fri, 30 Nov 2018 08:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543595613; cv=none; d=google.com; s=arc-20160816; b=c7u9V86PoiiUSGCFzBT4NBKNpCQ5Ymfty7Ian4xULiIM/HLv5rCI5PD3num3GVBMxl 31Nob0ereKtTVxS4qUFOnXOXV1v0dUrMdWMDoUx20HrLH0QdVXEV7LGiM6nJ3OBr+epM 29wEKsEvssHXaEt+9CkSR/euvuu2/QNfA6E4hk0qRWYHJycudKw7N1Qbu07ro/QCRabX Pznqjyqa8JAH4AgxMD/LeernZo5PN/E43H8FgFsMrfyXMtgCrZMwD3AD93cMxf7vOXuL xes+ztOeD04p8yaKBo4YESlsE1Ny+5+BLrn4M5lJkzXAwEKvtxh7ctsti/w3k2y0Lc/4 RrMQ== 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:message-id:date:to:from:delivered-to; bh=MkOj8iYobAxveGpUk9TMahK0CzJENqyWZip+0LXG4kw=; b=WmtOzL1IvCv84yfBFlXh1pm8IO5hYZHokhZlh2uIC1GJwLEYPX3fPzs5PMo8tXMhBq RpuwqEUZrMx+bwzugOLvLRrWQOOo5zn414B+PmeO/Xh9r1JnyXreuvX9RoRueN/wF+Xw Z21CV5UpPCH+Z7z/e2253oAbxrFCG7DA4uP7mbjKMM9vu2/NmJHj0hIhQtmSdwimRm2N eLG/ERJqGvc8kdbdy/TBasZDst4UXwQ8wtmTKO/+q7cyXFrhk7aBxNhdxZmcsuzWoV0C M5pkBcmgakZVUWhSr01qf3BJqdJ5EvXgu+DkUsP7De+6p7KgDJAAlGnbR0cUSLMOXiHP vA+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of piglit-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id x128si5841633pfb.128.2018.11.30.08.33.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Nov 2018 08:33:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of piglit-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of piglit-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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 EAA5A6E635; Fri, 30 Nov 2018 16:33:31 +0000 (UTC) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 376BE6E635 for ; Fri, 30 Nov 2018 16:33:29 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id r10so5857781wrs.10 for ; Fri, 30 Nov 2018 08:33:29 -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; bh=lyLzOMPn5kNeHr7YiaObCFOH3izltG0rJ4X5v2+OobQ=; b=A/c0OLkJREM5dwVtYI5xhOBczdLG/zLozCRDmHDLH8p4L2kjQFYPxVfimbNvPlXy2E d1K2gFHPbfQZzjMY9DEO6leOUfjd6DMvmDGP//LeGase4k8bGGzihSCjd+NrXTLNbkgs opWd3x5EM6ZpNnyM20LMg23qcoSLUDOX6UvhTFp8eR+r+3nxWXxd5Rer2JWzarBRP0ck 63w/jBsNDuTlheb6g16RZYkoZ4YOMleRRncqtnMMkJqDsSmFu/+G/C+xN3G1RJ/vQwLZ XiGLtKEvNQOipHaCCBOHw9AM/DwqRBe+JBCAdKVjBpRudghXMFf96sGaH17uKPMZkYHi 3yRQ== X-Gm-Message-State: AA+aEWYePTxLdoKUle+4S6l4nMxGwn7gv7e/9c3rFf4cC2HPH2ZeSr5w 6rhxjQ19n4/rlWgdiMwu3RD8v0l2w6Q= X-Received: by 2002:adf:f649:: with SMTP id x9mr5462665wrp.247.1543595607623; Fri, 30 Nov 2018 08:33:27 -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 v133sm7116649wmd.4.2018.11.30.08.33.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 08:33:26 -0800 (PST) From: Ross Burton To: piglit@lists.freedesktop.org Date: Fri, 30 Nov 2018 16:33:23 +0000 Message-Id: <20181130163323.23739-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [Piglit] [PATCH] tests: only run rounding tests if FE_UPWARD is present 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" On ARM, musl does not define FE_* when the architecture does not have VFP (which is the right interpretation). As these tests depend on calling fesetround(), skip the test if FE_UPWARD isn't available. Signed-off-by: Ross Burton Reviewed-by: Eric Engestrom --- tests/general/roundmode-getintegerv.c | 12 ++++++++---- tests/general/roundmode-pixelstore.c | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/general/roundmode-getintegerv.c b/tests/general/roundmode-getintegerv.c index 28ecfaf55..aa99044a1 100644 --- a/tests/general/roundmode-getintegerv.c +++ b/tests/general/roundmode-getintegerv.c @@ -79,13 +79,17 @@ test(float val, int expect) void piglit_init(int argc, char **argv) { - int ret; bool pass = true; - ret = fesetround(FE_UPWARD); - if (ret != 0) { - printf("Couldn't set rounding mode\n"); + +#ifdef FE_UPWARD + if (fesetround(FE_UPWARD) != 0) { + printf("Setting rounding mode failed\n"); piglit_report_result(PIGLIT_SKIP); } +#else + printf("Cannot set rounding mode\n"); + piglit_report_result(PIGLIT_SKIP); +#endif pass = test(2.2, 2) && pass; pass = test(2.8, 3) && pass; diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c index 8a029b257..57ec11c09 100644 --- a/tests/general/roundmode-pixelstore.c +++ b/tests/general/roundmode-pixelstore.c @@ -79,13 +79,17 @@ test(float val, int expect) void piglit_init(int argc, char **argv) { - int ret; bool pass = true; - ret = fesetround(FE_UPWARD); - if (ret != 0) { - printf("Couldn't set rounding mode\n"); + +#ifdef FE_UPWARD + if (fesetround(FE_UPWARD) != 0) { + printf("Setting rounding mode failed\n"); piglit_report_result(PIGLIT_SKIP); } +#else + printf("Cannot set rounding mode\n"); + piglit_report_result(PIGLIT_SKIP); +#endif pass = test(2.2, 2) && pass; pass = test(2.8, 3) && pass;