def test_repeated_case_pass(self, attempt_number):
     """The end result of this test is a pass with current=3.5"""
     returned_results = [
         signals.TestPass('0Pass msg!', extras={'current': 3.5}),
         signals.TestFailure('Fail msg!', extras={'current': 100.0}),
         signals.TestPass('1Pass msg!', extras={'current': 3.2}),
         signals.TestPass('2Pass msg!', extras={'current': 3.6})
     ]
     raise returned_results[attempt_number - 1]
 def test_result_add_operator_success(self):
     record1 = records.TestResultRecord(self.tn)
     record1.test_begin()
     s = signals.TestPass(self.details, self.float_extra)
     record1.test_pass(s)
     tr1 = records.TestResult()
     tr1.add_record(record1)
     record2 = records.TestResultRecord(self.tn)
     record2.test_begin()
     s = signals.TestPass(self.details, self.json_extra)
     record2.test_pass(s)
     tr2 = records.TestResult()
     tr2.add_record(record2)
     tr2 += tr1
     self.assertTrue(tr2.passed, [tr1, tr2])
    def basic_scan_request(self, fd):
        """ Initiates a basic scan on a Fuchsia device
            Args:
                fd: A fuchsia device
        """
        start_time = datetime.now()

        scan_response = fd.wlan_lib.wlanStartScan()

        # first check if we received an error
        if scan_response.get("error") is None:
            # the scan command did not get an error response - go ahead
            # and check for scan results
            scan_results = scan_response["result"]
        else:
            # the response indicates an error - log and raise failure
            raise signals.TestFailure("Aborting test - scan failed with "
                                      "error: %s" % scan_response.get("error"))

        self.log.info("scan contained %d results", len(scan_results))

        total_time_ms = (datetime.now() - start_time).total_seconds() * 1000
        self.log.info("scan time: %d ms", total_time_ms)

        if len(scan_results) > 0:
            raise signals.TestPass(details="",
                                   extras={"Scan time": "%d" % total_time_ms})
        else:
            raise signals.TestFailure("Scan failed or did not "
                                      "find any networks")
Example #4
0
    def __call__(self, *args, **kwargs):
        """Called when the test is executed."""
        full_args = self.instance_args + list(args)

        try:
            if self.arg_modifier:
                full_args, kwargs = self.arg_modifier(self.inner, *full_args,
                                                      **kwargs)

            if self.before:
                self.before(self.inner, *full_args, **kwargs)

            result = 'UNKNOWN ERROR'
            try:
                result = self.inner(*full_args, **kwargs)
            finally:
                if self.after:
                    self.after(self.inner, result, *full_args, **kwargs)

            if result or result is None:
                new_signal = signals.TestPass('')
            else:
                new_signal = signals.TestFailure('')
        except signals.TestSignal as signal:
            new_signal = signal

        if self.signal_modifier:
            new_signal = self.signal_modifier(self.inner, new_signal,
                                              *full_args,
                                              **kwargs)

        raise new_signal
    def test_list_interfaces(self):
        """Test listing all interfaces.

        Steps:
        1. Call ListInterfaces FIDL api.
        2. Verify there is at least one interface returned.

        Expected Result:
        There were no errors in retrieving the list of interfaces.
        There was at least one interface in the list.

        Returns:
          signals.TestPass if no errors
          signals.TestFailure if there are any errors during the test.

        TAGS: Netstack
        Priority: 1
        """
        interfaces = self.dut.netstack_lib.netstackListInterfaces()
        if interfaces.get('error') is not None:
            raise signals.TestFailure("Failed with {}".format(
                interfaces.get('error')))
        if len(interfaces.get('result')) < 1:
            raise signals.TestFailure("No interfaces found.")
        self.log.info("Interfaces found: {}".format(interfaces.get('result')))
        raise signals.TestPass("Success")
Example #6
0
    def test_stress_pno_connection_to_2g(self):
        """Test PNO triggered autoconnect to a network for N times

        Steps:
        1. Save 2Ghz valid network configuration in the device.
        2. Screen off DUT
        3. Attenuate 5Ghz network and wait for a few seconds to trigger PNO.
        4. Check the device connected to 2Ghz network automatically.
        5. Repeat step 3-4
        """
        for attenuator in self.attenuators:
            attenuator.set_atten(95)
        # add a saved network to DUT
        networks = [self.reference_networks[0]['2g']]
        self.add_networks(self.dut, networks)
        self.dut.droid.wakeLockRelease()
        self.dut.droid.goToSleepNow()
        for count in range(self.stress_count):
            self.connect_and_verify_connected_ssid(
                self.reference_networks[0]['2g'], is_pno=True)
            wutils.wifi_forget_network(self.dut,
                                       networks[0][WifiEnums.SSID_KEY])
            # move the DUT out of range
            self.attenuators[0].set_atten(95)
            time.sleep(10)
            self.add_networks(self.dut, networks)
        wutils.set_attns(self.attenuators, "default")
        raise signals.TestPass(details="",
                               extras={
                                   "Iterations": "%d" % self.stress_count,
                                   "Pass": "******" % (count + 1)
                               })
Example #7
0
 def test_stress_network_selector_2G_connection(self):
     """
         1. Add one saved 2G network to DUT.
         2. Move the DUT in range.
         3. Verify the DUT is connected to the network.
         4. Move the DUT out of range
         5. Repeat step 2-4
     """
     for attenuator in self.attenuators:
         attenuator.set_atten(95)
     # add a saved network to DUT
     networks = [self.reference_networks[0]['2g']]
     self.add_networks(self.dut, networks)
     for count in range(self.stress_count):
         self.connect_and_verify_connected_ssid(
             self.reference_networks[0]['2g'])
         # move the DUT out of range
         self.attenuators[0].set_atten(95)
         time.sleep(10)
     wutils.set_attns(self.attenuators, "default")
     raise signals.TestPass(details="",
                            extras={
                                "Iterations": "%d" % self.stress_count,
                                "Pass": "******" % (count + 1)
                            })
Example #8
0
 def test_stress_wifi_roaming(self):
     AP1_network = self.reference_networks[0]["5g"]
     AP2_network = self.reference_networks[1]["5g"]
     wutils.set_attns(self.attenuators, "AP1_on_AP2_off")
     self.scan_and_connect_by_ssid(self.dut, AP1_network)
     # Reduce iteration to half because each iteration does two roams.
     for count in range(int(self.stress_count / 2)):
         self.log.info("Roaming iteration %d, from %s to %s", count,
                       AP1_network, AP2_network)
         try:
             wutils.trigger_roaming_and_validate(self.dut, self.attenuators,
                                                 "AP1_off_AP2_on",
                                                 AP2_network)
             self.log.info("Roaming iteration %d, from %s to %s", count,
                           AP2_network, AP1_network)
             wutils.trigger_roaming_and_validate(self.dut, self.attenuators,
                                                 "AP1_on_AP2_off",
                                                 AP1_network)
         except:
             raise signals.TestFailure("Roaming failed. Look at logs",
                                       extras={
                                           "Iterations":
                                           "%d" % self.stress_count,
                                           "Pass": "******" % (count * 2)
                                       })
     raise signals.TestPass(details="",
                            extras={
                                "Iterations": "%d" % self.stress_count,
                                "Pass": "******" % ((count + 1) * 2)
                            })
Example #9
0
    def __call__(self, *args, **kwargs):
        """
        When called runs the underlying func and then attaches test info
        to a signal.
        """
        try:
            result = self.func(*args, **kwargs)

            if result or result is None:
                new_signal = signals.TestPass('')
            else:
                new_signal = signals.TestFailure('')
        except signals.TestSignal as signal:
            new_signal = signal

        if not isinstance(new_signal.extras, dict) and new_signal.extras:
            raise ValueError('test_info can only append to signal data '
                             'that has a dict as the extra value.')
        elif not new_signal.extras:
            new_signal.extras = {}

        gathered_extras = self._gather_local_info(None, *args, **kwargs)
        for k, v in gathered_extras.items():
            if k not in new_signal.extras:
                new_signal.extras[k] = v
            else:
                if not isinstance(new_signal.extras[k], list):
                    new_signal.extras[k] = [new_signal.extras[k]]

                new_signal.extras[k].insert(0, v)

        raise new_signal
Example #10
0
 def test_stress_toggle_wifi_state_bluetooth_on(self):
     """Toggle WiFi state ON and OFF for N times when bluetooth ON."""
     enable_bluetooth(self.dut.droid, self.dut.ed)
     for count in range(self.stress_count):
         """Test toggling wifi"""
         try:
             self.log.debug("Going from on to off.")
             wutils.wifi_toggle_state(self.dut, False)
             self.log.debug("Going from off to on.")
             startTime = time.time()
             wutils.wifi_toggle_state(self.dut, True)
             startup_time = time.time() - startTime
             self.log.debug("WiFi was enabled on the device in %s s." %
                            startup_time)
         except:
             signals.TestFailure(details="",
                                 extras={
                                     "Iterations": "%d" % self.stress_count,
                                     "Pass": "******" % count
                                 })
     disable_bluetooth(self.dut.droid)
     raise signals.TestPass(details="",
                            extras={
                                "Iterations": "%d" % self.stress_count,
                                "Pass": "******" % (count + 1)
                            })
Example #11
0
        def test_wrapper(self):
            num_failures = 0
            num_seen_passes = 0
            test_signals_received = []
            for i in range(num_passes + acceptable_failures):
                try:
                    func(self, i + 1)
                except (signals.TestFailure, signals.TestError,
                        AssertionError) as signal:
                    test_signals_received.append(signal)
                    num_failures += 1
                except signals.TestPass as signal:
                    test_signals_received.append(signal)
                    num_seen_passes += 1
                except (signals.TestSignal, KeyboardInterrupt):
                    raise
                except Exception as signal:
                    test_signals_received.append(signal)
                    num_failures += 1
                else:
                    num_seen_passes += 1
                    test_signals_received.append(
                        signals.TestPass(
                            'Test iteration %s of %s passed without details.' %
                            (i, func.__name__)))

                if num_failures > acceptable_failures:
                    break
                elif num_seen_passes == num_passes:
                    break
                else:
                    self.teardown_test()
                    self.setup_test()

            raise result_selector(test_signals_received)
    def test_verify_different_mac_addresses(self):
        """Verify that all connected Fuchsia devices have unique mac addresses.

        Steps:
        1. Get mac address from each device

        Expected Result:
        Verify duplicate mac addresses don't exist.

        Returns:
          signals.TestPass if no errors
          signals.TestFailure if there are any errors during the test.

        TAGS: BR/EDR, BT
        Priority: 1
        """
        mac_addr_list = []
        for device in self.fuchsia_devices:
            mac_addr_list.append(
                device.btc_lib.getActiveAdapterAddress().get("result"))
        if len(mac_addr_list) != len(set(mac_addr_list)):
            raise signals.TestFailure(
                "Found duplicate mac addresses {}.".format(mac_addr_list))
        raise signals.TestPass(
            "Success: All Bluetooth Mac address unique: {}".format(
                mac_addr_list))
Example #13
0
 def setup_database(self, database):
     setup_result = self.fuchsia_dut.gatts_lib.publishServer(database)
     if setup_result.get("error") is None:
         signals.TestPass(setup_result.get("result"))
     else:
         raise signals.TestFailure(
             self.err_message.format(setup_result.get("error")))
    def test_scan_with_peer_set_non_discoverable(self):
        """Test Bluetooth scan with peer set to non discoverable.

        Steps:
        1. Set peer device to a unique device name.
        2. Set peer device to be non-discoverable.
        3. Perform a BT Scan with primary dut with enough time to
        gather results.

        Expected Result:
        Verify there are no results that match the unique device
        name in step 1.

        Returns:
          signals.TestPass if no errors
          signals.TestFailure if there are any errors during the test.

        TAGS: BR/EDR, BT
        Priority: 1
        """
        local_name = generate_id_by_size(10)
        self.sec_dut.btc_lib.setName(local_name)
        self.sec_dut.btc_lib.setDiscoverable(False)

        self.pri_dut.btc_lib.requestDiscovery(True)
        time.sleep(self.scan_timeout_seconds)
        self.pri_dut.btc_lib.requestDiscovery(False)
        discovered_devices = self.pri_dut.btc_lib.getKnownRemoteDevices()
        for device in discovered_devices.get("result").values():
            discoverd_name = device.get("name")
            if discoverd_name is not None and discoverd_name is local_name:
                raise signals.TestFailure(
                    "Found peer unexpectedly: {}.".format(device))
        raise signals.TestPass("Successfully didn't find peer device.")
    def test_connect_reconnect_n_iterations_over_le(self):
        """Test GATT reconnection n times.

        Verify that the GATT client device can discover and connect to
        a perpheral n times. Default value is 1000.

        Steps:
        1. Setup Ble advertisement on peripheral with unique advertisement
            name.
        2. GATT client scans for peripheral advertisement.
        3. Upon find the advertisement, send a connection request to
            peripheral.

        Expected Result:
        Verify that there are no errors after each GATT connection.

        Returns:
          signals.TestPass if no errors
          signals.TestFailure if there are any errors during the test.

        TAGS: GATT
        Priority: 1
        """
        for i in range(self.default_iterations):
            self.log.info("Starting iteration {}".format(i + 1))
            self._orchestrate_single_connect_disconnect()
            self.log.info("Iteration {} successful".format(i + 1))
        raise signals.TestPass("Success")
    def test_toggle_wlan_interface(self):
        """Test toggling the wlan interface if it exists.

        Steps:
        1. Call ListInterfaces FIDL api.
        2. Find the wlan interface.
        3. Disable the interface.
        4. Verify interface attributes in a down state.
        5. Enable the interface.
        6. Verify interface attributes in an up state.

        Expected Result:
        WLAN interface was successfully brought down and up again.

        Returns:
          signals.TestPass if no errors
          signals.TestFailure if there are any errors during the test.

        TAGS: Netstack
        Priority: 1
        """
        interfaces = self.dut.netstack_lib.netstackListInterfaces()
        for item in interfaces.get('result'):
            # Find the WLAN interface
            if "wlan" in item.get('name'):
                identifier = item.get('id')
                # Disable the interface by ID.
                result = self.dut.netstack_lib.disableInterface(identifier)
                if result.get('error') is not None:
                    raise signals.TestFailure(
                        "Unable to disable wlan interface: {}".format(
                            result.get('error')))

                # Check the current state of the interface.
                interface_info_result = self.dut.netstack_lib.getInterfaceInfo(
                    identifier)
                interface_info = interface_info_result.get('result')

                if len(interface_info.get('ipv4_addresses')) > 0:
                    raise signals.TestFailure(
                        "No Ipv4 Address should be present: {}".format(
                            interface_info))

                # TODO (35981): Verify other values when interface down.

                # Re-enable the interface
                result = self.dut.netstack_lib.enableInterface(identifier)
                if result.get('error') is not None:
                    raise signals.TestFailure(
                        "Unable to enable wlan interface: {}".format(
                            result.get('error')))

                # TODO (35981): Verify other values when interface up.

                raise signals.TestPass("Success")

        raise signals.TestSkip("No WLAN interface found.")
 def test_repeated_case_with_failures(self, attempt_number):
     """The end result of this test is the last failure to occur."""
     returned_results = [
         signals.TestPass('Pass msg!', extras={'current': 3.5}),
         signals.TestFailure('Fail msg!', extras={'current': 100.0}),
         signals.TestFailure('Fail msg!', extras={'current': 58.1}),
         signals.TestFailure('Fail msg!', extras={'current': 74.2}),
     ]
     raise returned_results[(attempt_number - 1) % 4]
Example #18
0
 def test_result_add_operator_success(self):
     record1 = records.TestResultRecord(self.tn)
     record1.test_begin()
     s = signals.TestPass(self.details, self.float_extra)
     record1.test_pass(s)
     tr1 = records.TestResult()
     tr1.add_record(record1)
     tr1.add_controller_info("MockDevice", ["magicA", "magicB"])
     record2 = records.TestResultRecord(self.tn)
     record2.test_begin()
     s = signals.TestPass(self.details, self.json_extra)
     record2.test_pass(s)
     tr2 = records.TestResult()
     tr2.add_record(record2)
     tr2.add_controller_info("MockDevice", ["magicC"])
     tr2 += tr1
     self.assertTrue(tr2.passed, [tr1, tr2])
     self.assertTrue(tr2.controller_info, {"MockDevice": ["magicC"]})
 def test_result_record_pass_with_json_extra(self):
     record = records.TestResultRecord(self.tn)
     record.test_begin()
     s = signals.TestPass(self.details, self.json_extra)
     record.test_pass(s)
     self.verify_record(record=record,
                        result=records.TestResultEnums.TEST_RESULT_PASS,
                        details=self.details,
                        extras=self.json_extra)
Example #20
0
 def test_result_add_operator_type_mismatch(self):
     record1 = records.TestResultRecord(self.tn)
     record1.test_begin()
     s = signals.TestPass(self.details, self.float_extra)
     record1.test_pass(s)
     tr1 = records.TestResult()
     tr1.add_record(record1)
     expected_msg = "Operand .* of type .* is not a TestResult."
     with self.assertRaisesRegexp(TypeError, expected_msg):
         tr1 += "haha"
Example #21
0
 def test_result_add_operator_success(self):
     record1 = records.TestResultRecord(self.tn)
     record1.test_begin()
     s = signals.TestPass(self.details, self.float_extra)
     record1.test_pass(s)
     tr1 = records.TestResult()
     tr1.add_record(record1)
     device1 = ControllerInfoRecord('TestClass', 'MockDevice', 'device1')
     tr1.add_controller_info_record(device1)
     record2 = records.TestResultRecord(self.tn)
     record2.test_begin()
     s = signals.TestPass(self.details, self.json_extra)
     record2.test_pass(s)
     tr2 = records.TestResult()
     tr2.add_record(record2)
     device2 = ControllerInfoRecord('TestClass', 'MockDevice', 'device2')
     tr2.add_controller_info_record(device2)
     tr2 += tr1
     self.assertTrue(tr2.passed, [tr1, tr2])
     self.assertTrue(tr2.controller_info, [device1, device2])
Example #22
0
    def test_stress_wifi_failover(self):
        """This test does aggressive failover to several networks in list.

           Steps:
               1. Add and enable few networks.
               2. Let device auto-connect.
               3. Remove the connected network.
               4. Repeat 2-3.
               5. Device should connect to a network until all networks are
                  exhausted.

        """
        for count in range(int(self.stress_count / 4)):
            wutils.reset_wifi(self.dut)
            ssids = list()
            for network in self.networks:
                ssids.append(network[WifiEnums.SSID_KEY])
                ret = self.dut.droid.wifiAddNetwork(network)
                asserts.assert_true(ret != -1,
                                    "Add network %r failed" % network)
                self.dut.droid.wifiEnableNetwork(ret, 0)
            self.dut.droid.wifiStartScan()
            time.sleep(WAIT_FOR_AUTO_CONNECT)
            cur_network = self.dut.droid.wifiGetConnectionInfo()
            cur_ssid = cur_network[WifiEnums.SSID_KEY]
            self.log.info("Cur_ssid = %s" % cur_ssid)
            for i in range(0, len(self.networks)):
                self.log.debug("Forget network %s" % cur_ssid)
                wutils.wifi_forget_network(self.dut, cur_ssid)
                time.sleep(WAIT_FOR_AUTO_CONNECT)
                cur_network = self.dut.droid.wifiGetConnectionInfo()
                cur_ssid = cur_network[WifiEnums.SSID_KEY]
                self.log.info("Cur_ssid = %s" % cur_ssid)
                if i == len(self.networks) - 1:
                    break
                if cur_ssid not in ssids:
                    raise signals.TestFailure("Device did not failover to the "
                                              "expected network. SSID = %s" %
                                              cur_ssid)
            network_config = self.dut.droid.wifiGetConfiguredNetworks()
            self.log.info("Network Config = %s" % network_config)
            if len(network_config):
                raise signals.TestFailure(
                    "All the network configurations were not "
                    "removed. Configured networks = %s" % network_config,
                    extras={
                        "Iterations": "%d" % self.stress_count,
                        "Pass": "******" % (count * 4)
                    })
        raise signals.TestPass(details="",
                               extras={
                                   "Iterations": "%d" % self.stress_count,
                                   "Pass": "******" % ((count + 1) * 4)
                               })
 def test_result_fail_class_with_test_signal(self):
     record1 = records.TestResultRecord(self.tn)
     record1.test_begin()
     s = signals.TestPass(self.details, self.float_extra)
     record1.test_pass(s)
     tr = records.TestResult()
     tr.add_record(record1)
     s = signals.TestFailure(self.details, self.float_extra)
     record2 = records.TestResultRecord("SomeTest", s)
     tr.fail_class(record2)
     self.assertEqual(len(tr.passed), 1)
     self.assertEqual(len(tr.failed), 1)
     self.assertEqual(len(tr.executed), 2)
Example #24
0
 def test_stress_softap_2G_wifi_connection_5G_DFS(self):
     """Tests enable SoftAp on 2G then connection/disconnection to 5G DFS network for N times.
     """
     self.configure_ap(channel_5g=WIFI_NETWORK_AP_CHANNEL_5G_DFS)
     softap_config = self.start_softap_and_verify(WIFI_CONFIG_APBAND_2G,
                                                  check_connectivity=False)
     for count in range(self.stress_count):
         self.log.info("Iteration %d", count + 1)
         self.verify_wifi_full_on_off(self.wpapsk_5g, softap_config)
     raise signals.TestPass(details="",
                            extras={
                                "Iterations": "%d" % self.stress_count,
                                "Pass": "******" % (count + 1)
                            })
Example #25
0
 def test_stress_wifi_connection_5G_DFS_softap_2G(self):
     """Tests connection to 5G DFS network followed by bringing up SoftAp on 2G.
     """
     self.configure_ap(channel_5g=WIFI_NETWORK_AP_CHANNEL_5G_DFS)
     wutils.wifi_toggle_state(self.dut, True)
     self.connect_to_wifi_network_and_verify((self.wpapsk_5g, self.dut))
     for count in range(self.stress_count):
         self.verify_softap_full_on_off(self.wpapsk_5g,
                                        WIFI_CONFIG_APBAND_2G)
     raise signals.TestPass(details="",
                            extras={
                                "Iterations": "%d" % self.stress_count,
                                "Pass": "******" % (count + 1)
                            })
Example #26
0
 def test_is_all_pass(self):
     s = signals.TestPass(self.details, self.float_extra)
     record1 = records.TestResultRecord(self.tn)
     record1.test_begin()
     record1.test_pass(s)
     s = signals.TestSkip(self.details, self.float_extra)
     record2 = records.TestResultRecord(self.tn)
     record2.test_begin()
     record2.test_skip(s)
     tr = records.TestResult()
     tr.add_record(record1)
     tr.add_record(record2)
     tr.add_record(record1)
     self.assertEqual(len(tr.passed), 2)
     self.assertTrue(tr.is_all_pass)
Example #27
0
 def test_stress_wifi_connection_2G_softap_2G(self):
     """Tests connection to 2G network the enable/disable SoftAp on 2G N times.
     """
     self.configure_ap(channel_2g=WIFI_NETWORK_AP_CHANNEL_2G)
     wutils.wifi_toggle_state(self.dut, True)
     self.connect_to_wifi_network_and_verify((self.wpapsk_2g, self.dut))
     for count in range(self.stress_count):
         self.log.info("Iteration %d", count + 1)
         self.verify_softap_full_on_off(self.wpapsk_2g,
                                        WIFI_CONFIG_APBAND_2G)
     raise signals.TestPass(details="",
                            extras={
                                "Iterations": "%d" % self.stress_count,
                                "Pass": "******" % (count + 1)
                            })
Example #28
0
def explicit_pass(msg, extras=None):
    """Explicitly pass a test case.

    A test with not uncaught exception will pass implicitly so the usage of
    this is optional. It is intended for reporting extra information when a
    test passes.

    Args:
        msg: A string explaining the details of the passed test.
        extras: An optional field for extra information to be included in
                test result.

    Raises:
        signals.TestPass is raised to mark a test case as passed.
    """
    raise signals.TestPass(msg, extras)
Example #29
0
 def test_stress_softap_5G_wifi_connection_2G_with_location_scan_on(self):
     """Tests enable SoftAp on 5G then connection/disconnection to 2G network for N times
     with location scans turned on.
     """
     self.configure_ap(channel_2g=WIFI_NETWORK_AP_CHANNEL_2G)
     self.turn_location_on_and_scan_toggle_on()
     softap_config = self.start_softap_and_verify(WIFI_CONFIG_APBAND_5G,
                                                  check_connectivity=False)
     for count in range(self.stress_count):
         self.log.info("Iteration %d", count + 1)
         self.verify_wifi_full_on_off(self.wpapsk_2g, softap_config)
     raise signals.TestPass(details="",
                            extras={
                                "Iterations": "%d" % self.stress_count,
                                "Pass": "******" % (count + 1)
                            })
    def test_wlan_stopped_client_status(self):
        """Queries WLAN status on DUTs with no WLAN ifaces.

        Tests that DUTs without WLAN interfaces have empty results and return
        an error when queried for status.
        """
        for fd in self.fuchsia_devices:
            fd.wlan_policy_lib.wlanStopClientConnections()

            status = fd.wlan_lib.wlanStatus()
            self.log.debug(status)
            if not status["error"] or status["result"]:
                raise signals.TestFailure(
                    "DUT's WLAN client status should be empty")

        raise signals.TestPass("Success")