From b623634262daf32c28567713f9f00b5d3b6dd2ba Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 10 Feb 2019 17:59:38 +0200 Subject: [PATCH] tests: Document some of the test tools This will hopefully make it easier for others to use these test tools. Signed-off-by: Jouni Malinen --- tests/README | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 tests/README diff --git a/tests/README b/tests/README new file mode 100644 index 000000000..68f6023d0 --- /dev/null +++ b/tests/README @@ -0,0 +1,109 @@ +hostap.git test tools +--------------------- + +The tests directory with its subdirectories contain number of tools used +for testing wpa_supplicant and hostapd implementations. + +hwsim directory contains the test setup for full system testing of +wpa_supplicant and hostapd with a simulated radio (mac80211_hwsim). See +hwsim/READM and hwsim/vm/README for more details. + + +Build testing +------------- + +wpa_supplicant and hostapd support number of build option +combinations. The test scripts in the build subdirectory can be used to +verify that various combinations do not break the builds. More +configuration examples can be added there +(build-{hostapd,wpa_supplicant}-*.config) to get them included in test +builds. + +# Example +cd build +./run-build-tests.h + + +Fuzz testing +------------ + +Number of the test tools here can be used for fuzz testing with tools +like American fuzzy lop (afl-fuzz) that are designed to modify an +external file for program input. ap-mgmt-fuzzer, eapol-fuzzer, +test-eapol, test-json, test-tls, and test-x509 are examples of such +tools that expose hostap.git module functionality with input from a file +specified on the command line. + +Here are some examples of how fuzzing can be performed: + +##### JSON parser +make clean +CC=afl-gcc make test-json +mkdir json-examples +cat > json-examples/1.json <