summaryrefslogtreecommitdiff
path: root/tests/integration/logging.tcl
diff options
context:
space:
mode:
authorMeir Shpilraien (Spielrein) <meir@redislabs.com>2020-11-03 14:59:21 +0200
committerGitHub <noreply@github.com>2020-11-03 14:59:21 +0200
commitf210e197f3b9d0b4a81c6c354296da8f1ddad513 (patch)
tree01e61a28daad00738288db582cf48c387b39cfbd /tests/integration/logging.tcl
parent9122379abc3b15dfd2af3624586cc1e3f826eb55 (diff)
downloadredis-f210e197f3b9d0b4a81c6c354296da8f1ddad513.tar.gz
Added crash report on SIGABRT (#8004)
The reason that we want to get a full crash report on SIGABRT is that the jmalloc, when detecting a corruption, calls abort(). This will cause the Redis to exist silently without any report and without any way to analyze what happened.
Diffstat (limited to 'tests/integration/logging.tcl')
-rw-r--r--tests/integration/logging.tcl11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/integration/logging.tcl b/tests/integration/logging.tcl
index c1f4854d4..3314f0f1d 100644
--- a/tests/integration/logging.tcl
+++ b/tests/integration/logging.tcl
@@ -22,3 +22,14 @@ if {$system_name eq {linux} || $system_name eq {darwin}} {
}
}
}
+
+set server_path [tmpdir server1.log]
+start_server [list overrides [list dir $server_path]] {
+ test "Crash report generated on SIGABRT" {
+ set pid [s process_id]
+ exec kill -SIGABRT $pid
+ set pattern "*STACK TRACE*"
+ set result [exec tail -1000 < [srv 0 stdout]]
+ assert {[string match $pattern $result]}
+ }
+}