[Missing tests]: Break out platform-specific discardable paging into Lock/UnlockPages. |
||||||
Issue descriptionAutomated tests for the below commit have been missing.Would it be possible to add test coverage to avoid regressions in future? CL: === https://chromium.googlesource.com/chromium/src.git/+/42e65bf2e23d5d36994677dd630d2cf1b5fb86e0 Ref Bug: ======== https://bugs.chromium.org/p/chromium/issues/detail?id=716205 Thank you!
,
Aug 8 2017
,
Aug 15 2017
I'm unable to coax the OS API into failing, so I can't really construct a test for this :-/ nyquist: Any suggestions?
,
Aug 15 2017
,
Aug 15 2017
,
Aug 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/97dd531b30a7089ee1d69da22ab4bacaf4883ac3 commit 97dd531b30a7089ee1d69da22ab4bacaf4883ac3 Author: Wez <wez@chromium.org> Date: Thu Aug 31 01:26:51 2017 Add test that Lock() returns failed if ashmem_pin_region() fails. To cause ashmem_pin_region() to fail, we arrange for it to be called with an invalid file-descriptor, which requires a valid-looking fd (i.e. we can't just Close() |memory|), but one on which the operation is invalid. We can overwrite the |memory| fd with a handle to a different file using dup2(), which has the nice properties that |memory| still has a valid fd that it can close, etc without errors, but on which ashmem_pin_region() will fail. dup2() will close the ashmem file description before duplicating our dummy file into the |memory| fd. Bug: 752441 Change-Id: I4c6ecced69a2817ec7d86da0e783b9f6e1d238f0 Reviewed-on: https://chromium-review.googlesource.com/602395 Commit-Queue: Wez <wez@chromium.org> Reviewed-by: Tommy Nyquist <nyquist@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#498706} [modify] https://crrev.com/97dd531b30a7089ee1d69da22ab4bacaf4883ac3/base/memory/discardable_shared_memory_unittest.cc
,
Aug 31 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by w...@chromium.org
, Aug 5 2017