Re: [Piglit] [PATCH V9] KHR_debug: test ObjectLabel(), GetObjectLabel(), ObjectPtrLabel() and GetObjectPtrLabel()

2013-10-07 Thread Eric Anholt
I've pushed the test now.  I made some trivial fixes on the way:
whitespace consistency, but also fixing duplication of the extension
name in the summary results.

Thanks for all your work on this!

diff --git a/tests1   /all.tests b/tests/all.tests
index 3e5e1a3..cec532a 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -1319,7 +1319,7 @@ add_plain_test(arb_debug_output, 
'arb_debug_output-api_error')
 # Group KHR_debug
 khr_debug = Group()
 spec['KHR_debug'] = khr_debug
-add_plain_test(khr_debug, 'khr_debug-object-label')
+khr_debug['object-label'] = concurrent_test('khr_debug-object-label')
 
 # Group ARB_occlusion_query2
 arb_occlusion_query2 = Group()
diff --git a/tests/spec/khr_debug/debug-object-label.c 
b/tests/spec/khr_debug/debug-object-label.c
index 6905619..2fabebd 100644
--- a/tests/spec/khr_debug/debug-object-label.c
+++ b/tests/spec/khr_debug/debug-object-label.c
@@ -73,7 +73,7 @@ test_object_ptr_label()
 
if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
fprintf(stderr, GL_INVALID_VALUE should be generated when 
ObjectPtrLabel()
-ptr is not the name of a sync object\n);
+ptr is not the name of a sync object\n);
pass = false;
}
 
@@ -282,7 +282,7 @@ test_object_label()
GLchar label[TestLabelLen + 1];
GLchar *bigLabel;
bool pass = true;
-int maximumLabelLengthTest = 1024; /* Be defensive about the size 
label length test to avoid memory issues */
+   int maximumLabelLengthTest = 1024; /* Be defensive about the size label 
length test to avoid memory issues */
 
puts(Test ObjectLabel);
 
@@ -320,7 +320,7 @@ test_object_label()
}
else {
printf(MAX_LABEL_LENGTH test skipped as implementations 
MAX_LABEL_LENGTH=%i and max piglit test length=%i\n,
-   maxLabelLength, maximumLabelLengthTest);
+  maxLabelLength, maximumLabelLengthTest);
}
 
/* If label is NULL, any debug label is effectively removed from the 
object.


pgpD3ES6VwnFW.pgp
Description: PGP signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH V9] KHR_debug: test ObjectLabel(), GetObjectLabel(), ObjectPtrLabel() and GetObjectPtrLabel()

2013-10-04 Thread Timothy Arceri
Bump. Is this latest patch ok? It would be good to get this committed if
no one has any further issues to point out.

Tim  


___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH V9] KHR_debug: test ObjectLabel(), GetObjectLabel(), ObjectPtrLabel() and GetObjectPtrLabel()

2013-09-25 Thread Timothy Arceri
Hi Guys,

Is someone able to review and hopefully commit this test. I have implemented 
all previous feedback on this test but have not had any further feedback on v8 
or v9 so far. I would really like to move on to working on some tests for 
another extension.

Thanks,
Tim

- Original Message -
From: Timothy Arceri t_arc...@yahoo.com.au
To: piglit@lists.freedesktop.org
Cc: Timothy Arceri t_arc...@yahoo.com.au
Sent: Tuesday, 24 September 2013 9:16 PM
Subject: [PATCH V9] KHR_debug: test ObjectLabel(), GetObjectLabel(),  
ObjectPtrLabel() and GetObjectPtrLabel()

V9: replace array index magic numbers with enums

V8: make sure all each object is available in the OpenGL
implementation before doing get/set tests
fix copy and paste mistake with framebuffer/renderbuffer tests

V7: be defensive when testing max label, use fprintf for errors,
code tidy ups, and added get/set tests for each object type

V6: fix spelling of generated in multiple places

V5: Removed unneeded assignment that was also out of bounds

V4: Removed failure test that will never be true

V3: changed indentation to tabs, use test label constants
and remove unused variable

V2: fixed whitespaces, broke tests into subtests,
added missing build dir, and tidied up fail messages

Signed-off-by: Timothy Arceri t_arc...@yahoo.com.au
---
tests/all.tests                           |    5 +
tests/spec/CMakeLists.txt                 |    1 +
tests/spec/khr_debug/CMakeLists.gl.txt    |   14 +
tests/spec/khr_debug/CMakeLists.txt       |    1 +
tests/spec/khr_debug/debug-object-label.c |  473 +
5 files changed, 494 insertions(+)
create mode 100644 tests/spec/khr_debug/CMakeLists.gl.txt
create mode 100644 tests/spec/khr_debug/CMakeLists.txt
create mode 100644 tests/spec/khr_debug/debug-object-label.c
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH V9] KHR_debug: test ObjectLabel(), GetObjectLabel(), ObjectPtrLabel() and GetObjectPtrLabel()

2013-09-24 Thread Timothy Arceri
V9: replace array index magic numbers with enums

V8: make sure all each object is available in the OpenGL
implementation before doing get/set tests
fix copy and paste mistake with framebuffer/renderbuffer tests

V7: be defensive when testing max label, use fprintf for errors,
code tidy ups, and added get/set tests for each object type

V6: fix spelling of generated in multiple places

V5: Removed unneeded assignment that was also out of bounds

V4: Removed failure test that will never be true

V3: changed indentation to tabs, use test label constants
and remove unused variable

V2: fixed whitespaces, broke tests into subtests,
added missing build dir, and tidied up fail messages

Signed-off-by: Timothy Arceri t_arc...@yahoo.com.au
---
 tests/all.tests   |5 +
 tests/spec/CMakeLists.txt |1 +
 tests/spec/khr_debug/CMakeLists.gl.txt|   14 +
 tests/spec/khr_debug/CMakeLists.txt   |1 +
 tests/spec/khr_debug/debug-object-label.c |  473 +
 5 files changed, 494 insertions(+)
 create mode 100644 tests/spec/khr_debug/CMakeLists.gl.txt
 create mode 100644 tests/spec/khr_debug/CMakeLists.txt
 create mode 100644 tests/spec/khr_debug/debug-object-label.c

diff --git a/tests/all.tests b/tests/all.tests
index de33501..91fa27b 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -1274,6 +1274,11 @@ arb_debug_output = Group()
 spec['ARB_debug_output'] = arb_debug_output
 add_plain_test(arb_debug_output, 'arb_debug_output-api_error')
 
+# Group KHR_debug
+khr_debug = Group()
+spec['KHR_debug'] = khr_debug
+add_plain_test(khr_debug, 'khr_debug-object-label')
+
 # Group ARB_occlusion_query2
 arb_occlusion_query2 = Group()
 spec['ARB_occlusion_query2'] = arb_occlusion_query2
diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
index 3bd8e9c..3ea148b 100644
--- a/tests/spec/CMakeLists.txt
+++ b/tests/spec/CMakeLists.txt
@@ -1,6 +1,7 @@
 add_subdirectory (amd_performance_monitor)
 add_subdirectory (arb_color_buffer_float)
 add_subdirectory (arb_debug_output)
+add_subdirectory (khr_debug)
 add_subdirectory (arb_depth_clamp)
 add_subdirectory (arb_draw_instanced)
 add_subdirectory (arb_es2_compatibility)
diff --git a/tests/spec/khr_debug/CMakeLists.gl.txt 
b/tests/spec/khr_debug/CMakeLists.gl.txt
new file mode 100644
index 000..b0079df
--- /dev/null
+++ b/tests/spec/khr_debug/CMakeLists.gl.txt
@@ -0,0 +1,14 @@
+include_directories(
+   ${GLEXT_INCLUDE_DIR}
+   ${OPENGL_INCLUDE_PATH}
+)
+
+link_libraries (
+   piglitutil_${piglit_target_api}
+   ${OPENGL_gl_LIBRARY}
+   ${OPENGL_glu_LIBRARY}
+)
+
+piglit_add_executable (khr_debug-object-label debug-object-label.c)
+
+# vim: ft=cmake:
diff --git a/tests/spec/khr_debug/CMakeLists.txt 
b/tests/spec/khr_debug/CMakeLists.txt
new file mode 100644
index 000..144a306
--- /dev/null
+++ b/tests/spec/khr_debug/CMakeLists.txt
@@ -0,0 +1 @@
+piglit_include_target_api()
diff --git a/tests/spec/khr_debug/debug-object-label.c 
b/tests/spec/khr_debug/debug-object-label.c
new file mode 100644
index 000..6905619
--- /dev/null
+++ b/tests/spec/khr_debug/debug-object-label.c
@@ -0,0 +1,473 @@
+/*
+ * Copyright (c) 2013 Timothy Arceri t_arc...@yahoo.com.au
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the Software),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT.  IN NO EVENT SHALL AUTHORS AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include piglit-util-gl-common.h
+
+static const char *TestLabel = Test Label;
+static const int TestLabelLen = 10;
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 11;
+
+   config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+enum piglit_result
+piglit_display(void)
+{
+   return PIGLIT_PASS;
+}
+
+static bool
+test_object_ptr_label()
+{
+   GLsync sync;
+   GLsizei length;
+   GLchar label[TestLabelLen + 1];
+   bool pass = true;
+
+   puts(Test ObjectPtrLabel);
+
+   /* basic check to see