From 732b57acb4c5655e2ee0b8260136acf14a15b11a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 7 Mar 2017 18:13:05 +0200 Subject: [PATCH] tests: Fix authsrv_errors_1 and authsrv_errors_3 when running on host Use a non-existing directory in the path to avoid SQLite from being able to create a new database file. The previous design worked in the VM case due to the host file system being read-only, but a bit more is needed for the case when this is running on the host. Signed-off-by: Jouni Malinen --- tests/hwsim/test_authsrv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_authsrv.py b/tests/hwsim/test_authsrv.py index 84ad4aa67..0439ff933 100644 --- a/tests/hwsim/test_authsrv.py +++ b/tests/hwsim/test_authsrv.py @@ -170,7 +170,7 @@ def test_authsrv_oom(dev, apdev): def test_authsrv_errors_1(dev, apdev): """Authentication server errors (1)""" params = authsrv_params() - params["eap_user_file"] = "sqlite:auth_serv/does-not-exist" + params["eap_user_file"] = "sqlite:auth_serv/does-not-exist/does-not-exist" authsrv = hostapd.add_ap(apdev[1], params, no_enable=True) if "FAIL" not in authsrv.request("ENABLE"): raise Exception("ENABLE succeeded with invalid SQLite EAP user file") @@ -186,7 +186,7 @@ def test_authsrv_errors_2(dev, apdev): def test_authsrv_errors_3(dev, apdev): """Authentication server errors (3)""" params = authsrv_params() - params["eap_sim_db"] = "unix:/tmp/hlr_auc_gw.sock db=auth_serv/does-not-exist" + params["eap_sim_db"] = "unix:/tmp/hlr_auc_gw.sock db=auth_serv/does-not-exist/does-not-exist" authsrv = hostapd.add_ap(apdev[1], params, no_enable=True) if "FAIL" not in authsrv.request("ENABLE"): raise Exception("ENABLE succeeded with invalid RADIUS client file")