src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/timeout_test.cc
// Verify scan timeout is triggered.
Verify scan timeout is triggered.
Verify scan timeout is triggered .
TEST_F(TimeoutTest, ScanTimeout) {
  Init();
  simulation::FakeAp ap(env_.get(), kDefaultBssid, kDefaultSsid, kDefaultChannel);
  ap.EnableBeacon(kBeaconInterval);
  brcmf_simdev* sim = device_->GetSim();
  sim->sim_fw->err_inj_.AddErrInjIovar("escan", ZX_OK, client_ifc_.iface_id_);
  SCHEDULE_CALL(zx::msec(10), &SimInterface::StartScan, &client_ifc_, kDefaultScanTxnId, false);
  env_->Run(kTestDuration);
  auto result = client_ifc_.ScanResultCode(kDefaultScanTxnId);
  EXPECT_TRUE(result);
  EXPECT_EQ(*result, WLAN_SCAN_RESULT_INTERNAL_ERROR);
  auto bss_list = client_ifc_.ScanResultBssList(kDefaultScanTxnId);
  EXPECT_EQ(bss_list->size(), 0U);
}
TEST_F ( TimeoutTest , ScanTimeout ) { Init ( ) ; simulation :: FakeAp ap ( env_ . get ( ) , kDefaultBssid , kDefaultSsid , kDefaultChannel ) ; ap . EnableBeacon ( kBeaconInterval ) ; brcmf_simdev * sim = device_ -> GetSim ( ) ; sim -> sim_fw -> err_inj_ . AddErrInjIovar ( " " , ZX_OK , client_ifc_ . iface_id_ ) ; SCHEDULE_CALL ( zx :: msec ( 10 ) , & SimInterface :: StartScan , & client_ifc_ , kDefaultScanTxnId , false ) ; env_ -> Run ( kTestDuration ) ; auto result = client_ifc_ . ScanResultCode ( kDefaultScanTxnId ) ; EXPECT_TRUE ( result ) ; EXPECT_EQ ( * result , WLAN_SCAN_RESULT_INTERNAL_ERROR ) ; auto bss_list = client_ifc_ . ScanResultBssList ( kDefaultScanTxnId ) ; EXPECT_EQ ( bss_list -> size ( ) , 0U ) ; }
Verify scan timeout is triggered.
Verify scan timeout is triggered .
// Ignore scan request in sim-fw. // Start a passive scan // Verify scan completed // Verify result was an error code // No results should have been seen