From 7e4b8dfb82ad703641d3df5fb6ee96d1f3bf91fb Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 5 Oct 2022 13:49:31 +0200 Subject: [PATCH] glib/tests: Drop debug build of slice test --- glib/tests/slice.c | 64 ---------------------------------------------- 1 file changed, 64 deletions(-) diff --git a/glib/tests/slice.c b/glib/tests/slice.c index 7cf53b4f7..fda15966c 100644 --- a/glib/tests/slice.c +++ b/glib/tests/slice.c @@ -4,66 +4,6 @@ /* We test deprecated functionality here */ G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#ifdef G_ENABLE_DEBUG -static void -test_slice_nodebug (void) -{ - const gchar *oldval; - - oldval = g_getenv ("G_SLICE"); - g_unsetenv ("G_SLICE"); - - if (g_test_subprocess ()) - { - gpointer p, q; - - p = g_slice_alloc (237); - q = g_slice_alloc (259); - g_slice_free1 (237, p); - g_slice_free1 (259, q); - - g_slice_debug_tree_statistics (); - return; - } - g_test_trap_subprocess (NULL, 1000000, G_TEST_SUBPROCESS_DEFAULT); - g_test_trap_assert_passed (); - g_test_trap_assert_stderr ("*GSlice: MemChecker: root=NULL*"); - - if (oldval) - g_setenv ("G_SLICE", oldval, TRUE); -} - -static void -test_slice_debug (void) -{ - const gchar *oldval; - - oldval = g_getenv ("G_SLICE"); - g_setenv ("G_SLICE", "debug-blocks:always-malloc", TRUE); - - if (g_test_subprocess ()) - { - gpointer p, q; - - p = g_slice_alloc (237); - q = g_slice_alloc (259); - g_slice_free1 (237, p); - g_slice_free1 (259, q); - - g_slice_debug_tree_statistics (); - return; - } - g_test_trap_subprocess (NULL, 1000000, G_TEST_SUBPROCESS_DEFAULT); - g_test_trap_assert_passed (); - g_test_trap_assert_stderr ("*GSlice: MemChecker: * trunks, * branches, * old branches*"); - - if (oldval) - g_setenv ("G_SLICE", oldval, TRUE); - else - g_unsetenv ("G_SLICE"); -} -#endif - static void test_slice_copy (void) { @@ -155,10 +95,6 @@ main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); -#ifdef G_ENABLE_DEBUG - g_test_add_func ("/slice/nodebug", test_slice_nodebug); - g_test_add_func ("/slice/debug", test_slice_debug); -#endif g_test_add_func ("/slice/copy", test_slice_copy); g_test_add_func ("/slice/chain", test_chain); g_test_add_func ("/slice/allocate", test_allocate);