[oe-commits] [openembedded-core] 10/35: piglit: upgrade to current HEAD

git at git.openembedded.org git at git.openembedded.org
Wed Dec 5 12:29:31 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 1785be8220d8790ffdabfbc30e58244aae6400cc
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Wed Nov 21 12:57:11 2018 +0000

    piglit: upgrade to current HEAD
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 ...e-FE_UPWARD-only-if-its-defined-in-fenv.h.patch | 83 ++++++++++++++--------
 .../piglit/piglit/format-fix.patch                 | 69 ++++++++++++++++++
 meta/recipes-graphics/piglit/piglit_git.bb         |  5 +-
 3 files changed, 124 insertions(+), 33 deletions(-)

diff --git a/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch b/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
index f851a92..57eda2e 100644
--- a/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
+++ b/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
@@ -1,54 +1,75 @@
-From 0fc2c2932699cfd68be96c820fddfdd79b48b788 Mon Sep 17 00:00:00 2001
+Upstream-Status: Submitted [mailing list]
+Signed-off-by: Ross Burton <ross.burton at intel.com>
+
+From 0e0a2a69261031d55d52b6045990e8982ea12912 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem at gmail.com>
 Date: Sat, 9 Jul 2016 07:52:19 +0000
-Subject: [PATCH] tests: Use FE_UPWARD only if its defined in fenv.h
-
-On ARM, musl does not define FE_* when arch does not have
-VFP, (which is right interpretation), therefore check if
-its defined before using it
+Subject: [PATCH] tests: only run rounding tests if FE_UPWARD is present
 
-Fixes errors like
+On ARM, musl does not define FE_* when the architecture does not have VFP (which
+is the right interpretation).
 
-tests/general/roundmode-pixelstore.c:82:19: error: 'FE_UPWARD' undeclared (first use in this function)
-  ret = fesetround(FE_UPWARD);
-                   ^~~~~~~~~
+As these tests depend on calling fesetround(), skip the test if FE_UPWARD isn't
+available.
 
-Signed-off-by: Khem Raj <raj.khem at gmail.com>
+Signed-off-by: Ross Burton <ross.burton at intel.com>
 ---
-Upstream-Status: Pending
-
- tests/general/roundmode-getintegerv.c | 2 ++
- tests/general/roundmode-pixelstore.c  | 2 ++
- 2 files changed, 4 insertions(+)
+ 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 28ecfaf..5c27579 100644
+index 28ecfaf55..aa99044a1 100644
 --- a/tests/general/roundmode-getintegerv.c
 +++ b/tests/general/roundmode-getintegerv.c
-@@ -81,7 +81,9 @@ piglit_init(int argc, char **argv)
+@@ -79,13 +79,17 @@ test(float val, int expect)
+ void
+ piglit_init(int argc, char **argv)
  {
- 	int ret;
+-	int ret;
  	bool pass = true;
+-	ret = fesetround(FE_UPWARD);
+-	if (ret != 0) {
+-		printf("Couldn't set rounding mode\n");
++
 +#ifdef FE_UPWARD
- 	ret = fesetround(FE_UPWARD);
-+#endif
- 	if (ret != 0) {
- 		printf("Couldn't set rounding mode\n");
++	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 9284f43..3fcb396 100644
+index 8a029b257..57ec11c09 100644
 --- a/tests/general/roundmode-pixelstore.c
 +++ b/tests/general/roundmode-pixelstore.c
-@@ -79,7 +79,9 @@ piglit_init(int argc, char **argv)
+@@ -79,13 +79,17 @@ test(float val, int expect)
+ void
+ piglit_init(int argc, char **argv)
  {
- 	int ret;
+-	int ret;
  	bool pass = true;
+-	ret = fesetround(FE_UPWARD);
+-	if (ret != 0) {
+-		printf("Couldn't set rounding mode\n");
++
 +#ifdef FE_UPWARD
- 	ret = fesetround(FE_UPWARD);
-+#endif
- 	if (ret != 0) {
- 		printf("Couldn't set rounding mode\n");
++	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;
 -- 
-1.8.3.1
+2.11.0
 
diff --git a/meta/recipes-graphics/piglit/piglit/format-fix.patch b/meta/recipes-graphics/piglit/piglit/format-fix.patch
new file mode 100644
index 0000000..73d539f
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/format-fix.patch
@@ -0,0 +1,69 @@
+Upstream-Status: Submitted [mailing list]
+Signed-off-by: Ross Burton <ross.burton at intel.com>
+
+From f0c6981322807e179e39ce67aeebd42cf7a54d36 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton at intel.com>
+Date: Wed, 21 Nov 2018 12:44:36 +0000
+Subject: [PATCH] arb_texture_view: fix security format warnings
+
+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.
+
+Also as X is used once and doesn't make the code clearer, just inline it.
+
+Signed-off-by: Ross Burton <ross.burton at intel.com>
+---
+ tests/spec/arb_texture_view/rendering-layers-image.c | 19 ++++++-------------
+ 1 file changed, 6 insertions(+), 13 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..86148075b 100644
+--- a/tests/spec/arb_texture_view/rendering-layers-image.c
++++ b/tests/spec/arb_texture_view/rendering-layers-image.c
+@@ -142,26 +142,19 @@ test_render_layers(const struct test_info *test)
+ 	return pass;
+ }
+ 
+-#define X(f, desc) \
+-	do { \
+-		const bool subtest_pass = (f); \
+-		piglit_report_subtest_result(subtest_pass \
+-						 ? PIGLIT_PASS : PIGLIT_FAIL, \
+-						 (desc)); \
+-		pass = pass && subtest_pass; \
+-	} while (0)
+-
+ enum piglit_result
+ 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);
++
++		const bool subtest_pass = test_render_layers(test);
++
++		piglit_report_subtest_result(subtest_pass ? PIGLIT_PASS : PIGLIT_FAIL,
++					     "layers rendering of %s", test->uniform_type);
++		pass = pass && subtest_pass;
+ 	}
+-#undef X
+ 	pass = piglit_check_gl_error(GL_NO_ERROR) && pass;
+ 	return pass ? PIGLIT_PASS : PIGLIT_FAIL;
+ }
+-- 
+2.11.0
+
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 1f7c6f9..622e046 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -6,11 +6,12 @@ SRC_URI = "git://anongit.freedesktop.org/piglit \
            file://0001-cmake-install-bash-completions-in-the-right-place.patch \
            file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
            file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
+           file://format-fix.patch \
            "
 UPSTREAM_CHECK_COMMITS = "1"
 
-# From 2018-08-13
-SRCREV = "57859e15dc8ba4034348b04d0b72f213b74d6347"
+# From 2018-10-26
+SRCREV = "b9066c7717af1d169a616c9e61706b99ff8515b5"
 # (when PV goes above 1.0 remove the trailing r)
 PV = "1.0+gitr${SRCPV}"
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list