Summary: | devel/librest: does not pass the tests | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Thierry Thomas <thierry> | ||||||||||||
Component: | Individual Port(s) | Assignee: | Thierry Thomas <thierry> | ||||||||||||
Status: | Closed FIXED | ||||||||||||||
Severity: | Affects Only Me | CC: | cjpm, cmt | ||||||||||||
Priority: | --- | Keywords: | patch | ||||||||||||
Version: | Latest | Flags: | cmt:
maintainer-feedback+
|
||||||||||||
Hardware: | Any | ||||||||||||||
OS: | Any | ||||||||||||||
See Also: | http://bugs.debian.org/765107 | ||||||||||||||
Bug Depends on: | |||||||||||||||
Bug Blocks: | 197530 | ||||||||||||||
Attachments: |
|
Description
Thierry Thomas
2015-02-13 20:09:21 UTC
Maintainer CC'd Created attachment 152946 [details]
Results of the tests
Thierry, The problem seems related with this bug reported on Debian [1]. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765107 Created attachment 153126 [details]
test-suite.log
After applied the patch included at [1], it passed the tests.
(In reply to Carlos Jacobo Puga Medina from comment #4) I've just applied this patch: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=25;filename=02_thread-tests-sleep-for-server-to-start.patch;att=1;bug=765107 and it still fails on oauth and oauth-async: gmake check-TESTS gmake[2]: Entering directory '/usr/ports/devel/librest/work/rest-0.7.92/tests' gmake[3]: Entering directory '/usr/ports/devel/librest/work/rest-0.7.92/tests' PASS: proxy PASS: proxy-continuous PASS: threaded Segmentation fault (core dumped) FAIL: oauth Segmentation fault (core dumped) FAIL: oauth-async PASS: oauth2 PASS: flickr PASS: lastfm Trace/BPT trap (core dumped) XFAIL: xml PASS: custom-serialize gmake[4]: Entering directory '/usr/ports/devel/librest/work/rest-0.7.92/tests' gmake[4]: Nothing to be done for 'all'. gmake[4]: Leaving directory '/usr/ports/devel/librest/work/rest-0.7.92/tests' ============================================================================ Testsuite summary for rest 0.7.92 ============================================================================ # TOTAL: 10 # PASS: 7 # SKIP: 0 # XFAIL: 1 # FAIL: 2 # XPASS: 0 # ERROR: 0 ============================================================================ See tests/test-suite.log ============================================================================ Makefile:769: recipe for target 'test-suite.log' failed gmake[3]: *** [test-suite.log] Error 1 gmake[3]: Leaving directory '/usr/ports/devel/librest/work/rest-0.7.92/tests' Makefile:875: recipe for target 'check-TESTS' failed gmake[2]: *** [check-TESTS] Error 2 gmake[2]: Leaving directory '/usr/ports/devel/librest/work/rest-0.7.92/tests' Makefile:1011: recipe for target 'check-am' failed gmake[1]: *** [check-am] Error 2 gmake[1]: Leaving directory '/usr/ports/devel/librest/work/rest-0.7.92/tests' *** Error code 2 Unfortunately, oauth is the function used by Corebird. Note: I'm testing on 10.1-STABLE / amd64. The "oauth" test dumps core like this: (gdb) bt #0 0x0000000801931a90 in g_string_append_uri_escaped () from /usr/local/lib/libglib-2.0.so.0 #1 0x0000000800831911 in sign_hmac (proxy=0x80642c0b0, call=0x80923a0b0, oauth_params=0x809148de0) at oauth-proxy-call.c:149 #2 0x0000000800831476 in _prepare (call=0x80923a0b0, error=0x7fffffffd870) at oauth-proxy-call.c:292 #3 0x000000080082aee7 in prepare_message (call=0x80923a0b0, error_out=0x7fffffffd970) at rest-proxy-call.c:830 and: 149 g_string_append_uri_escaped (text, url_str, NULL, FALSE); (gdb) print url_str $1 = 0x664e580 <error: Cannot access memory at address 0x664e580> Lo and behold, there was a warning on the assignment to just that url_str: oauth-proxy-call.c:130:11: warning: incompatible integer to pointer conversion assigning to 'const char *' from 'int' [-Wint-conversion] url_str = rest_proxy_call_get_url (call); which explains the garbage address in url_str. And for real, upstream fixed that bug without realising it's impact: https://git.gnome.org/browse/librest/commit/?id=b50ace7738ea03817acdad87fb2b338a86018329 Created attachment 153405 [details] fix coredump in oauth, enable regression tests svn info: M Makefile A files A files/patch-rest_oauth-proxy-call.c A files/patch-tests_custom-serialize.c A files/patch-tests_threaded.c Committer: please note added files. This patch enables the regression-tests, fixes the race conditions (no functionality impact) in two tests (as proposed by reporter) and the crash in the oauth functions (patch obtained from https://git.gnome.org/browse/librest/commit/?id=b50ace7738ea03817acdad87fb2b338a86018329). I'm incrementing PORTREVISION (code change). Created attachment 153473 [details]
Results of the tests with the fix
With this patch, there is still a problem:
Trace/BPT trap (core dumped)
XFAIL: xml
But anyway, oauth is fixed, and that was the blocking case for Corebird.
Committed, thanks! A commit references this bug: Author: thierry Date: Tue Feb 24 21:11:43 UTC 2015 New revision: 379839 URL: https://svnweb.freebsd.org/changeset/ports/379839 Log: - Add a regression-test target - Fix an error for Oauth and bump PORTREVISION. PR: ports/197599 Submitted by: cmt (at) burggraben.net (maintainer) Obtained from: upstream Changes: head/devel/librest/Makefile head/devel/librest/files/ head/devel/librest/files/patch-rest_oauth-proxy-call.c head/devel/librest/files/patch-tests_custom-serialize.c head/devel/librest/files/patch-tests_threaded.c |