Message ID | 20200501210211.647-2-thomas@adapt-ip.com |
---|---|
State | Changes Requested |
Headers | show |
Series | fix varous tests | expand |
On Fri, May 01, 2020 at 02:02:06PM -0700, Thomas Pedersen wrote: > This test was failing because the 2nd mesh STA was being > configured with the correct passphrase by default. To fix, > avoid setting the default passphrase. Could you please share a debug log showing how this fails? I cannot see how that would happen and it does not fail in any of my tests.. > diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py > @@ -1302,7 +1302,7 @@ def test_wpas_mesh_password_mismatch_retry(dev, apdev): > dev[0].mesh_group_add(id) > > dev[1].request("SET sae_groups ") > - id = add_mesh_secure_net(dev[1]) > + id = add_mesh_secure_net(dev[1], psk=False) > dev[1].set_network_quoted(id, "psk", "wrong password") > dev[1].mesh_group_add(id) All that psk=False addition would do is remove a call to set the "psk" parameter to the value that is then going to be immediately overwritten with that wrong password before the original value is used anywhere. The psk value is used only once going through that mesh_group_add() call.
On 5/16/20 7:17 AM, Jouni Malinen wrote: > On Fri, May 01, 2020 at 02:02:06PM -0700, Thomas Pedersen wrote: >> This test was failing because the 2nd mesh STA was being >> configured with the correct passphrase by default. To fix, >> avoid setting the default passphrase. > > Could you please share a debug log showing how this fails? I cannot see > how that would happen and it does not fail in any of my tests.. > >> diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py >> @@ -1302,7 +1302,7 @@ def test_wpas_mesh_password_mismatch_retry(dev, apdev): >> dev[0].mesh_group_add(id) >> >> dev[1].request("SET sae_groups ") >> - id = add_mesh_secure_net(dev[1]) >> + id = add_mesh_secure_net(dev[1], psk=False) >> dev[1].set_network_quoted(id, "psk", "wrong password") >> dev[1].mesh_group_add(id) > > All that psk=False addition would do is remove a call to set the "psk" > parameter to the value that is then going to be immediately overwritten > with that wrong password before the original value is used anywhere. The > psk value is used only once going through that mesh_group_add() call. You're right, I must've misinterpreted the log then after the change the test passed because it wasn't even failing consistently in the first place. Sorry for the hallucination :)
diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index 3c918184f158..baea71501f0b 100644 --- a/tests/hwsim/test_wpas_mesh.py +++ b/tests/hwsim/test_wpas_mesh.py @@ -1302,7 +1302,7 @@ def test_wpas_mesh_password_mismatch_retry(dev, apdev): dev[0].mesh_group_add(id) dev[1].request("SET sae_groups ") - id = add_mesh_secure_net(dev[1]) + id = add_mesh_secure_net(dev[1], psk=False) dev[1].set_network_quoted(id, "psk", "wrong password") dev[1].mesh_group_add(id)
This test was failing because the 2nd mesh STA was being configured with the correct passphrase by default. To fix, avoid setting the default passphrase. Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com> --- tests/hwsim/test_wpas_mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)