Changeset 239235 in webkit


Ignore:
Timestamp:
Dec 14, 2018 2:49:07 PM (5 years ago)
Author:
jiewen_tan@apple.com
Message:

[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=192061

Reviewed by Dewei Zhu.

Part 2.

Add some additional temporary logging info. Since the failure cannot be reproduced easily by human, we have to
rely on the test infrastructure to reporoduce it. Once the bug is determined and fixed, we should remove all
logging added in this patch.

  • UIProcess/WebAuthentication/Cocoa/HidService.mm:

(WebKit::HidService::deviceAdded):

  • UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp:

(WebKit::CtapHidAuthenticator::makeCredential):
(WebKit::CtapHidAuthenticator::getAssertion):

  • UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:

(WebKit::CtapHidDriver::Worker::write):
(WebKit::CtapHidDriver::Worker::read):
(WebKit::CtapHidDriver::Worker::returnMessage):
(WebKit::CtapHidDriver::transact):
(WebKit::CtapHidDriver::continueAfterChannelAllocated):
(WebKit::CtapHidDriver::continueAfterResponseReceived):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r239229 r239235  
     12018-12-14  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        [Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=192061
     5
     6        Reviewed by Dewei Zhu.
     7
     8        Part 2.
     9
     10        Add some additional temporary logging info. Since the failure cannot be reproduced easily by human, we have to
     11        rely on the test infrastructure to reporoduce it. Once the bug is determined and fixed, we should remove all
     12        logging added in this patch.
     13
     14        * UIProcess/WebAuthentication/Cocoa/HidService.mm:
     15        (WebKit::HidService::deviceAdded):
     16        * UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp:
     17        (WebKit::CtapHidAuthenticator::makeCredential):
     18        (WebKit::CtapHidAuthenticator::getAssertion):
     19        * UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:
     20        (WebKit::CtapHidDriver::Worker::write):
     21        (WebKit::CtapHidDriver::Worker::read):
     22        (WebKit::CtapHidDriver::Worker::returnMessage):
     23        (WebKit::CtapHidDriver::transact):
     24        (WebKit::CtapHidDriver::continueAfterChannelAllocated):
     25        (WebKit::CtapHidDriver::continueAfterResponseReceived):
     26
    1272018-12-14  Adrian Perez de Castro  <aperez@igalia.com>
    228
  • trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm

    r238919 r239235  
    9494    auto driver = std::make_unique<CtapHidDriver>(createHidConnection(device));
    9595    // Get authenticator info from the device.
     96    // FIXME(192061)
     97    LOG_ERROR("Start asking device info.");
    9698    driver->transact(encodeEmptyAuthenticatorRequest(CtapRequestCommand::kAuthenticatorGetInfo), [weakThis = makeWeakPtr(*this), ptr = driver.get()](Vector<uint8_t>&& response) {
    9799        ASSERT(RunLoop::isMain());
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp

    r238166 r239235  
    5050void CtapHidAuthenticator::makeCredential()
    5151{
     52    // FIXME(192061)
     53    LOG_ERROR("Start making credentials.");
    5254    auto cborCmd = encodeMakeCredenitalRequestAsCBOR(requestData().hash, requestData().creationOptions, m_info.options().userVerificationAvailability());
    5355    m_driver->transact(WTFMove(cborCmd), [weakThis = makeWeakPtr(*this)](Vector<uint8_t>&& data) {
     
    7173void CtapHidAuthenticator::getAssertion()
    7274{
     75    // FIXME(192061)
     76    LOG_ERROR("Start getting assertions.");
    7377    auto cborCmd = encodeGetAssertionRequestAsCBOR(requestData().hash, requestData().requestOptions, m_info.options().userVerificationAvailability());
    7478    m_driver->transact(WTFMove(cborCmd), [weakThis = makeWeakPtr(*this)](Vector<uint8_t>&& data) {
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp

    r238246 r239235  
    7070{
    7171    ASSERT(m_state == State::Write);
     72    // FIXME(192061)
     73    LOG_ERROR("Start writing data.");
    7274    if (sent != HidConnection::DataSent::Yes) {
    7375        returnMessage(std::nullopt);
     
    9799{
    98100    ASSERT(m_state == State::Read);
     101    // FIXME(192061)
     102    LOG_ERROR("Start reading data.");
    99103    if (!m_responseMessage) {
    100104        m_responseMessage = FidoHidMessage::createFromSerializedData(data);
     
    127131void CtapHidDriver::Worker::returnMessage(std::optional<fido::FidoHidMessage>&& message)
    128132{
     133    // FIXME(192061)
     134    LOG_ERROR("Start returning data.");
    129135    m_state = State::Idle;
    130136    m_connection->unregisterDataReceivedCallback();
     
    147153
    148154    // Allocate a channel.
     155    // FIXME(192061)
     156    LOG_ERROR("Start allocating a channel.");
    149157    ASSERT(m_nonce.size() == kHidInitNonceLength);
    150158    cryptographicallyRandomValues(m_nonce.data(), m_nonce.size());
     
    188196    m_channelId |= static_cast<uint32_t>(payload[index]);
    189197    // FIXME(191534): Check the reset of the payload.
     198    // FIXME(192061)
     199    LOG_ERROR("Start sending the request.");
    190200    auto cmd = FidoHidMessage::create(m_channelId, FidoHidDeviceCommand::kCbor, m_requestData);
    191201    ASSERT(cmd);
     
    202212    ASSERT(m_state == State::Ready);
    203213    ASSERT(!message || message->channelId() == m_channelId);
     214    // FIXME(192061)
     215    LOG_ERROR("Start returning the response.");
    204216    returnResponse(message ? message->getMessagePayload() : Vector<uint8_t>());
    205217}
Note: See TracChangeset for help on using the changeset viewer.