After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 699412 - libtracker-fts/parser/nwords_6 test fails
libtracker-fts/parser/nwords_6 test fails
Status: VERIFIED FIXED
Product: tracker
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Aleksander Morgado
Depends on:
Blocks:
 
 
Reported: 2013-05-01 19:23 UTC by Pacho Ramos
Modified: 2014-04-21 11:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow alternate number of expected words (4.07 KB, patch)
2013-10-11 07:11 UTC, Aleksander Morgado
committed Details | Review

Description Pacho Ramos 2013-05-01 19:23:30 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
Comment 1 Gilles Dartiguelongue 2013-05-13 09:57:04 UTC
FTR,  I checked this with someone who speaks/reads chinese and she said it was indeed more like 5 words than 8.
Comment 2 Aleksander Morgado 2013-05-20 08:30:28 UTC
Is this with Tracker using libicu or libunistring? Which version?
Comment 3 Pacho Ramos 2013-05-20 18:22:31 UTC
It's using icu-51.1
Comment 4 Gilles Dartiguelongue 2013-05-20 20:53:59 UTC
icu as well. Might give a shot at unistring and see what it says.
Comment 5 Aleksander Morgado 2013-10-03 14:40:19 UTC
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.
Comment 6 Sam Thursfield 2013-10-10 17:01:22 UTC
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).
Comment 7 Sam Thursfield 2013-10-10 19:22:01 UTC
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.
Comment 8 Aleksander Morgado 2013-10-11 07:11:41 UTC
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.
Comment 9 Martyn Russell 2013-10-11 09:18:10 UTC
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?
Comment 10 Sam Thursfield 2013-10-26 13:21:29 UTC
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
Comment 11 Sam Thursfield 2013-11-25 18:24:30 UTC
Review of attachment 256971 [details] [review]:

Committed this as the test suite is still failing for me and nobody seems to have objected.
Comment 12 Martyn Russell 2014-03-21 12:00:33 UTC
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).
Comment 13 Gilles Dartiguelongue 2014-04-21 11:10:39 UTC
Confirming this now works fine in 1.0, thanks guys.