mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-08 09:18:08 +00:00
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:
parent
bb8d75bf31
commit
31d4622687
@ -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"
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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*");
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user