|
@@ -13,6 +13,8 @@
|
|
|
#include <execinfo.h>
|
|
|
#include <sys/syscall.h>
|
|
|
|
|
|
+#include "../../kselftest.h"
|
|
|
+
|
|
|
/* Dumps the current stack trace to stderr. */
|
|
|
static void __attribute__((noinline)) test_dump_stack(void);
|
|
|
static void test_dump_stack(void)
|
|
@@ -70,8 +72,9 @@ test_assert(bool exp, const char *exp_str,
|
|
|
|
|
|
fprintf(stderr, "==== Test Assertion Failure ====\n"
|
|
|
" %s:%u: %s\n"
|
|
|
- " pid=%d tid=%d\n",
|
|
|
- file, line, exp_str, getpid(), gettid());
|
|
|
+ " pid=%d tid=%d - %s\n",
|
|
|
+ file, line, exp_str, getpid(), gettid(),
|
|
|
+ strerror(errno));
|
|
|
test_dump_stack();
|
|
|
if (fmt) {
|
|
|
fputs(" ", stderr);
|
|
@@ -80,6 +83,8 @@ test_assert(bool exp, const char *exp_str,
|
|
|
}
|
|
|
va_end(ap);
|
|
|
|
|
|
+ if (errno == EACCES)
|
|
|
+ ksft_exit_skip("Access denied - Exiting.\n");
|
|
|
exit(254);
|
|
|
}
|
|
|
|