Title: [239235] trunk/Source/WebKit
Revision
239235
Author
[email protected]
Date
2018-12-14 14:49:07 -0800 (Fri, 14 Dec 2018)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (239234 => 239235)


--- trunk/Source/WebKit/ChangeLog	2018-12-14 22:33:34 UTC (rev 239234)
+++ trunk/Source/WebKit/ChangeLog	2018-12-14 22:49:07 UTC (rev 239235)
@@ -1,3 +1,29 @@
+2018-12-14  Jiewen Tan  <[email protected]>
+
+        [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):
+
 2018-12-14  Adrian Perez de Castro  <[email protected]>
 
         [GTK] Unreviewed build fix.

Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm (239234 => 239235)


--- trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm	2018-12-14 22:33:34 UTC (rev 239234)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm	2018-12-14 22:49:07 UTC (rev 239235)
@@ -93,6 +93,8 @@
 {
     auto driver = std::make_unique<CtapHidDriver>(createHidConnection(device));
     // Get authenticator info from the device.
+    // FIXME(192061)
+    LOG_ERROR("Start asking device info.");
     driver->transact(encodeEmptyAuthenticatorRequest(CtapRequestCommand::kAuthenticatorGetInfo), [weakThis = makeWeakPtr(*this), ptr = driver.get()](Vector<uint8_t>&& response) {
         ASSERT(RunLoop::isMain());
         if (!weakThis)

Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp (239234 => 239235)


--- trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp	2018-12-14 22:33:34 UTC (rev 239234)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp	2018-12-14 22:49:07 UTC (rev 239235)
@@ -49,6 +49,8 @@
 
 void CtapHidAuthenticator::makeCredential()
 {
+    // FIXME(192061)
+    LOG_ERROR("Start making credentials.");
     auto cborCmd = encodeMakeCredenitalRequestAsCBOR(requestData().hash, requestData().creationOptions, m_info.options().userVerificationAvailability());
     m_driver->transact(WTFMove(cborCmd), [weakThis = makeWeakPtr(*this)](Vector<uint8_t>&& data) {
         ASSERT(RunLoop::isMain());
@@ -70,6 +72,8 @@
 
 void CtapHidAuthenticator::getAssertion()
 {
+    // FIXME(192061)
+    LOG_ERROR("Start getting assertions.");
     auto cborCmd = encodeGetAssertionRequestAsCBOR(requestData().hash, requestData().requestOptions, m_info.options().userVerificationAvailability());
     m_driver->transact(WTFMove(cborCmd), [weakThis = makeWeakPtr(*this)](Vector<uint8_t>&& data) {
         ASSERT(RunLoop::isMain());

Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp (239234 => 239235)


--- trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp	2018-12-14 22:33:34 UTC (rev 239234)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp	2018-12-14 22:49:07 UTC (rev 239235)
@@ -69,6 +69,8 @@
 void CtapHidDriver::Worker::write(HidConnection::DataSent sent)
 {
     ASSERT(m_state == State::Write);
+    // FIXME(192061)
+    LOG_ERROR("Start writing data.");
     if (sent != HidConnection::DataSent::Yes) {
         returnMessage(std::nullopt);
         return;
@@ -96,6 +98,8 @@
 void CtapHidDriver::Worker::read(const Vector<uint8_t>& data)
 {
     ASSERT(m_state == State::Read);
+    // FIXME(192061)
+    LOG_ERROR("Start reading data.");
     if (!m_responseMessage) {
         m_responseMessage = FidoHidMessage::createFromSerializedData(data);
         // The first few reports could be for other applications, and therefore ignore those.
@@ -126,6 +130,8 @@
 
 void CtapHidDriver::Worker::returnMessage(std::optional<fido::FidoHidMessage>&& message)
 {
+    // FIXME(192061)
+    LOG_ERROR("Start returning data.");
     m_state = State::Idle;
     m_connection->unregisterDataReceivedCallback();
     m_callback(WTFMove(message));
@@ -146,6 +152,8 @@
     m_responseCallback = WTFMove(callback);
 
     // Allocate a channel.
+    // FIXME(192061)
+    LOG_ERROR("Start allocating a channel.");
     ASSERT(m_nonce.size() == kHidInitNonceLength);
     cryptographicallyRandomValues(m_nonce.data(), m_nonce.size());
     auto initCommand = FidoHidMessage::create(m_channelId, FidoHidDeviceCommand::kInit, m_nonce);
@@ -187,6 +195,8 @@
     m_channelId |= static_cast<uint32_t>(payload[index++]) << 8;
     m_channelId |= static_cast<uint32_t>(payload[index]);
     // FIXME(191534): Check the reset of the payload.
+    // FIXME(192061)
+    LOG_ERROR("Start sending the request.");
     auto cmd = FidoHidMessage::create(m_channelId, FidoHidDeviceCommand::kCbor, m_requestData);
     ASSERT(cmd);
     m_worker->transact(WTFMove(*cmd), [weakThis = makeWeakPtr(*this)](std::optional<FidoHidMessage>&& response) mutable {
@@ -201,6 +211,8 @@
 {
     ASSERT(m_state == State::Ready);
     ASSERT(!message || message->channelId() == m_channelId);
+    // FIXME(192061)
+    LOG_ERROR("Start returning the response.");
     returnResponse(message ? message->getMessagePayload() : Vector<uint8_t>());
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to