log: Remove SPICE_DISABLE_ABORT

spice-gtk was the last user, and stopped using it on Jun 14th 2017
in 040090ccba34 "build-sys: remove -DSPICE_DISABLE_ABORT"

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Christophe Fergeau 2018-07-03 12:42:33 +02:00 committed by Frediano Ziglio
parent bb8d75bf31
commit 31d4622687
3 changed files with 2 additions and 20 deletions

View File

@ -34,12 +34,8 @@ static int glib_debug_level = INT_MAX;
static int abort_mask = 0;
#ifndef SPICE_ABORT_MASK_DEFAULT
#ifdef SPICE_DISABLE_ABORT
#define SPICE_ABORT_MASK_DEFAULT 0
#else
#define SPICE_ABORT_MASK_DEFAULT (G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_ERROR)
#endif
#endif
#define G_LOG_DOMAIN "Spice"

View File

@ -28,10 +28,6 @@
#include "backtrace.h"
#include "log.h"
#ifdef SPICE_DISABLE_ABORT
#define spice_abort() do { } while(0)
#else
#define spice_abort() abort()
#endif
#endif

View File

@ -89,8 +89,7 @@ static void test_spice_fatal_warning(void)
g_unsetenv("G_DEBUG");
}
/* Checks that spice_critical() aborts by default if SPICE_DISABLE_ABORT is not
* defined at compile-time */
/* Checks that spice_critical() aborts by default */
static void test_spice_fatal_critical(void)
{
if (g_test_subprocess()) {
@ -98,11 +97,7 @@ static void test_spice_fatal_critical(void)
return;
}
g_test_trap_subprocess(NULL, 0, 0);
#ifdef SPICE_DISABLE_ABORT
g_test_trap_assert_passed();
#else
g_test_trap_assert_failed();
#endif
g_test_trap_assert_stderr("*spice_critical*");
}
@ -132,8 +127,7 @@ static void test_spice_fatal_g_critical(void)
g_unsetenv("G_DEBUG");
}
/* Checks that spice_return_if_fail() aborts by default unless
* SPICE_DISABLE_ABORT was defined at compile time*/
/* Checks that spice_return_if_fail() aborts by default */
static void test_spice_fatal_return_if_fail(void)
{
if (g_test_subprocess()) {
@ -141,11 +135,7 @@ static void test_spice_fatal_return_if_fail(void)
return;
}
g_test_trap_subprocess(NULL, 0, 0);
#ifdef SPICE_DISABLE_ABORT
g_test_trap_assert_passed();
#else
g_test_trap_assert_failed();
#endif
g_test_trap_assert_stderr("*test_spice_fatal_return_if_fail*");
}