From 1ff3404e56b1aec1101a5d04cecb6df9247155ae Mon Sep 17 00:00:00 2001 From: o9000 Date: Sun, 5 Nov 2017 19:51:09 +0100 Subject: [PATCH] Update periodic testing scripts --- src/button/button.c | 2 +- src/execplugin/execplugin.c | 2 +- src/init.c | 4 ++-- src/util/common.c | 2 +- test/regression.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/button/button.c b/src/button/button.c index bf9db25..f91a494 100644 --- a/src/button/button.c +++ b/src/button/button.c @@ -79,7 +79,7 @@ void destroy_button(void *obj) if (button->backend->instances) { fprintf(stderr, "tint2: Error: Attempt to destroy backend while there are still frontend instances!\n"); - exit(-1); + exit(EXIT_FAILURE); } free(button->backend); free(button); diff --git a/src/execplugin/execplugin.c b/src/execplugin/execplugin.c index 84b0e6c..b4a91f6 100644 --- a/src/execplugin/execplugin.c +++ b/src/execplugin/execplugin.c @@ -109,7 +109,7 @@ void destroy_execp(void *obj) if (execp->backend->instances) { fprintf(stderr, "tint2: Error: Attempt to destroy backend while there are still frontend instances!\n"); - exit(-1); + exit(EXIT_FAILURE); } free(execp->backend); free(execp); diff --git a/src/init.c b/src/init.c index 3268eb4..cb1b7fe 100644 --- a/src/init.c +++ b/src/init.c @@ -75,7 +75,7 @@ void handle_cli_arguments(int argc, char **argv) } if (error) { print_usage(); - exit(1); + exit(EXIT_FAILURE); } } } @@ -184,7 +184,7 @@ void init_X11_pre_config() server.display = XOpenDisplay(NULL); if (!server.display) { fprintf(stderr, "tint2: could not open display!\n"); - exit(1); + exit(EXIT_FAILURE); } server.x11_fd = ConnectionNumber(server.display); XSetErrorHandler((XErrorHandler)server_catch_error); diff --git a/src/util/common.c b/src/util/common.c index b540ddb..ccec140 100644 --- a/src/util/common.c +++ b/src/util/common.c @@ -808,7 +808,7 @@ Imlib_Image load_image(const char *path, int cached) GdkPixbuf *pixbuf = rsvg_handle_get_pixbuf(svg); gdk_pixbuf_save(pixbuf, tmp_filename, "png", NULL, NULL); } - exit(0); + _exit(0); } else { // Parent close(fd); diff --git a/test/regression.py b/test/regression.py index 184e60c..00a9063 100755 --- a/test/regression.py +++ b/test/regression.py @@ -160,7 +160,7 @@ def test(tint2path, config, use_asan): start_wm() sleep(1) os.environ["DEBUG_FPS"] = "1" - os.environ["ASAN_OPTIONS"] = "detect_leaks=1" + os.environ["ASAN_OPTIONS"] = "detect_leaks=1:exitcode=0" tint2 = run([tint2path, "-c", config], True) if tint2.poll() != None: raise RuntimeError("tint2 failed to start")