From patchwork Thu May 11 18:48:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13238366 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F323120695 for ; Thu, 11 May 2023 18:48:23 +0000 (UTC) Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-6216a09ec38so3825986d6.3 for ; Thu, 11 May 2023 11:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683830903; x=1686422903; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rnhgRBE5xJVkIA66kNsmeXUPbGsBqmnfqD644fIaZT4=; b=RnFbVrSs151yA5uWEoG+Z2F+dQpTy24TbxMwZoanxakZgbsThlMuuaRzkJT60GlL74 XJtMkYNrg5UijonOkgEBhxWX4aWNEpSDFJmv4EB0uiwvccl1QrEtx5lkIvAFr/VRBQu3 m1M5Lo3BHwmynDRDPk6yiAli7wDO1N0iv/IW6Ct5X94zGrcTVlbw32MjvwO3YkpRp9hL fMyr5qdf+9nBFl5dZ4t7zYJZUH2sU76CdhMo4R6AaqsNo91+ZYfNm/CGSne0sv5lLzEj jNCs8cAzPxmcrtVTCvx+jvJdHN0oQ2CR3XGrodnF9T1rrtV2WIy7kdQOJ7jc/9RKWyCv EaEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683830903; x=1686422903; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rnhgRBE5xJVkIA66kNsmeXUPbGsBqmnfqD644fIaZT4=; b=T8DPiH4dA8z6F10JWYXxv0ntff36ZpVh9tCmeH6/Xwe0dAVpDvd8wexGFrqB1Hg5Vc bvjY41HIgZHl17ThvF7IGfX0BjgH1KigGBedUVpVnnh+J75WrljjFrNqRtVO77pizJ9J YEiTePMqcGc1PxOBKhZOx0P6M/7J8C+V4c36t/38nGdGrDn6XfMx6ZVKeC1V/sIXG/J1 VUpm55WRfIpeioakrkHqkz+u8c39FC7slzg8nZtV317v64auxM85pmMEVDzeWt5xCFUP m3FFMsXetlXKKFMkUtgJSxEr4BE8AjYquKDNKmO0OjavPxRv6QXZ0N0ELR8DkafcfzRf 8m9g== X-Gm-Message-State: AC+VfDxJAUGEq43RqOn8k19sZElNPsy7l6xnhOpJ4Ywqk/OBPO1IKuEj zg90PJpzPhiEjQu6MCuJWS/x1adoctQ= X-Google-Smtp-Source: ACHHUZ4JTi9lIz4k63wUZAdIJwOBK8oX91CkL05W+7LQhRcNrs/qYodoqjS9W7quhO6L2GXVDLa8LQ== X-Received: by 2002:a05:6214:401c:b0:5f1:5ed3:dd82 with SMTP id kd28-20020a056214401c00b005f15ed3dd82mr30226480qvb.48.1683830902582; Thu, 11 May 2023 11:48:22 -0700 (PDT) Received: from LOCLAP699.rst-01.locus (50-78-19-50-static.hfc.comcastbusiness.net. [50.78.19.50]) by smtp.gmail.com with ESMTPSA id s17-20020a0cdc11000000b005ef42af7eb7sm2447221qvk.25.2023.05.11.11.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 11:48:22 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH 1/3] wiphy: make wiphy work queue reentrant Date: Thu, 11 May 2023 11:48:15 -0700 Message-Id: <20230511184817.79203-1-prestwoj@gmail.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In some situations its convenient for the same work item to be inserted (rescheduled) while its in progress. FT for example does this now if a roam fails. The same ft_work item gets re-inserted which, currently, is not safe to do since the item is modified and removed once completed. Currently FT reschedules the same work item in the 'do_work' callback but this patch actually allows for rescheduling as long as the item is currently running, even if do_work has returned and waiting for wiphy_radio_work_done. A few new flags were added to the radio work item. One which is set when the item is running which prevents other items from being inserted ahead (previously done with priority=INT_MIN). This is needed since we cannot modify the priority anymore in case the item is being rescheduled. The another flag is set when the item was rescheduled. Once the item is finished the 'rescheduled' flag is checked and the item will be removed and re-inserted into the queue if needed. --- src/wiphy.c | 69 ++++++++++++++++++++++++++++++++++++++++++----------- src/wiphy.h | 2 ++ 2 files changed, 57 insertions(+), 14 deletions(-) diff --git a/src/wiphy.c b/src/wiphy.c index 2db2d2cd..e6ca3b76 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -2570,6 +2570,17 @@ static void wiphy_reg_notify(struct l_genl_msg *msg, void *user_data) wiphy_dump_after_regdom(wiphy); } +static int insert_by_priority(const void *a, const void *b, void *user_data) +{ + const struct wiphy_radio_work_item *new = a; + const struct wiphy_radio_work_item *work = b; + + if (work->running || work->priority <= new->priority) + return 1; + + return -1; +} + static void wiphy_radio_work_next(struct wiphy *wiphy) { struct wiphy_radio_work_item *work; @@ -2583,7 +2594,7 @@ static void wiphy_radio_work_next(struct wiphy *wiphy) * Ensures no other work item will get inserted before this one while * the work is being done. */ - work->priority = INT_MIN; + work->running = true; l_debug("Starting work item %u", work->id); @@ -2592,7 +2603,12 @@ static void wiphy_radio_work_next(struct wiphy *wiphy) wiphy->work_in_callback = false; if (done) { - work->id = 0; + bool rescheduled = work->rescheduled; + + work->running = false; + + if (!rescheduled) + work->id = 0; l_queue_remove(wiphy->work, work); @@ -2600,26 +2616,49 @@ static void wiphy_radio_work_next(struct wiphy *wiphy) destroy_work(work); wiphy->work_in_callback = false; + /* + * If the item was rescheduled inside do_work() we can safely + * insert it here, otherwise destroy_work() could have freed it. + * The item could have been re-inserted inside destroy_work() + * but this is safe since the item was removed from the queue. + */ + if (rescheduled) { + work->rescheduled = false; + l_queue_insert(wiphy->work, work, + insert_by_priority, NULL); + } + wiphy_radio_work_next(wiphy); } } -static int insert_by_priority(const void *a, const void *b, void *user_data) -{ - const struct wiphy_radio_work_item *new = a; - const struct wiphy_radio_work_item *work = b; - - if (work->priority <= new->priority) - return 1; - - return -1; -} - uint32_t wiphy_radio_work_insert(struct wiphy *wiphy, struct wiphy_radio_work_item *item, int priority, const struct wiphy_radio_work_item_ops *ops) { + /* + * Handling the case of re-inserting the same work item that is in + * progress. A non-started work item should never be re-inserted + * into the queue. Keep the same ID, priority, and ops. If these somehow + * are different the caller should really be using a separate work item. + * Once the item is finished it will be removed and re-inserted based + * on the rescheduled flag. + */ + if (item == l_queue_peek_head(wiphy->work)) { + /* + * Shouldn't cause problems, but at least warn the caller they + * should really be using a separate item + */ + L_WARN_ON(item->rescheduled || item->priority != priority || + ops != item->ops); + + item->rescheduled = true; + l_debug("Rescheduled work item %u", item->id); + + return item->id; + } + item->priority = priority; item->ops = ops; item->id = ++work_ids; @@ -2656,6 +2695,7 @@ void wiphy_radio_work_done(struct wiphy *wiphy, uint32_t id) if (item->id == id) { next = true; l_queue_pop_head(wiphy->work); + item->running = false; } else item = l_queue_remove_if(wiphy->work, match_id, L_UINT_TO_PTR(id)); @@ -2664,7 +2704,8 @@ void wiphy_radio_work_done(struct wiphy *wiphy, uint32_t id) l_debug("Work item %u done", id); - item->id = 0; + if (!item->rescheduled) + item->id = 0; wiphy->work_in_callback = true; destroy_work(item); diff --git a/src/wiphy.h b/src/wiphy.h index d5d1cc8f..b6861f5f 100644 --- a/src/wiphy.h +++ b/src/wiphy.h @@ -45,6 +45,8 @@ struct wiphy_radio_work_item { uint32_t id; int priority; const struct wiphy_radio_work_item_ops *ops; + bool rescheduled : 1; + bool running : 1; }; enum { From patchwork Thu May 11 18:48:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13238367 Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4319E443A for ; Thu, 11 May 2023 18:48:25 +0000 (UTC) Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-61b58779b93so81083916d6.0 for ; Thu, 11 May 2023 11:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683830904; x=1686422904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EGMoETNnnbroy2zJIG1yKhkGGrMlA93HBJA2uMGJMGQ=; b=o42xVBDlWemcqNeS0NdvH/rc+D+vd+4R0Xf5pI9BrUWEnbRVL7aXgITqdnUPQHFMmT k39jh8M4eQlEMJfnaTW2ZTjcyk0vSpSEU/OgyZbHGIvldz1x4F8tylftqzSePV74orhu 7jjb8TYfV1eQq2R/pZRr1HAkJBz3GHsn5y6aktNhq3ufqua2bcg6iSaRC0XaPGsRkxHv XFa/GeODl/Z2bIbve/Z+opJqPEMnX1zjiCdI2cGeWU/BaR6b88BE6vameoyrQf3vRlpe KHxnpIZCgTtgzl2Gog53dJy4FkEHj3LAO4GhVh36IA0XrM0E2lhItd/SWeo5q14X1kxz A16A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683830904; x=1686422904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EGMoETNnnbroy2zJIG1yKhkGGrMlA93HBJA2uMGJMGQ=; b=K1Lxu/YFMnEhEBg1g5drGHpzahOLEka1it7r0wHg53sQKiyYMGZu073SzRaeYe3+6X 8ewOYpgEK9M01NYEpzyNf3Cp6g+yaxgJldHL3o5CAyosDNnwEWzez2sEBPYPPL57VzU/ Yvjiwg7d28bDvRp7wasryv5H8LvMedWFbCM9rC9r04f0U8OP7iVMgJa0DaWTlxk9g9jc Zu4h29wZb3opjgSvpuF0ESGGeuQLJjavZxjWDV4zkNIAcHmOIan/RmslZKQvBw1gjoMG IoEOVuTBNYrPhas4VjAMiLYmynfZnNBXr//M7EaCivp7QAjoLv0WbPIaMbSN7kkHRYk+ CRtQ== X-Gm-Message-State: AC+VfDyIOtsAAFb9XUcejxPfcd+G3gQ+qV/Gj5jOTk4dn00kGcn2T9ny 8MBpLDut/JlC6MjolgOlQTSzGXsDwKo= X-Google-Smtp-Source: ACHHUZ76HznjVgH8frUlPXfzHpkwXPqrUcXJ0wxaEqd0gT1G3I7B6y1Q0i/Q5BCH4AAGwFnTOV7eLQ== X-Received: by 2002:a05:6214:4113:b0:5ef:5894:f814 with SMTP id kc19-20020a056214411300b005ef5894f814mr30703415qvb.33.1683830903900; Thu, 11 May 2023 11:48:23 -0700 (PDT) Received: from LOCLAP699.rst-01.locus (50-78-19-50-static.hfc.comcastbusiness.net. [50.78.19.50]) by smtp.gmail.com with ESMTPSA id s17-20020a0cdc11000000b005ef42af7eb7sm2447221qvk.25.2023.05.11.11.48.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 11:48:23 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH 2/3] auto-t: modify PSK-roam test to use FT failure path Date: Thu, 11 May 2023 11:48:16 -0700 Message-Id: <20230511184817.79203-2-prestwoj@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230511184817.79203-1-prestwoj@gmail.com> References: <20230511184817.79203-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This adds another radio so IWD hits the FT failure path after authentication to the first BSS fails. This causes a wiphy work item to be rescheduled which previously was unsafe. --- autotests/testPSK-roam/connection_test.py | 13 +++++--- autotests/testPSK-roam/failed_roam_test.py | 33 ++++++++++++------- autotests/testPSK-roam/hw.conf | 3 +- .../testPSK-roam/roam_ap_disconnect_test.py | 4 ++- 4 files changed, 35 insertions(+), 18 deletions(-) diff --git a/autotests/testPSK-roam/connection_test.py b/autotests/testPSK-roam/connection_test.py index 7a135e95..459c25cf 100644 --- a/autotests/testPSK-roam/connection_test.py +++ b/autotests/testPSK-roam/connection_test.py @@ -48,7 +48,7 @@ class Test(unittest.TestCase): self.rule2.enabled = True # Send 100 packets (to be dropped), should trigger beacon loss testutil.tx_packets(device.name, self.bss_hostapd[0].ifname, 100) - device.wait_for_event('packet-loss-roam', timeout=30) + device.wait_for_event('packet-loss-roam', timeout=60) else: device.roam(self.bss_hostapd[1].bssid) @@ -173,19 +173,22 @@ class Test(unittest.TestCase): IWD.copy_to_storage('TestFT.psk') cls.bss_hostapd = [ HostapdCLI(config='ft-psk-ccmp-1.conf'), - HostapdCLI(config='ft-psk-ccmp-2.conf') ] + HostapdCLI(config='ft-psk-ccmp-2.conf'), + HostapdCLI(config='ft-psk-ccmp-3.conf') ] + cls.bss_hostapd[2].disable() + rad0 = hwsim.get_radio('rad0') - rad2 = hwsim.get_radio('rad2') + rad3 = hwsim.get_radio('rad3') cls.rule0 = hwsim.rules.create() - cls.rule0.source = rad2.addresses[0] + cls.rule0.source = rad3.addresses[0] cls.rule0.bidirectional = True cls.rule0.signal = -2000 cls.rule0.prefix = 'b0' cls.rule0.drop = True cls.rule1 = hwsim.rules.create() - cls.rule1.source = rad2.addresses[0] + cls.rule1.source = rad3.addresses[0] cls.rule1.prefix = '08' cls.rule1.drop = True diff --git a/autotests/testPSK-roam/failed_roam_test.py b/autotests/testPSK-roam/failed_roam_test.py index 360c1de5..eda2b4e2 100644 --- a/autotests/testPSK-roam/failed_roam_test.py +++ b/autotests/testPSK-roam/failed_roam_test.py @@ -62,21 +62,17 @@ class Test(unittest.TestCase): self.rule0.enabled = True - device.roam(self.bss_hostapd[1].bssid) - - # Roam should fail... - device.wait_for_event('ft-roam-failed') + # IWD should connect, then attempt a roam to BSS 1, which should fail... + device.wait_for_event('ft-roam-failed', timeout=60) # ... but IWD should remain connected self.assertTrue(device.state == DeviceState.connected) self.rule0.enabled = False - # Try again once more - device.roam(self.bss_hostapd[1].bssid) - - self.verify_roam(wd, device, self.bss_hostapd[0], self.bss_hostapd[1]) + # IWD should then try BSS 2, and succeed + self.verify_roam(wd, device, self.bss_hostapd[0], self.bss_hostapd[2]) - self.bss_hostapd[1].deauthenticate(device.address) + self.bss_hostapd[2].deauthenticate(device.address) condition = 'obj.state == DeviceState.disconnected' wd.wait_for_object_condition(device, condition) @@ -88,6 +84,7 @@ class Test(unittest.TestCase): self.rule0.enabled = False self.rule1.enabled = False + self.rule2.enabled = False @classmethod def setUpClass(cls): @@ -96,14 +93,16 @@ class Test(unittest.TestCase): IWD.copy_to_storage('TestFT.psk') cls.bss_hostapd = [ HostapdCLI(config='ft-psk-ccmp-1.conf'), - HostapdCLI(config='ft-psk-ccmp-2.conf') ] + HostapdCLI(config='ft-psk-ccmp-2.conf'), + HostapdCLI(config='ft-psk-ccmp-3.conf') ] cls.bss_hostapd[0].set_address('12:00:00:00:00:01') cls.bss_hostapd[1].set_address('12:00:00:00:00:02') + cls.bss_hostapd[2].set_address('12:00:00:00:00:03') # Drop Authenticate frames cls.rule0 = hwsim.rules.create() - cls.rule0.bidirectional = True + cls.rule0.source = hwsim.get_radio('rad1').addresses[0] cls.rule0.prefix = 'b0' cls.rule0.drop = True @@ -113,6 +112,18 @@ class Test(unittest.TestCase): cls.rule1.prefix = 'd0' cls.rule1.drop = True + # Causes IWD to immediately roam away from BSS 0 + cls.rule2 = hwsim.rules.create() + cls.rule2.source = hwsim.get_radio('rad0').addresses[0] + cls.rule2.signal = -8000 + cls.rule2.enabled = True + + # Causes IWD to first prefer BSS 1 to roam, then BSS 2. + cls.rule3 = hwsim.rules.create() + cls.rule3.source = hwsim.get_radio('rad2').addresses[0] + cls.rule3.signal = -7000 + cls.rule3.enabled = True + @classmethod def tearDownClass(cls): IWD.clear_storage() diff --git a/autotests/testPSK-roam/hw.conf b/autotests/testPSK-roam/hw.conf index c2b35d6e..da9e385c 100644 --- a/autotests/testPSK-roam/hw.conf +++ b/autotests/testPSK-roam/hw.conf @@ -1,8 +1,9 @@ [SETUP] -num_radios=3 +num_radios=4 start_iwd=0 hwsim_medium=yes [HOSTAPD] rad0=ft-psk-ccmp-1.conf rad1=ft-psk-ccmp-2.conf +rad2=ft-psk-ccmp-3.conf diff --git a/autotests/testPSK-roam/roam_ap_disconnect_test.py b/autotests/testPSK-roam/roam_ap_disconnect_test.py index 416541ce..130e1702 100644 --- a/autotests/testPSK-roam/roam_ap_disconnect_test.py +++ b/autotests/testPSK-roam/roam_ap_disconnect_test.py @@ -70,8 +70,10 @@ class Test(unittest.TestCase): IWD.copy_to_storage('TestFT.psk') cls.bss_hostapd = [ HostapdCLI(config='ft-psk-ccmp-1.conf'), - HostapdCLI(config='ft-psk-ccmp-2.conf') ] + HostapdCLI(config='ft-psk-ccmp-2.conf'), + HostapdCLI(config='ft-psk-ccmp-3.conf') ] cls.bss_hostapd[1].disable() + cls.bss_hostapd[2].disable() cls.bss_hostapd[0].set_value('ocv', '0') cls.bss_hostapd[0].set_value('ieee80211w', '0') From patchwork Thu May 11 18:48:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13238368 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 57F7020695 for ; Thu, 11 May 2023 18:48:26 +0000 (UTC) Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-757742c2e5fso470171885a.1 for ; Thu, 11 May 2023 11:48:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683830905; x=1686422905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bvyiYUqoqdRmkFTliyZi62r+N0b0AOgiyYrPEVc04rg=; b=AXAH/k3jqz5FJItuSYXazeCesIzZ5XpuhVfGWL6GfFx9DjjszYqZgWVS8N0flnuHEs KAdw6nmFcefzONvAbnR9SFv7riLcbEhTqYy64k33EbDSG+qQlIWjhB0lGI9aWv2uQBmU uIqzCjcX/54tr5mbTSYWZC+rn4GMio/QyWeu7hey6Q2SrKtObQpsrdWUmbeARR9wDD3M kFQ7iS9DhtwC/r5l/twiI3l2My8Rd3zSiMJ71fKwVcY9JU9+xK3HN4/uj0yPRf9RYngM GIhL9ubrVUF9PJnIbQRnNgA5/z3UXevkCDI3LZe/bF4NFPD0iEHJ9gJVMWYiIkHXoYLQ M/lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683830905; x=1686422905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bvyiYUqoqdRmkFTliyZi62r+N0b0AOgiyYrPEVc04rg=; b=lc8E/2KuIJymPpZjDF+TdPJJewfUsp16xrjT8M7iOxKVucPg8PZ4Oo9mPitBOXClqt lo12jz/gmMrpclbjLGjgwgwoDUWzx6T027kMTMLbH80+oUhExYnN/Ak2fwa2ifrl5sbP 2zPcfHjLVS0v5o9mkHptgVcJjKHAh3pURwDsCSTD3/gYq9L5XMXtwekdJXqxLGk8W/HT fOoIxvtppVyxmECzZ6urxTA5zX9DnSpqqgP7/MD5rKUN4zAwXeFMMZEWvZ58L2MT2MRo 3caFAyCdhF8FojAX2vEdpE9DXkhWNSGtGrgOffmSE5r7M+ZttIpS8wtBGAHc0TqHdXyB x8qg== X-Gm-Message-State: AC+VfDwgqMvjhLHACnjUguqRM2ZOwyMFVH+564VJgUWQ67MeySjOctqU BE5dpgUr5pTup40fGG6tkbP5da1CZao= X-Google-Smtp-Source: ACHHUZ6mhSnxh0CTXjynTv1hTWiyw5lv+i8KW24IhvXQsWe8RhuTrunpRXc9kLZpnpOE37xs1YicYw== X-Received: by 2002:ad4:5ae5:0:b0:621:1b1d:7dde with SMTP id c5-20020ad45ae5000000b006211b1d7ddemr31546616qvh.8.1683830905070; Thu, 11 May 2023 11:48:25 -0700 (PDT) Received: from LOCLAP699.rst-01.locus (50-78-19-50-static.hfc.comcastbusiness.net. [50.78.19.50]) by smtp.gmail.com with ESMTPSA id s17-20020a0cdc11000000b005ef42af7eb7sm2447221qvk.25.2023.05.11.11.48.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 11:48:24 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH 3/3] auto-t: increase timeout in testPSK-roam Date: Thu, 11 May 2023 11:48:17 -0700 Message-Id: <20230511184817.79203-3-prestwoj@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230511184817.79203-1-prestwoj@gmail.com> References: <20230511184817.79203-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This was causing random failures and increasing the timeout seems to be a lot more reliable. --- autotests/testPSK-roam/roam_ap_disconnect_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autotests/testPSK-roam/roam_ap_disconnect_test.py b/autotests/testPSK-roam/roam_ap_disconnect_test.py index 130e1702..b5775990 100644 --- a/autotests/testPSK-roam/roam_ap_disconnect_test.py +++ b/autotests/testPSK-roam/roam_ap_disconnect_test.py @@ -33,7 +33,7 @@ class Test(unittest.TestCase): # Since both BSS's have low signal, the roam should fail and trigger # another roam scan. device.wait_for_event('roam-scan-triggered', timeout=30) - device.wait_for_event('no-roam-candidates', timeout=30) + device.wait_for_event('no-roam-candidates', timeout=60) # Hostapd sends disconnect self.bss_hostapd[0].disable()