print warnings in redis log when a test raises an exception (very likely to be caused by something like a failed assertion)

This commit is contained in:
Pieter Noordhuis
2010-05-15 23:48:08 +02:00
parent 85ecc65edc
commit fdfb02e7ff
3 changed files with 28 additions and 2 deletions

View File

@ -10556,7 +10556,7 @@ static void debugCommand(redisClient *c) {
static void _redisAssert(char *estr, char *file, int line) {
redisLog(REDIS_WARNING,"=== ASSERTION FAILED ===");
redisLog(REDIS_WARNING,"==> %s:%d '%s' is not true\n",file,line,estr);
redisLog(REDIS_WARNING,"==> %s:%d '%s' is not true",file,line,estr);
#ifdef HAVE_BACKTRACE
redisLog(REDIS_WARNING,"(forcing SIGSEGV in order to print the stack trace)");
*((char*)-1) = 'x';