mirror of
https://github.com/neovim/neovim.git
synced 2025-12-03 07:23:05 +00:00
Merge PR #1384 'Add core dump reporting to travis'
This commit is contained in:
@@ -7,10 +7,7 @@ asan_check() {
|
||||
}
|
||||
|
||||
check_logs() {
|
||||
# For some strange reason, now we need to give ubuntu some time to flush it's
|
||||
# FS cache in order to see error logs, even though all commands are executing
|
||||
# synchronously
|
||||
sleep 1
|
||||
check_core_dumps
|
||||
# Iterate through each log to remove an useless warning
|
||||
for log in $(find "$1" -type f -name "$2"); do
|
||||
sed -i "$log" \
|
||||
@@ -29,6 +26,15 @@ check_logs() {
|
||||
fi
|
||||
}
|
||||
|
||||
check_core_dumps() {
|
||||
sleep 2
|
||||
local c
|
||||
for c in $(find ./ -name '*core*' -print); do
|
||||
gdb -q -n -batch -ex bt build/bin/nvim $c
|
||||
exit 1
|
||||
done
|
||||
}
|
||||
|
||||
set_environment() {
|
||||
local prefix="$1/usr"
|
||||
eval $($prefix/bin/luarocks path)
|
||||
|
||||
@@ -23,4 +23,6 @@ CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON \
|
||||
|
||||
$MAKE_CMD CMAKE_EXTRA_FLAGS="${CMAKE_EXTRA_FLAGS}" unittest
|
||||
$MAKE_CMD test
|
||||
check_core_dumps
|
||||
$MAKE_CMD oldtest
|
||||
check_core_dumps
|
||||
|
||||
@@ -11,6 +11,7 @@ export VALGRIND_LOG="$tmpdir/valgrind-%p.log"
|
||||
CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DUSE_GCOV=ON"
|
||||
|
||||
$MAKE_CMD CMAKE_EXTRA_FLAGS="${CMAKE_EXTRA_FLAGS}" unittest
|
||||
build/bin/nvim --version
|
||||
if ! $MAKE_CMD test; then
|
||||
valgrind_check "$tmpdir"
|
||||
exit 1
|
||||
|
||||
@@ -20,9 +20,9 @@ before_install:
|
||||
# Need xvfb for running some tests with xclip
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start
|
||||
- sudo apt-get install xclip
|
||||
- sudo apt-get install xclip gdb
|
||||
script:
|
||||
# This will pass the environment variables down to a bash process which runs
|
||||
# as $USER, while retaining the environment variables defined and belonging
|
||||
# to secondary groups given above in usermod.
|
||||
- sudo -E su ${USER} -c "sh -e \"${CI_SCRIPTS}/${CI_TARGET}.sh\""
|
||||
- sudo -E su ${USER} -c "ulimit -c 102400; sh -e \"${CI_SCRIPTS}/${CI_TARGET}.sh\""
|
||||
|
||||
@@ -30,3 +30,10 @@
|
||||
fun:vim_strsave
|
||||
fun:ex_function
|
||||
}
|
||||
{
|
||||
uv_spawn_with_optimizations
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
fun:uv_spawn
|
||||
fun:job_start
|
||||
}
|
||||
|
||||
@@ -600,9 +600,14 @@ static void close_channel(Channel *channel)
|
||||
if (handle) {
|
||||
uv_close(handle, close_cb);
|
||||
} else {
|
||||
event_push((Event) { .handler = on_stdio_close }, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void on_stdio_close(Event e)
|
||||
{
|
||||
mch_exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void free_channel(Channel *channel)
|
||||
|
||||
@@ -39,7 +39,7 @@ typedef struct {
|
||||
// immediate_events: Events that should be processed after exiting libuv event
|
||||
// loop(to avoid recursion), but before returning from
|
||||
// `event_poll`
|
||||
static klist_t(Event) *deferred_events, *immediate_events;
|
||||
static klist_t(Event) *deferred_events = NULL, *immediate_events = NULL;
|
||||
|
||||
void event_init(void)
|
||||
{
|
||||
@@ -68,18 +68,25 @@ void event_init(void)
|
||||
|
||||
void event_teardown(void)
|
||||
{
|
||||
if (!deferred_events) {
|
||||
// Not initialized(possibly a --version invocation)
|
||||
return;
|
||||
}
|
||||
|
||||
channel_teardown();
|
||||
job_teardown();
|
||||
server_teardown();
|
||||
signal_teardown();
|
||||
input_stop();
|
||||
input_teardown();
|
||||
do {
|
||||
// This will loop forever if we leave any unclosed handles. Currently it is
|
||||
// the most reliable way to use travis for verifying the no libuv-related
|
||||
// bugs(which can be hard to track later) were introduced on a PR.
|
||||
// this last `uv_run` will return after all handles are stopped, it will
|
||||
// also take care of finishing any uv_close calls made by other *_teardown
|
||||
// functions.
|
||||
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
||||
} while (uv_loop_close(uv_default_loop()));
|
||||
// abort that if we left unclosed handles
|
||||
if (uv_loop_close(uv_default_loop())) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
// Wait for some event
|
||||
|
||||
Reference in New Issue
Block a user