tests-remove-silly-test_fail_abstract_new-check.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 5bff3ba949d2ac0a9946c1240e6d4a5bb53fda99 Mon Sep 17 00:00:00 2001
  2. From: Tim-Philipp Müller <tim.muller@collabora.co.uk>
  3. Date: Wed, 08 Aug 2012 13:49:23 +0000
  4. Subject: tests: remove silly test_fail_abstract_new check
  5. Our check would make sure that GLib segfaults when
  6. someone tries to instantiate an abstract type, which
  7. is an extremely useful thing to check for.
  8. In newer GLibs this is fixed and we get an abort with
  9. a g_error() now it seems, so let's just remove this
  10. check entirely.
  11. ---
  12. (limited to 'tests/check/gst/gstobject.c')
  13. diff --git a/tests/check/gst/gstobject.c b/tests/check/gst/gstobject.c
  14. index 6f7ccb8..ce2ed3e 100644
  15. --- a/tests/check/gst/gstobject.c
  16. +++ b/tests/check/gst/gstobject.c
  17. @@ -72,19 +72,6 @@ gst_fake_object_get_type (void)
  18. return fake_object_type;
  19. }
  20. -#ifndef HAVE_OSX
  21. -/* g_object_new on abstract GstObject should fail */
  22. -GST_START_TEST (test_fail_abstract_new)
  23. -{
  24. - GstObject *object;
  25. -
  26. - ASSERT_CRITICAL (object = g_object_new (gst_object_get_type (), NULL));
  27. - fail_unless (object == NULL, "Created an instance of abstract GstObject");
  28. -}
  29. -
  30. -GST_END_TEST;
  31. -#endif
  32. -
  33. /* g_object_new on GstFakeObject should succeed */
  34. GST_START_TEST (test_fake_object_new)
  35. {
  36. @@ -529,18 +516,6 @@ gst_object_suite (void)
  37. tcase_add_test (tc_chain, test_fake_object_has_ancestor);
  38. //tcase_add_checked_fixture (tc_chain, setup, teardown);
  39. - /* FIXME: GLib shouldn't crash here, but issue a warning and return a NULL
  40. - * object, or at least g_error() and then abort properly ... (tpm) */
  41. -#ifndef HAVE_OSX
  42. - /* Disabled for OS/X because a) it's a pretty silly test anyway and
  43. - * b) different OS/X versions raise different signals and it isn't worth
  44. - * the effort to try and detect which one should be producing which
  45. - */
  46. - /* SEGV tests go last so we can debug the others */
  47. - if (g_getenv ("CK_FORK") == NULL || strcmp (g_getenv ("CK_FORK"), "no") != 0)
  48. - tcase_add_test_raise_signal (tc_chain, test_fail_abstract_new, SIGSEGV);
  49. -#endif
  50. -
  51. return s;
  52. }
  53. --
  54. cgit v0.9.0.2-2-gbebe