Mercurial > irccd
changeset 1132:6f85c4743494
tests: fix broken tests because of SIGUSR1
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 09 Dec 2021 11:34:49 +0100 |
parents | bd56d9793d6a |
children | 8ea7366ef45a |
files | tests/test-jsapi-timer.c tests/test-plugin-tictactoe.c |
diffstat | 2 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-jsapi-timer.c Thu Dec 09 11:27:36 2021 +0100 +++ b/tests/test-jsapi-timer.c Thu Dec 09 11:34:49 2021 +0100 @@ -17,6 +17,7 @@ */ #include <poll.h> +#include <signal.h> #define GREATEST_USE_ABBREVS 0 #include <greatest.h> @@ -111,6 +112,13 @@ int main(int argc, char **argv) { + struct sigaction sa; + + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sa.sa_handler = SIG_IGN; + sigaction(SIGUSR1, &sa, NULL); + irc_bot_init(); GREATEST_MAIN_BEGIN();
--- a/tests/test-plugin-tictactoe.c Thu Dec 09 11:27:36 2021 +0100 +++ b/tests/test-plugin-tictactoe.c Thu Dec 09 11:34:49 2021 +0100 @@ -16,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <signal.h> + #define GREATEST_USE_ABBREVS 0 #include <greatest.h> @@ -325,6 +327,13 @@ int main(int argc, char **argv) { + struct sigaction sa; + + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sa.sa_handler = SIG_IGN; + sigaction(SIGUSR1, &sa, NULL); + GREATEST_MAIN_BEGIN(); GREATEST_RUN_SUITE(suite_basics); GREATEST_MAIN_END();