summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-12-10 08:07:11 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-12-10 08:07:11 +0100
commitea8c086919041d152b957773b0071e0cfafd3f78 (patch)
tree91eb11f67c8ec61726d6b467376ff6138426cc69 /lib/drmtest.c
parent3c5423b9a74fe056cae1fce41fd3ad16584e9c8d (diff)
lib: Always print errno in igt assert/require macros
Useful to figure out why things have failed. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r--lib/drmtest.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 97a44031..f2624a10 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -1009,12 +1009,14 @@ void __igt_skip_check(const char *file, const int line,
va_end(args);
igt_skip("Test requirement not met in function %s, file %s:%i:\n"
+ "Last errno: %i, %s\n"
"Test requirement: (%s)\n%s",
- func, file, line, check, buf);
+ func, file, line, errno, strerror(errno), check, buf);
} else {
igt_skip("Test requirement not met in function %s, file %s:%i:\n"
+ "Last errno: %i, %s\n"
"Test requirement: (%s)\n",
- func, file, line, check);
+ func, file, line, errno, strerror(errno), check);
}
}
@@ -1068,8 +1070,9 @@ void __igt_fail_assert(int exitcode, const char *file,
va_list args;
printf("Test assertion failure function %s, file %s:%i:\n"
+ "Last errno: %i, %s\n"
"Failed assertion: %s\n",
- func, file, line, assertion);
+ func, file, line, errno, strerror(errno), assertion);
if (f) {
va_start(args, f);