projects
/
platform
/
upstream
/
intel-gpu-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bb0897
)
gem_lut_handle: Print some more information upon failure
author
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 19 Jun 2013 13:19:07 +0000
(14:19 +0100)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 19 Jun 2013 13:19:47 +0000
(14:19 +0100)
References: https://bugs.freedesktop.org/show_bug.cgi?id=65391
tests/gem_lut_handle.c
patch
|
blob
|
history
diff --git
a/tests/gem_lut_handle.c
b/tests/gem_lut_handle.c
index
ebc68df
..
d755e43
100644
(file)
--- a/
tests/gem_lut_handle.c
+++ b/
tests/gem_lut_handle.c
@@
-169,8
+169,15
@@
static int many_exec(int fd, uint32_t batch, int num_exec, int num_reloc, unsign
}
#define _fail(x) ((x) == -1 && errno == ENOENT)
-#define fail(x) assert(_fail(x))
-#define pass(x) assert(!_fail(x))
+#define ASSERT(x) do { \
+ if (!(x)) { \
+ fprintf(stderr, "%s:%d failed, errno=%d\n", \
+ __FUNCTION__, __LINE__, errno); \
+ abort(); \
+ } \
+} while (0)
+#define fail(x) ASSERT(_fail(x))
+#define pass(x) ASSERT(!_fail(x))
int main(int argc, char **argv)
{