New issue
Advanced search Search tips

Issue 658723 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Change testing scheme for libsecret in OSCrypt

Project Member Reported by cfroussios@chromium.org, Oct 24 2016

Issue description

The current testing scheme for libsecret and keyring in OSCrypt takes advantage of undefined behaviour. More specifically, in
https://cs.chromium.org/chromium/src/components/os_crypt/key_storage_libsecret_unittest.cc?q=libsecret+unittest&sq=package:chromium&dr=CSs (and elsewhere)
the mock items and mock methods are cast to incompatible types.

Testing should be reworked in a way that doesn't require unsafe casting.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a42817875f7395f54bc567a319b79062b489261

commit 8a42817875f7395f54bc567a319b79062b489261
Author: cfroussios <cfroussios@chromium.org>
Date: Tue Oct 25 13:16:11 2016

Remove function casting from Libsecret tests

Some libsecret data types are hidden. For our tests, we introduce our
own data types and cast them to the expected types. Previously, that was
done by casting the mocked functions. This is undefined behaviour,
thefore we are moving the casting inside the mock methods.

BUG= 658723 

Review-Url: https://codereview.chromium.org/2444313002
Cr-Commit-Position: refs/heads/master@{#427331}

[modify] https://crrev.com/8a42817875f7395f54bc567a319b79062b489261/chrome/browser/password_manager/native_backend_libsecret_unittest.cc
[modify] https://crrev.com/8a42817875f7395f54bc567a319b79062b489261/components/os_crypt/key_storage_libsecret_unittest.cc
[modify] https://crrev.com/8a42817875f7395f54bc567a319b79062b489261/components/os_crypt/libsecret_util_linux.cc

Status: Fixed (was: Assigned)

Sign in to add a comment