net: l2: ieee802154: decrease time for testcase

When trying to implement a testcase for the previous commit, an error
occoured, that stopped the test from executing.

As the tests require a full IPv6 stack, the usual router solicitation
(RS) messages will be scheduled by the net stack. To avoid conflict
with RS messages the active scan test must be kept shorter than one
second, otherwise a race condition with additional packages being
reported by the fake driver might occur.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
This commit is contained in:
Fabian Pflug 2024-07-24 17:42:51 +02:00 committed by Carles Cufí
commit 240223971f

View file

@ -134,8 +134,10 @@ static void test_scan_shell_cmd(void)
/* The beacon placed into the RX queue will be received and handled as
* soon as this command yields waiting for beacons.
* Scan should be as short as possible, because after 1 second an IPv6
* Router Solicitation package will be placed into the TX queue
*/
ret = shell_execute_cmd(NULL, "ieee802154 scan active 11 500");
ret = shell_execute_cmd(NULL, "ieee802154 scan active 11 10");
zassert_equal(0, ret, "Active scan failed: %d", ret);
zassert_equal(0, k_sem_take(&scan_lock, K_NO_WAIT), "Active scan: did not receive beacon.");