> On Juli 23, 2014, 9:13 vorm., Vishesh Handa wrote: > > src/file/lib/autotests/filemodifyjobtest.cpp, line 78 > > <https://git.reviewboard.kde.org/r/119415/diff/2/?file=292078#file292078line78> > > > > Hi. You're on the right track, but this isn't the exact way to fix the > > test. > > > > Lets take a look at what was happening before? > > * baloo_getxattr returns -1 if the value does not exist and a positive > > value indicating the length if it does exist. > > * Previously, the "user.xdg.tags" xatrr was always being set, even if > > it did not have any value. > > * What value should you be checking for now? > > Felix Eisele wrote: > I'm not sure if i understand you. The test check only the old way and > only the positiv way (writing a none empty tag). I think we need a new > testcase in which explicit writing a empty tag. I recommend a new testmethod. > > Vishesh Handa wrote: > Yes. We could write a new testmethod, but how about we just focus on > fixing this test for now? > > What the test was previously doing - Setting the comment, rating, but not > the tag. It then checked if each of these values was correctly set. > What the test is now doing - Setting all 3 values, and checking if they > have been set. > > The patch you provided no longer sets the "user.xdg.tags" value. So, the > test must be updated to make sure it correctly check that "user.xdg.tags" has > not been set. It was previously doing this by checking if "user.xdg.tags" was > a blank string of size 0. Since with this patch it no longer exists, it > should not check for -1. > > Hint: Only line 70 needs to be changed. The rest of the changes in the > test can be discarded. > > Felix Eisele wrote: > Ah ok. i can now follow you. > QCOMPARE(len, -1); > is the solution. > But why not extending the test to set the "user.xdg.tags"? it will be a > more testing coverage.
Ok i think im doing only the change and later it could be writen new tests. So here the new patch - Felix ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/119415/#review62926 ----------------------------------------------------------- On Juli 23, 2014, 8:39 vorm., Felix Eisele wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/119415/ > ----------------------------------------------------------- > > (Updated Juli 23, 2014, 8:39 vorm.) > > > Review request for Baloo and Vishesh Handa. > > > Bugs: 333478 > http://bugs.kde.org/show_bug.cgi?id=333478 > > > Repository: baloo > > > Description > ------- > > Pacth to delete xattr from untagged file > > > Diffs > ----- > > src/file/lib/autotests/filemodifyjobtest.cpp ebfc9d9 > src/file/lib/baloo_xattr_p.h 87dc55f > src/file/lib/filecustommetadata.cpp 664b13f > > Diff: https://git.reviewboard.kde.org/r/119415/diff/ > > > Testing > ------- > > > Thanks, > > Felix Eisele > >
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<