From patchwork Fri Nov 30 10:45:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 152505 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3500006ljp; Fri, 30 Nov 2018 02:45:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/VRbhgNL2+Xrq81UnKF/biSqEkyFvXOcPUqLFcIv08P/ZzQm8dmbDO/rlSJXy3POQ5aqENw X-Received: by 2002:a17:902:108a:: with SMTP id c10mr5262365pla.131.1543574716049; Fri, 30 Nov 2018 02:45:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543574716; cv=none; d=google.com; s=arc-20160816; b=i7aHyq6PXf7ryZfrP2cX0qV7J5kO29VfSqab7h1gsaM1pEcs/JCdUe3rkmFog6GqtG qN4PK8YE7ENxhvRSOKA0x3cot1ms+jCAyzIPZ3IJZ0vJTmXBzepPynXbMCr+fh/3GPn+ FfIjCUNd6+8zC6aPRe4zbzjioey4JH0A3l99kSXh8ZZrZz+fjupLpWFztoUkdRXsbNcd tY+BNpsiBAPjxqNLVl5c1lrjxtdEIxhuNdYXoO91m8zlYIkpu/NT0QXxYzt5SpBQ7JZ3 lZMc3i9XI972jUizmNuJ96Ot2Dg95lkg2Px2seSAR3nYwJpcvrhUfGe7QhRnmPge7Vvu fLWA== 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=MbSSefsgt2uLs+ZISbo2/W6PODXBC++m6oqImYZyQ4U=; b=ODn9tUByIvLiS8U2lRiFb15hI4BSJKJ2dpRUSVKGL0pZHqTnMiJaI2eUaT2ShvcYW9 yU/T4/wd5e3XGm55ACiwQyy0552OIfNzzCibZjcPsthBbhxwjdByOHglWZsTUfboUpTr /wjEG5rmpxyiAt1CqObJG5HGS16RH/pJkhiHckSs77GcVNwZZiQ+ZohLYZRUHGxDDsG/ lzx94ud3NrJXCqnYsH+Pfra74Y4BO10RiZUDtL9+qBb5doBJprji3RJZbyNAd9d7Z+JO 3VVueevYt3jRfqhn8yj/cNwnhDgfbky3AGk6RSxddJcbHStXOV/JuG90LKRLlR0YvtmZ OnAw== 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 a3si4586533pga.297.2018.11.30.02.45.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Nov 2018 02:45:16 -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 783876E5DC; Fri, 30 Nov 2018 10:45:15 +0000 (UTC) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 38EF06E5EC for ; Fri, 30 Nov 2018 10:45:14 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id t27so4807186wra.6 for ; Fri, 30 Nov 2018 02:45:14 -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=vHl/tC9i9QYN9wk6+fxpliQ/Z7EW2DfttuHGnmF9vkg=; b=JGKl/Pzdht5M/fDSQU4YMj405yvxlN465zt3eXF5yQXe7E1wsZYP5kVGwZBvZeUlID SShLHiNFV4dnD8zNk9NAbDG6wFSoGyAE7mO5I+nHiWjCKcfPOdjJom1bPUDZELzsJ4Ow Gt87Sfm3a4W7ItzaQO5dBLdg16PphT0D1c+y08qXGu/1aWdukQJuc0R1sxxssGbc+Lpe Sd2sFZ9WXH32rlzgy9ADShRe5TrOYQPZcdfwdtsR3vbcTJ4Elt5ypRXU9sYJTaY44Hpt rBYcDBmBmtyw03+9r1FVxn1exUCXWpWeShXgZrNIz3PEcnC5Zs7XO7vMt3t4oPr6sLtC xTAg== X-Gm-Message-State: AA+aEWaMq+NP+DqWNqpazR3A8JEprBC300yHtHf27LsNSfZEaTVk2m+s VXD1DVm/xBXtILIkmswjaGJ/5rn1Tz0= X-Received: by 2002:a5d:5208:: with SMTP id j8mr4662633wrv.188.1543574712691; Fri, 30 Nov 2018 02:45:12 -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.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 02:45:12 -0800 (PST) From: Ross Burton To: piglit@lists.freedesktop.org Date: Fri, 30 Nov 2018 10:45:04 +0000 Message-Id: <20181130104506.4658-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [Piglit] [PATCH 1/3] cmake: use proper WAYLAND_INCLUDE_DIRS variable 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: Pascal Bach WAYLAND_wayland-client_INCLUDEDIR is an internal variable and is not correctly set when cross compiling. WAYLAND_INCLUDE_DIRS includes the correct path even when cross compiling. Signed-off-by: Pascal Bach Acked-by: Tapani Pälli --- tests/util/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt index a5f080156..a303a9f58 100644 --- a/tests/util/CMakeLists.txt +++ b/tests/util/CMakeLists.txt @@ -97,7 +97,7 @@ if(PIGLIT_USE_WAFFLE) piglit-framework-gl/piglit_wl_framework.c ) list(APPEND UTIL_GL_INCLUDES - ${WAYLAND_wayland-client_INCLUDEDIR} + ${WAYLAND_INCLUDE_DIRS} ) endif() if(PIGLIT_HAS_X11) 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); From patchwork Fri Nov 30 10:45:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 152507 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3500048ljp; Fri, 30 Nov 2018 02:45:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/b6Yk92SbIVzJFvJZ0rWG4nrCEMlAhSE+Zbl8dzvzQs2i5SXY9Zj/xkS/soC/y/Vw7Jo6 X-Received: by 2002:a63:5207:: with SMTP id g7mr4471648pgb.253.1543574718933; 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=V3o7ZK5DR/NgL2QSmW/23O6kqacA8mMxKPj+lzzxhV1L49WrA0EVbbVFM3lrI/w1vn k9tLoRUHrWfFzlft3OBE8Bwk8x3WlqcC0G+ACPXq1ZOMAkpn5GoEiVk/blkMPvvNyZrg z7if0JXKxWcfhMHf3oMWviu4xCMrZ5ssAWQg876HKmEsxy5Zu4AwjnbTY5dcTaUp6tSF tXdKUMitH6P1qKEp9qvdAd5M0MqcV71jEsK1SV0AGJtNOS0ayWEDtIho4mg8e7W/vJRQ jkK7F5JgmM2iyTD9LMgOoXBjrgwsqUuv5eTK7DIBKH57BlaVy0VEMz+C0BnmWWxonML/ DH5Q== 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=LdqW9p5oQ6hz1Ta4UYRb+3uWy/TwW+aCyvRMzZG2AQo=; b=lW9pGRYBGTcw6Rr+HqAb/4uCXkWUogYeKY2NKxzZvqJpc792f+ZHiIRCtdj4C2FmVT psqL75IJZCbCvABtxs+j2MSH5DEFwZusIinJy9B2InOalmylniHDvLjSKWlgrEGDICVr bHp3SkAKAkUyoeKQwbFO3p8clBHbNmKydiwB0K8hYheOLQ+pvqGrQR0KsJA1v4ii/0sb JUYCGLijhQIQmA24w14oBux6hZ3uf4c7fPRlqmKgJpAlC1pO2IadWYyHVU032aHwZlrm ZOHbwlCKaD2/4vv2k4OtTcOEn94DfdDEDHoyZ7Uvxq35gWKNYO8VU7rKD3zbMZh+4lLl 11uA== 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 p3si4652301plr.376.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 28EFE6E5EC; Fri, 30 Nov 2018 10:45:18 +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 A2A926E5EA for ; Fri, 30 Nov 2018 10:45:16 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id r11-v6so5272578wmb.2 for ; Fri, 30 Nov 2018 02:45:16 -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=qF11YoakAlyutl0tk3zmB9elNQVmshycBbAoq1pnNgc=; b=U5YvNjEnDZA775zcdvVq2AbJwBnb/YIuq5h/lIMC99HeHvB3ik4E8eNa6FvgGXHLFL uw4cLGvgHrntkL5Z0aXSio5NYqy/WTsPKlW94RrlBcfX+G2/KOsSnEn2zyHQmRtK1wab aYiTkoGtPIoiVgDN8959Gl7PQ02Utx+h8cItStfBcAZe2gawDDbI0e5wIkyhPYwAiPsL TY9c3Y0+mjlz8mwTrIbUElX10JQmH6Aj0En6pNx6XBt6948vQx0PUHOKr3MyZjet6+16 p347Q4VXttpcOWXdVzWwJZPuZE6/vK7hpV1x0Ctb95arW35jaKwrDwuT+lo4dXg8uC1f ZCAg== X-Gm-Message-State: AA+aEWbEwztzM74otKs9/XKi37XShxddC5tbErtBkEUgyuVFKW6ttX8G scP6bK/27wI0AlsPZXxn1yNh16Jvix8= X-Received: by 2002:a1c:d1cd:: with SMTP id i196mr4923194wmg.107.1543574715006; Fri, 30 Nov 2018 02:45:15 -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.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 02:45:14 -0800 (PST) From: Ross Burton To: piglit@lists.freedesktop.org Date: Fri, 30 Nov 2018 10:45:06 +0000 Message-Id: <20181130104506.4658-3-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 3/3] arb_texture_view: fix security format warnings 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" If built with -Werror=format-security then Piglit fails to build: /tests/spec/arb_texture_view/rendering-layers-image.c:150:8: error: format not a string literal and no format arguments [-Werror=format-security] (desc)); \ ^~~~~~ In this case test->uniform_type is being turned into a string using snprintf() and then passed to piglit_report_subtest_result() which takes a format string, but GCC can't verify the format. As _subtest_report() takes a format string, we can just remove the snprintf() and let it construct the label. Signed-off-by: Ross Burton Reviewed-by: Eric Engestrom --- tests/spec/arb_texture_view/rendering-layers-image.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/spec/arb_texture_view/rendering-layers-image.c b/tests/spec/arb_texture_view/rendering-layers-image.c index 415b01657..070e29a68 100644 --- a/tests/spec/arb_texture_view/rendering-layers-image.c +++ b/tests/spec/arb_texture_view/rendering-layers-image.c @@ -142,12 +142,12 @@ test_render_layers(const struct test_info *test) return pass; } -#define X(f, desc) \ +#define X(f, test_type) \ do { \ const bool subtest_pass = (f); \ piglit_report_subtest_result(subtest_pass \ ? PIGLIT_PASS : PIGLIT_FAIL, \ - (desc)); \ + "layers rendering of %s", (test_type)); \ pass = pass && subtest_pass; \ } while (0) @@ -157,9 +157,7 @@ piglit_display(void) bool pass = true; for (int test_idx = 0; test_idx < ARRAY_SIZE(tests); test_idx++) { const struct test_info *test = &tests[test_idx]; - char test_name[128]; - snprintf(test_name, sizeof(test_name), "layers rendering of %s", test->uniform_type); - X(test_render_layers(test), test_name); + X(test_render_layers(test), test->uniform_type); } #undef X pass = piglit_check_gl_error(GL_NO_ERROR) && pass;