Bug 101362

Summary: Use GLib 2.40 in tests
Product: dbus Reporter: Simon McVittie <smcv>
Component: coreAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: D-Bus Maintainers <dbus>
Severity: enhancement    
Priority: medium CC: alexl, dbus, desrt, marejde
Version: git master   
Hardware: All   
OS: All   
URL: https://github.com/smcv/dbus/commits/glib-2-40
Whiteboard: review+
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 101354    
Attachments: 1/3] Bump GLib dependency for tests to 2.40
2/3] test/internals/syslog: Switch to g_test_trap_subprocess()
3/3] Opt-in to deprecation warnings for GLib 2.38 and 2.40

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.