Bug 101362 - Use GLib 2.40 in tests
Summary: Use GLib 2.40 in tests
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: git master
Hardware: All All
: medium enhancement
Assignee: Simon McVittie
QA Contact: D-Bus Maintainers
URL: https://github.com/smcv/dbus/commits/...
Whiteboard: review+
Keywords:
Depends on:
Blocks: 101354
  Show dependency treegraph
 
Reported: 2017-06-09 18:17 UTC by Simon McVittie
Modified: 2017-06-12 10:52 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
1/3] Bump GLib dependency for tests to 2.40 (2.40 KB, patch)
2017-06-09 18:18 UTC, Simon McVittie
Details | Splinter Review
2/3] test/internals/syslog: Switch to g_test_trap_subprocess() (3.26 KB, patch)
2017-06-09 18:18 UTC, Simon McVittie
Details | Splinter Review
3/3] Opt-in to deprecation warnings for GLib 2.38 and 2.40 (883 bytes, patch)
2017-06-09 18:18 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2017-06-09 18:17:51 UTC
+++ This bug was initially created as a clone of Bug #101354 +++

Some GLib features that I want to make use of in the tests for Bug #101354 need GLib 2.40 (available in Ubuntu >= 14.04 LTS, and older than Debian 8).

Moving to that version turns out to improve test coverage on Windows too.
Comment 1 Simon McVittie 2017-06-09 18:18:18 UTC
Created attachment 131830 [details] [review]
1/3] Bump GLib dependency for tests to 2.40

This is quite old (it's the version in Ubuntu 14.04 LTS, and older
than the version in Debian 8) but gives us g_test_skip(),
g_test_trap_subprocess() and GVariantDict, all of which will be
useful in the regression tests.

Remove workarounds for old versions.
Comment 2 Simon McVittie 2017-06-09 18:18:40 UTC
Created attachment 131831 [details] [review]
2/3] test/internals/syslog: Switch to g_test_trap_subprocess()

This re-executes the same binary with special command-line options
instead of forking. As a result, it can work on Windows, and is less
dependent on Unix libraries continuing to work across a fork().
Comment 3 Simon McVittie 2017-06-09 18:18:59 UTC
Created attachment 131832 [details] [review]
3/3] Opt-in to deprecation warnings for GLib 2.38 and 2.40
Comment 4 Philip Withnall 2017-06-09 18:25:50 UTC
Comment on attachment 131830 [details] [review]
1/3] Bump GLib dependency for tests to 2.40

Review of attachment 131830 [details] [review]:
-----------------------------------------------------------------

++

::: configure.ac
@@ -263,3 @@
>  # or binaries.
>  
>  AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_36], [Ignore post-2.36 deprecations])

Might want to mention in the commit message that GLIB_VERSION_MIN_REQUIRED is bumped in patch 3/3 because 2/3 gets rid of some deprecated API usages.
Comment 5 Philip Withnall 2017-06-09 18:27:29 UTC
Comment on attachment 131831 [details] [review]
2/3] test/internals/syslog: Switch to g_test_trap_subprocess()

Review of attachment 131831 [details] [review]:
-----------------------------------------------------------------

++
Comment 6 Philip Withnall 2017-06-09 18:27:37 UTC
Comment on attachment 131832 [details] [review]
3/3] Opt-in to deprecation warnings for GLib 2.38 and 2.40

Review of attachment 131832 [details] [review]:
-----------------------------------------------------------------

++, trivially.
Comment 7 Simon McVittie 2017-06-12 10:52:46 UTC
Thanks, merged for 1.11.14 with clarified commit messages.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.