Closed
Bug 1364607
Opened 7 years ago
Closed 7 years ago
Add a test for empty Safe Browsing updates
Categories
(Toolkit :: Safe Browsing, enhancement, P2)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: francois, Assigned: dlee)
References
Details
(Whiteboard: #sbv4-m7)
Attachments
(1 file)
Google suspects that the checksum mismatches we are seeing during updates (bug 1364606) may be due to empty updates. In that case, the server should return an empty list with the same hash as you already have. They will add a unit test for this. We should do the same.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → dlee
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•7 years ago
|
||
If I understand "empty update" correctly, it will be skipped by "CheckValidUpdate"[1] because it is empty[2]. So we won't treat this as checksum mismatch. I'll see if I can reproduce this locally. [1] https://dxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/Classifier.cpp#1326 [2] https://dxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/Classifier.cpp#1184
Comment hidden (mozreview-request) |
Assignee | ||
Comment 3•7 years ago
|
||
Hi francois, I think empty update is not related to checksum mismatch issue in bug 1364606, but add a test case for this is still useful. This patch includes two test cases: 1. Apply an empty update through Classifier interface, which is the normal use case. 2. Apply an empty through LookupCacheV4::ApplyUpdate, this ensure update algorithm is correct when applying an empty update. This scenario actually shouldn't happen in normal use case because empty update will be skipped by Classifier::CheckValidUpdate
Reporter | ||
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8868438 [details] Bug 1364607 - Add a test for empty Safe Browsing updates. https://reviewboard.mozilla.org/r/140034/#review143688 ::: toolkit/components/url-classifier/tests/gtest/TestUrlClassifierTableUpdateV4.cpp:761 (Diff revision 1) > testOpenLookupCache(); > > Clear(); > } > > +// This test ensure an empty update works correctly. Empty update "This test ensures that an..." ::: toolkit/components/url-classifier/tests/gtest/TestUrlClassifierTableUpdateV4.cpp:795 (Diff revision 1) > + testFullUpdate(emptyAddition, &checksum); > + > + Clear(); > +} > + > +// This test ensure apply an empty update directly through udpate algorithm "This test ensures that applying an..." also, small typo: "update"
Attachment #8868438 -
Flags: review?(francois) → review+
Comment hidden (mozreview-request) |
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/19e1fbbfc10f Add a test for empty Safe Browsing updates. r=francois
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/19e1fbbfc10f
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•