[Mesa-dev] [PATCH 3/3v2] xvmc: force assertion in XvMC tests

Giuseppe Bilotta giuseppe.bilotta at gmail.com
Sun Nov 29 09:19:35 PST 2015


This follows the src/util/u_atomic_test.c model of undefining NDEBUG
unconditionally throughouth the XvMC tests, to force asserts regardless
of debug mode.

The comment on u_atomic_test.c is also fixed (read 'debug' where it
should have been 'release').

v2: s/debug/release/ in relevant comments

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>

---
 src/gallium/state_trackers/xvmc/tests/test_blocks.c     | 2 ++
 src/gallium/state_trackers/xvmc/tests/test_context.c    | 2 ++
 src/gallium/state_trackers/xvmc/tests/test_rendering.c  | 2 ++
 src/gallium/state_trackers/xvmc/tests/test_subpicture.c | 2 ++
 src/gallium/state_trackers/xvmc/tests/test_surface.c    | 2 ++
 src/util/u_atomic_test.c                                | 2 +-
 6 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/xvmc/tests/test_blocks.c b/src/gallium/state_trackers/xvmc/tests/test_blocks.c
index a35838f..53c29bc 100644
--- a/src/gallium/state_trackers/xvmc/tests/test_blocks.c
+++ b/src/gallium/state_trackers/xvmc/tests/test_blocks.c
@@ -25,6 +25,8 @@
  *
  **************************************************************************/
 
+/* Force assertions, even on release builds. */
+#undef NDEBUG
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/gallium/state_trackers/xvmc/tests/test_context.c b/src/gallium/state_trackers/xvmc/tests/test_context.c
index 344ac76..81d26fc 100644
--- a/src/gallium/state_trackers/xvmc/tests/test_context.c
+++ b/src/gallium/state_trackers/xvmc/tests/test_context.c
@@ -25,6 +25,8 @@
  *
  **************************************************************************/
 
+/* Force assertions, even on release builds. */
+#undef NDEBUG
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/gallium/state_trackers/xvmc/tests/test_rendering.c b/src/gallium/state_trackers/xvmc/tests/test_rendering.c
index b3b3794..c5494ec 100644
--- a/src/gallium/state_trackers/xvmc/tests/test_rendering.c
+++ b/src/gallium/state_trackers/xvmc/tests/test_rendering.c
@@ -25,6 +25,8 @@
  *
  **************************************************************************/
 
+/* Force assertions, even on release builds. */
+#undef NDEBUG
 #include <assert.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/src/gallium/state_trackers/xvmc/tests/test_subpicture.c b/src/gallium/state_trackers/xvmc/tests/test_subpicture.c
index 57ba1c7..006972f 100644
--- a/src/gallium/state_trackers/xvmc/tests/test_subpicture.c
+++ b/src/gallium/state_trackers/xvmc/tests/test_subpicture.c
@@ -25,6 +25,8 @@
  *
  **************************************************************************/
 
+/* Force assertions, even on release builds. */
+#undef NDEBUG
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/gallium/state_trackers/xvmc/tests/test_surface.c b/src/gallium/state_trackers/xvmc/tests/test_surface.c
index 964ca82..d5a121d 100644
--- a/src/gallium/state_trackers/xvmc/tests/test_surface.c
+++ b/src/gallium/state_trackers/xvmc/tests/test_surface.c
@@ -25,6 +25,8 @@
  *
  **************************************************************************/
 
+/* Force assertions, even on release builds. */
+#undef NDEBUG
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/util/u_atomic_test.c b/src/util/u_atomic_test.c
index 7844f61..7a77768 100644
--- a/src/util/u_atomic_test.c
+++ b/src/util/u_atomic_test.c
@@ -26,7 +26,7 @@
  **************************************************************************/
 
 
-/* Force assertions, even on debug builds. */
+/* Force assertions, even on release builds. */
 #undef NDEBUG
 
 
-- 
2.6.0.rc2.233.g6dd8a9a.dirty



More information about the mesa-dev mailing list