From: Jouni Malinen Date: Mon, 1 Dec 2025 21:35:48 +0000 (+0200) Subject: tests: eapol_test functionality X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=654a4e8a133adceaec57e650730853ef44b19215;p=thirdparty%2Fhostap.git tests: eapol_test functionality Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/build.sh b/tests/hwsim/build.sh index cb4700166..1d1493ad0 100755 --- a/tests/hwsim/build.sh +++ b/tests/hwsim/build.sh @@ -80,4 +80,4 @@ fi if [ -z $FIPSLD_CC ]; then export FIPSLD_CC=gcc fi -make QUIET=1 -j$JOBS +make QUIET=1 -j$JOBS wpa_supplicant wpa_cli eapol_test diff --git a/tests/hwsim/test_radius.py b/tests/hwsim/test_radius.py index 335b269c6..de88b0b18 100644 --- a/tests/hwsim/test_radius.py +++ b/tests/hwsim/test_radius.py @@ -1882,3 +1882,22 @@ def test_radius_tls_freeradius(dev, apdev, test_params): pid = int(f.read()) if pid > 0: os.kill(pid, signal.SIGTERM) + +def test_radius_eapol_test(dev, apdev, test_params): + """RADIUS testing with eapol_test""" + et_path = "../../wpa_supplicant/eapol_test" + if not os.path.exists(et_path): + raise HwsimSkip("eapol_test not available") + + config = test_params['prefix'] + ".eapol_test.conf" + with open(config, "w") as f: + f.write("network={\n") + f.write("eap=PWD\n") + f.write('identity="pwd user"\n') + f.write('password="secret password"\n') + f.write("}\n") + + res = subprocess.check_output([et_path, '-c', config]) + logger.debug("eapol_test: " + res.decode().strip()) + if "SUCCESS" not in res.decode().splitlines(): + raise Exception("eapol_test did not report success")