Mesa (master): xvmc: force assertion in XvMC tests

Emil Velikov evelikov at kemper.freedesktop.org
Fri Dec 4 14:02:51 UTC 2015


Module: Mesa
Branch: master
Commit: efaac624afb2c5d74230dbec3dc358f1d50bc806
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=efaac624afb2c5d74230dbec3dc358f1d50bc806

Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Sun Nov 29 18:19:35 2015 +0100

xvmc: force assertion in XvMC tests

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>
[Emil Velikov: keep the src/util/ hunk as separate patch]
Signed-off-by: Emil Velikov <emil.l.velikov 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 ++
 5 files changed, 10 insertions(+)

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>




More information about the mesa-commit mailing list