Loading system/gd/l2cap/classic/cert/simple_l2cap_test.py +13 −1 Original line number Diff line number Diff line Loading @@ -287,10 +287,14 @@ class SimpleL2capTest(GdBaseTestClass): self._setup_link() scid = 0x0101 psm = 1 self._open_channel(scid=0x0101, psm=0x1) self.device_under_test.l2cap.SetDynamicChannel(l2cap_facade_pb2.SetEnableDynamicChannelRequest(psm=psm)) # Don't send configuration request def handle_connection_response(log): log = log.connection_response self.scid_dcid_map[log.scid] = log.dcid self.event_handler.on(is_connection_response, handle_connection_response) # Don't send configuration response back self.event_handler.on(is_configuration_request, lambda _: True) self.cert_device.l2cap.SendConnectionRequest(l2cap_cert_pb2.ConnectionRequest(scid=scid, psm=psm)) Loading @@ -301,9 +305,17 @@ class SimpleL2capTest(GdBaseTestClass): # DUT should not send configuration response due to timeout assert False self.event_handler.on(is_configuration_response, handle_configuration_response) disconnect_request_received = [] def handle_disconnection_request(log): log = log.disconnection_request disconnect_request_received.append((log.scid, log.dcid)) self.event_handler.on(is_disconnection_request, handle_disconnection_request) logs = self.cert_device.l2cap.FetchL2capLog(l2cap_cert_pb2.FetchL2capLogRequest()) self.event_handler.execute(logs) # Note: DUT may not support sending disconnect request so this should be optional assert (self.scid_dcid_map[scid], scid) in disconnect_request_received def test_basic_operation_request_connection(self): """ L2CAP/COS/CED/BV-01-C [Request Connection] Loading system/gd/l2cap/classic/internal/signalling_manager.cc +2 −1 Original line number Diff line number Diff line Loading @@ -650,7 +650,8 @@ void ClassicSignallingManager::on_command_timeout() { break; } case CommandCode::CONFIGURATION_REQUEST: { SendDisconnectionRequest(command_just_sent_.source_cid_, command_just_sent_.destination_cid_); auto channel = channel_allocator_->FindChannelByRemoteCid(command_just_sent_.destination_cid_); SendDisconnectionRequest(channel->GetCid(), channel->GetRemoteCid()); break; } default: Loading Loading
system/gd/l2cap/classic/cert/simple_l2cap_test.py +13 −1 Original line number Diff line number Diff line Loading @@ -287,10 +287,14 @@ class SimpleL2capTest(GdBaseTestClass): self._setup_link() scid = 0x0101 psm = 1 self._open_channel(scid=0x0101, psm=0x1) self.device_under_test.l2cap.SetDynamicChannel(l2cap_facade_pb2.SetEnableDynamicChannelRequest(psm=psm)) # Don't send configuration request def handle_connection_response(log): log = log.connection_response self.scid_dcid_map[log.scid] = log.dcid self.event_handler.on(is_connection_response, handle_connection_response) # Don't send configuration response back self.event_handler.on(is_configuration_request, lambda _: True) self.cert_device.l2cap.SendConnectionRequest(l2cap_cert_pb2.ConnectionRequest(scid=scid, psm=psm)) Loading @@ -301,9 +305,17 @@ class SimpleL2capTest(GdBaseTestClass): # DUT should not send configuration response due to timeout assert False self.event_handler.on(is_configuration_response, handle_configuration_response) disconnect_request_received = [] def handle_disconnection_request(log): log = log.disconnection_request disconnect_request_received.append((log.scid, log.dcid)) self.event_handler.on(is_disconnection_request, handle_disconnection_request) logs = self.cert_device.l2cap.FetchL2capLog(l2cap_cert_pb2.FetchL2capLogRequest()) self.event_handler.execute(logs) # Note: DUT may not support sending disconnect request so this should be optional assert (self.scid_dcid_map[scid], scid) in disconnect_request_received def test_basic_operation_request_connection(self): """ L2CAP/COS/CED/BV-01-C [Request Connection] Loading
system/gd/l2cap/classic/internal/signalling_manager.cc +2 −1 Original line number Diff line number Diff line Loading @@ -650,7 +650,8 @@ void ClassicSignallingManager::on_command_timeout() { break; } case CommandCode::CONFIGURATION_REQUEST: { SendDisconnectionRequest(command_just_sent_.source_cid_, command_just_sent_.destination_cid_); auto channel = channel_allocator_->FindChannelByRemoteCid(command_just_sent_.destination_cid_); SendDisconnectionRequest(channel->GetCid(), channel->GetRemoteCid()); break; } default: Loading