Bug 43844

Summary: wocky-connector-test crashes in windows
Product: Wocky Reporter: Siraj Razick <siraj>
Component: GeneralAssignee: Siraj Razick <siraj>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: nicolas
Version: git master   
Hardware: x86 (IA32)   
OS: Windows (All)   
URL: http://cgit.collabora.com/git/user/siraj/wocky.git/commit/?h=bug_43844&id=c58e7bb48173214a6b09268cad2d2fab5c9a1e95
Whiteboard:
i915 platform: i915 features:
Attachments: wocky log : windows

Description Siraj Razick 2011-12-14 17:14:13 UTC
This test case works on windows with wine, but fails on windows 7. and the library is cross compiled on Linux with mingw32

C:\Users\siraj\gllib\windows7\root\bin>wocky-connector-test.exe
wocky-connector-test-Message: libsasl2 not found: skipping MD5 SASL tests
/connector/basic/internals: Error: wocky-connector-error.7: TLS handshake erro
-9: GNUTLS_E_UNEXPECTED_PACKET_LENGTH **
wocky-connector-test:ERROR:wocky-connector-test.c:3396:run_test: assertion fai
d (error == NULL): TLS handshake error: -9: GNUTLS_E_UNEXPECTED_PACKET_LENGTH
ocky-connector-error, 7)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

C:\Users\siraj\gllib\windows7\root\bin>
Comment 1 Siraj Razick 2011-12-16 13:11:31 UTC
Created attachment 54517 [details]
wocky log : windows

wocky debug log
Comment 2 Siraj Razick 2011-12-16 14:19:04 UTC
from the log it was so obvious that the error was due the paths of the cert files,
it was hard coded during the cross compile so it never worked on windows.
so i guess the problem is fix.. need to find a clean way to solve this.

maybe using relative path when running it ? so that certs/ directory is picked up from current path the test-case? (only for windows) or when cross compiling is detect .
Comment 3 Siraj Razick 2012-02-01 10:23:05 UTC
patch
Comment 4 Jonny Lamb 2012-02-01 10:28:54 UTC
Is this a fix for the path problem? I don't understand.
Comment 5 Siraj Razick 2012-02-01 10:33:10 UTC
(In reply to comment #4)
> Is this a fix for the path problem? I don't understand.

stefw told me to add an assert to make the problem more obvious by adding some asserts I can't remember why we discussed it else were and not here.

<<
Updated by Stef Walter about 1 month ago
Comment Edit

Did you send a patch upstream to give a better error message in this corner case? We discussed doing this on IRC, so that the next person who comes along doesn't have to figure out the same thing.

>>
Comment 6 Nicolas Dufresne 2012-04-05 07:36:26 UTC
> add_certfiles: wocky-tls.c:545: checking /home\siraj\projects\collabora\windows\git\tp-windows\wocky\tests\certs\ca-0-cert.pem

Looks like the certificate path are all wrong.
Comment 7 Nicolas Dufresne 2012-04-05 07:39:34 UTC
Ok, didn't see the link. Basically you didn't properly set the path at build time and it fail, I agree this patch should make it more obvious.

++
Comment 8 Nicolas Dufresne 2012-04-05 07:50:40 UTC
Correction, this fails the tests for me.
Comment 9 Nicolas Dufresne 2012-04-05 08:12:25 UTC
Ok, this is because I removed the CRL, it builds because I forgot to remove the -DTLS_CRL_DIR in the tests Makefile.am.

Fixed and merged.

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.