GNOME Bugzilla – Bug 699412
libtracker-fts/parser/nwords_6 test fails
Last modified: 2014-04-21 11:10:39 UTC
We get: /libtracker-fts/parser/nwords_4: OK /libtracker-fts/parser/nwords_5: OK /libtracker-fts/parser/nwords_6: ** Tracker:ERROR:tracker-parser-test.c:151:expected_nwords_check: assertion failed (nwords == testdata->expected_nwords): (5 == 8) FAIL GTester: last random seed: R02S40c5c61cdb732473c6c6653ea0b3f5a4 /bin/sh: línea 1: 11393 Terminado gtester --verbose tracker-fts-test tracker-parser-test make[4]: *** [test] Error 143 make[4]: Leaving directory `/var/tmp/portage/app-misc/tracker-0.16.1/work/tracker-0.16.1/tests/libtracker-fts' make[3]: *** [check-am] Error 2 make[3]: Leaving directory `/var/tmp/portage/app-misc/tracker-0.16.1/work/tracker-0.16.1/tests/libtracker-fts' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/app-misc/tracker-0.16.1/work/tracker-0.16.1/tests/libtracker-fts' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-misc/tracker-0.16.1/work/tracker-0.16.1/tests' make: *** [check-recursive] Error 1
FTR, I checked this with someone who speaks/reads chinese and she said it was indeed more like 5 words than 8.
Is this with Tracker using libicu or libunistring? Which version?
It's using icu-51.1
icu as well. Might give a shot at unistring and see what it says.
Fixed the test by providing a more generic string instead of the previous made up one. Both libunistring and libicu agree on the number of words given in the new test string.
Unfortunately, the test *starts* failing for me after this commit: /libtracker-fts/parser/nwords_6: ** Tracker:ERROR:tracker-parser-test.c:151:expected_nwords_check: assertion failed (nwords == testdata->expected_nwords): (3 == 2) I am using libicu 49.1.1 (Fedora 18 -- libicu-49.1.1-10.fc18.x86_64).
I built against the latest libicu (52.1) and, with that version, the test passes. In the process, I pushed a couple of fixes to get building against a non-system libicu to work.
Created attachment 256971 [details] [review] Allow alternate number of expected words Sam, can you check whether the following patch works with libicu 49? The exact number of words given to us by the libicu logic is in part what we want to test, but we shouldn't be so strict regarding something which we cannot fully control. The patch just adds an alternate number of words that may be expected in the test.
Hmm, I wonder if we should just depend on the newer icu instead? The patch looks good Aleksander, but what if the next version has another number of word... Sam, thoughts?
Hey Aleksander, sorry for the delay ... The patch does work, although it would be nice to mention libicu <= 49 specifically as the problem in the commit message or the comment. Looks like Fedora 20 is going to ship with ICU 50, and Ubuntu 13.10 has just shipped with 48 (really 4.8, they changed the numbering with 49), so I think it will be painful for us to just increase the minimum version right now. Fedora: http://koji.fedoraproject.org/koji/packageinfo?packageID=162 Ubuntu: https://launchpad.net/ubuntu/+source/icu
Review of attachment 256971 [details] [review]: Committed this as the test suite is still failing for me and nobody seems to have objected.
Marking as fixed now since you've pushed this patch Sam. Just to note, we do now have an ICU 4.8.1.1 dependency on Tracker (if we use ICU at all).
Confirming this now works fine in 1.0, thanks guys.