GNOME Bugzilla – Bug 780081
libgdata 0.17.7 fails streams tests (unable to set up SSL cert)
Last modified: 2017-03-15 12:17:31 UTC
================================================= libgdata 0.17.7: gdata/tests/test-suite.log ================================================= # TOTAL: 301 # PASS: 299 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 2 .. contents:: :depth: 2 ERROR: streams ============== (/tmp/portage/dev-libs/0.17.7/work/libgdata-0.17.7/gdata/tests/.libs/streams:32544): GLib-CRITICAL **: g_file_get_contents: assertion 'filename != NULL' failed # random seed: R02Sa71eca03d2972286d152b3af20a850dc 1..46 # Start of download-stream tests Trace/breakpoint trap (core dumped) # GLib-FATAL-CRITICAL: g_file_get_contents: assertion 'filename != NULL' failed ERROR: streams - too few tests run (expected 46, got 0) ERROR: streams - exited with status 133 (terminated by signal 5?) 0.17.7 added code like: cert_path = g_test_build_filename (G_TEST_DIST, "cert.pem", NULL); key_path = g_test_build_filename (G_TEST_DIST, "key.pem", NULL); soup_server_set_ssl_cert_file (server, cert_path, key_path, &error); It errors from this now somehow for me.
+ Trace 237268
btw, G_TEST_DIST is new in 2.38 iirc, while for the overall libgdata non-tests part the dependency is lower in configure.ac. By my understanding new in 2.38 G_TEST_DIST is needed to properly support tests in out of sourcedir settings.
adding g_print's for printing out key_path and cert_path points to the existing test cert files properly, so thoroughly confused what's going wrong here.
(In reply to Mart Raudsepp from comment #1) > btw, G_TEST_DIST is new in 2.38 iirc, while for the overall libgdata > non-tests part the dependency is lower in configure.ac. By my understanding > new in 2.38 G_TEST_DIST is needed to properly support tests in out of > sourcedir settings. Whoops, thanks for pointing that out. Fixed on master: 192bcf3 build: Bump minimum GLib dependency to 2.38.0 (In reply to Mart Raudsepp from comment #2) > adding g_print's for printing out key_path and cert_path points to the > existing test cert files properly, so thoroughly confused what's going wrong > here. This doesn’t make any sense to me either: the assertion failure is due to passing a NULL path in to g_file_get_contents(), but the rest of the backtrace is showing the paths set correctly to some string value. (The code would fail differently if g_file_get_contents() was receiving a non-NULL path which pointed to a non-existent file.) Can you run under gdb and print out all the relevant variables in soup_server_set_ssl_cert_file() to see if something’s going wrong there (although I’m not sure how it can)? Maybe running under valgrind first would be a good idea, to see if this is a memory corruption issue.
After some discussion on IRC, it’s become apparent that the problem was a bug in libsoup, fixed in 2.55.90: * Fixed soup_server_set_ssl_cert_file(), which was added in 2.48 but didn't actually work... [patch on libsoup-list from Sean DuBois] I’ll push a patch which ups libgdata’s dependency check on libsoup for the test code (but not for the core of libgdata). It currently checks for libsoup 2.47.3 — I’ll increase that to 2.55.90.
Fixed on master; the fix will be in the 0.17.8 release (which I’ll make after I get time to fix bug #780067). Thanks! commit 25225e375ec64a0e4b822c4db8bace07deea78d4 Author: Philip Withnall <withnall@endlessm.com> Date: Wed Mar 15 12:14:53 2017 +0000 build: Bump libsoup dependency for streams test to 2.55.90 Previously the streams test depended on new API added in libsoup 2.47.3. It still depends on that API, but it’s become apparent that there was a bug in libsoup which rendered soup_server_set_ssl_cert_file() useless until libsoup 2.55.90. Bump the dependency (for the test code only) to 2.55.90. Thanks to Mart Raudsepp for their help in debugging. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=780081 configure.ac | 11 ++++++----- gdata/tests/streams.c | 42 +++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 26 deletions(-)