]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix authsrv_errors_1 and authsrv_errors_3 when running on host
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 7 Mar 2017 16:13:05 +0000 (18:13 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 7 Mar 2017 16:13:05 +0000 (18:13 +0200)
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 <jouni@qca.qualcomm.com>
tests/hwsim/test_authsrv.py

index 84ad4aa67fc6097d2cc16e61ccadf4134d6b7392..0439ff933a6634156a6667c6ab2270981cd1c662 100644 (file)
@@ -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")