Commit Graph

4180 Commits (vlan_per_psk)

Author SHA1 Message Date
Jouni Malinen 1b3926ef73 tests: Add a test case for HT40 co-ex scan
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen b47750beba tests: Add test cases for automatic channel selection
This extends the Hostapd class to support monitor interface events and
STATUS command similarly to the WpaSupplicant class so that internal
hostapd state can be verified in more detail.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 77990cd7a9 tests: Add test case for multi-BSS configuration file
Verify that a single configuration file can be used to initiate multiple
BSSes in hostapd and that these BSSes can then be dynamically removed.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen e114c49cfc tests: Add an EAP-TLS test case
This fixes the user.key file (incorrect key was copied previously) and
adds a test case for EAP-TLS with WPA2-Enterprise.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 22b99086ce tests: Add more EAP test cases
This increases EAP method coverage for WPA2-Enterprise to include
EAP-pwd, EAP-GPSK, EAP-SAKE, EAP-EKE, EAP-IKEv2, EAP-PAX, and EAP-PSK.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen b5476d940e tests: Add run-tests.py --no-reset
This can be used to request the previously used default behavior where
the devices are not stopped at the end of a test case if a single test
case is run.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 5230bf64e8 tests: hostapd behavior on dynamic addition of invalid config
Verify that hostapd handles ENABLE command on invalid configuration
correctly and allows the configuration to be fixed or the interface to
be removed.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 1640a2e424 tests: Add test cases for SAE
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen f5f59e4f57 tests: Clean up output formatting with str.format()
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen bafd8bfa57 tests: Remove trailing whitespace
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen f01edbcfac tests: Rename stop-wifi.sh to stop.sh
This makes script naming more consistent with start.sh.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 78060b25a1 tests: Simplify test_ap_bss_add_remove implementation
Use lists and loops to avoid duplicated operations.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 57661377df tests: Use a helper function to rename wpa_supplicant/hostapd logs
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 8f47f31dd8 tests: Always write run-tests.py debug logs a file
Remove the -l command like option from run-tests.py and always enable
writing of debug level logs to files. The stdout debug verbosity is
controlled independently of the debug log files.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 75428961d9 tests: Split hostapd debug log into per test case files
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen d956022c11 tests: Ignore old scan results in test_grpform_pbc
This is needed to avoid invalid PBC session overlap detection when
the previous test case used active PBC mode and the old BSS entry
in cfg80211 may still be valid when starting the next test case.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen c65f23ab64 tests: Use single channel scans to speed up test cases
A full scan in these specific test cases does not add anything to the
coverage, so use a single channel scan for the station connection to
remove undesired extra time needed for a full scan.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen de684a2b83 tests: Add run-tests.py --shuffle-test
This optional argument can be used to randomize the order in which the
test cases are run. This can provide more coverage on testing
interactions of common use cases in various different sequences. Such
issues have already been found even with the fixed order of test cases,
but being able to reorder the tests makes this more efficient.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Johannes Berg fdbc092389 hwsim tests: Add build script
This is easier than to copy/paste from the README. We may
want to extend it later to change the .config for some
common differences between systems (e.g., libnl/libbfd).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg a5d7da3fd3 hwsim tests: Prefill database in VM tests
In some cases, e.g., with the VM tests if the VM crashes, it
can be useful to know which tests should have run but didn't
(or didn't finish). In order to catch these more easily, add
an option to prefill the database with all tests at the very
beginning of the testing (in a new NOTRUN state) and use the
option in the VM tests.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 63f83fac0d hwsim tests: Create results database in VM tests
Create a results.db in the output directory when running
the tests in a VM. To make that easier, create the tables
in the python script if they don't exist.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 4a1b8901ab hwsim tests: Refactor test results reporting
Refactor the test reporting to treat the different results
(success/skip/failure) identically. This makes the timing
seem a bit longer, but cleans up the code which will allow
for adding more checks (e.g., on the captured data files)
later.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 1cd3eae362 hwsim tests: Allow setting KERNEL and KVMARGS
Rather than just having KERNELDIR, allow setting KERNEL directly.
Also remove the -s option that prevents running multiple machines
at the same time, but add a KVMARGS= variable that can be used to
restore that if needed.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Jouni Malinen a633397756 tests: Test dynamic BSS addition/removal
test_ap_bss_add_remove verifies hostapd behavior when BSSes are
added/removed in multi-BSS configuration.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen a1ddc79adf tests: Remove separate error/failed text file
The new sqlite database for results deprecated this.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 904b6e7e75 tests: Remove separate results text file
The new sqlite database for results deprecated this.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen b72c300267 tests: Use a symlink for default LOGDIR between scripts
This allows run-tests.py to use the same logs/<date> default logdir as
start.sh which is quite convenient for manual test runs.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 353e5067ff tests: Split wpa_supplicant debug logs into per test case files
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen c9aa430896 tests: Split run-tests.py logger info into per test case files
The run-tests.py -l argument does not take an argument value anymore.
Instead, debug output is directed to a separate file <test>.log for each
test case.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen e955226208 tests: Remove the 'test_' prefix from test module names
This is unnecessary extra complexity for user, so use the 'test_' prefix
only internally within the python scripts and file names.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 4cd8343f4d tests: Remove the 'test_' prefix from test names
This is unnecessary extra complexity for user and reports, so use the
'test_' prefix only internally within the python scripts.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen d05159ccc5 tests: Replace tcpdump with wlantest file write
There is no need to run a separate tcpdump process to capture frames
from hwsim0 since wlantest is already doing that can write the results
to a file.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 79b16a5c0d tests: Remove last-debug creation
This file was used for adding debug info into the buildbot logs. The new
sqlite database-based design will replace that, so there is no need to
create last-debug and getting rid of it will make it easier to split the
run log into per-test case files.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 6a5b4b1a66 tests: Fix sqlite run column to be an integer
Commit 781b65cfbb ended up accidentally
changing this from an integer to a string. Fix this by not converting
the variable into a string.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Johannes Berg 970d3b096f hwsim tests: Add scripts to run in a VM
Instead of running on the host, it can be useful to run in a
VM, particularly to test kernel rather than userspace changes,
so add a few scripts that allow doing so easily.

The basic idea is that the VM kernel is the same architecture
as the host kernel, so the host's root filesystem can be used
(in read-only mode) to run everything. Only a log filesystem
is mounted read-write and will get all the test output.

The kernel console output is collected to a special 'console'
file in the logs directory and kernel crashes are detected.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg e8e238c436 hwsim tests: Silence chown warnings
If running in a VM with the logs going to a host filesystem
chown isn't actually possible, silence any warnings from it.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 044dd1c267 hwsim tests: Silence modprobe warnings
If module loading isn't enabled (e.g., in VM tests) then
don't try to load/unload the modules.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 8f946511c9 hwsim tests: Reset at the end of a test
Resetting at the beginning causes the reset logging/tracing
data to leak from the previous test into the next, and the
last one being missed at all - reset at the end of each run
instead. Also reset before all tests just in case running a
test actually crashed the python script.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 0d5a54048b hwsim tests: Allow collecting dmesg
In addition to tracing, allow collecting dmesg. There's no
provision for actually looking at it and finding problems
in it yet though.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 0141fa5244 hwsim tests: Pass --logdir to run-tests.py
Instead of passing the log directory for each option
(-l, -r, -e, and -T) pass it once and make the other
options just take the filename (optionally, even).

This will also make it easier to extend later.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 958bf1ba39 hwsim tests: Move logging into timestamped subdirectory
Instead of logging many files called "<timestamp>-*", log into
a new "<timestamp>/*" in the logs/ subdirectory and only put
the last-debug file into logs/. If a LOGDIR is specified in the
environment, instead just put everything into that directory
(so the caller should make sure to give it a timestamp or so)
and skip the creation of last-debug entirely.

Also clean up a bit and pass the LOGDIR from run-all.sh to
start.sh rather than having start.sh create the timestamp and
run-all.sh detect the latest one when having run start.sh.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 435e37df7c hwsim tests: Allow run-tests.py to start tracing
In order to get tracing per test, allow run-tests.py to start
and stop tracing per test case. This is implemented using a
python 'with' context so it starts/stops automatically at the
right spots.

Instead of starting global tracing, also use it from run-all.sh
and put the trace files into the log dir.

Note that this only works right if you use a separate log dir
for all test runs as the trace files aren't timestamped.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 0648c3b8f5 hostapd: Add -T Linux tracing option
Just like wpa_supplicant, give hostapd the -T option to
send all debug messages into the Linux tracing buffer.
Enable this option for hwsim test builds by default.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg f62ec3696d hwsim tests: Pass run-all arguments on
Allow run-all to pass on extra arguments from the command
line that aren't built by the script itself.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg aee9446d0c hwsim tests: Pass commit as an argument
Rather than saving the current commit to a file, pass it
as an argument to run-tests.py.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Jouni Malinen 3b464a3c21 tests: Silence chmod errors
These will fail if used on a readonly file system and are only needed
for valgrind runs.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Johannes Berg f72434b43e tests: Refactor run-all.sh
Reuse the code rather than duplicating the implementation
of starting the tests. To make that easier, allow passing
multiple modules with -f to run-tests.py.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 95194219df tests: Reduce duplication in startup code
Instead of hard-coding four different cases, use variables
(and printf) to reduce the duplication.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 0b1faa8bf1 tests: Use argparse module with hwsim
Instead of re-implementing a command-line parser, use the
argparse module.

The only real change (I hope) is that the test module must
now be given to the -f option without the .py suffix.

Also, --help now works, and if a test module/test name is
given that doesn't exist, the valid list is printed.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 2f3a3edd5d tests: Import sqlite3 only if used
Might help some systems that don't have/need it.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 781b65cfbb tests: Use proper SQL construction in hwsim test reporting
Don't construct SQL strings on the fly but instead use the
argument placeholders.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Johannes Berg 5fecc0f525 tests: Allow specifying LOGDIR for hwsim scripts
Instead of hardcoding logs/, allow putting LOGDIR into
the environment. This helps run tests in a VM where the
rootfs might be mounted read-only.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Jouni Malinen 789b9f1d52 tests: Enable verbose logger_stdout debug in hostapd
This makes hostapd debug logs more helpful for debugging.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 709f18d501 tests: Add a test for dynamic hostapd config change
test_ap_change_ssid verifies that the SET and RELOAD control interface
commands can be used to change the SSID of a hostapd-controlled WPA2-PSK
AP, i.e., for a case where the PSK needs to be derived again after the
SSID change.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 8fba2e5d42 tests: Add Hotspot 2.0 test cases for connecting with username
The test_ap_hs20_username* test cases verify that a username/password
credential can be used for Hotspot 2.0 connection and that the network
type is reported correctly.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 59f8a3c69d tests: Add external_sim test cases with roaming network
test_ap_hs20_ext_sim_roaming is otherwise identical with
test_ap_hs20_ext_sim, but the network is operated by a roaming partner.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen bbe867672e tests: Add helper functions for Hotspot 2.0 test cases
These make it easier to add new test cases for Interworking network
selection.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen f4defd91cd tests: Verify that STATUS sp_type is valid for Interworking
This verifies that the network type (home/roaming/unknown) is available
and set properly in the test_ap_hs20_ext_sim test case.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Johannes Berg b3e2ce3bae tests: Do not require wpaspy installation
Since the scripts must be run from the source directory to
find the tests to run, they can use a relative path to the
wpaspy module instead of requiring it to be installed.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
11 years ago
Jouni Malinen f3be6eea9b tests: Allow test case descriptions to be written into database
"run-tests.py -S <db file> -L" can now be used to update a database
table with the current set of test cases and their descriptions.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen b74b7e87bb tests: Add support for sqlite results database
This is more convenient to use directly than going through the
text-based results file.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 00606de898 tests: Unload cfg80211 on stop-wifi.sh
cfg80211 may keep some state (e.g., regulatory domain), so make sure
this gets cleared between each full testing cycle.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen e201e5ab61 tests: Add P2P channel selection test cases for group re-invocation
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 799716a8f1 tests: Add P2P channel selection test cases with world roaming
This verifies that passive scan 5 GHz channels are not selected with and
without p2p_add_cli_chan=1.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 46f2cfcefc tests: Add P2P channel selection test cases for group formation
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen e7ecab4a3b Use ARRAY_SIZE() macro
Replace the common sizeof(a)/sizeof(a[0]) constructions with a more
readable version.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen b9ab2f2e5c tests: Add pre-authorized invitation-to-active-group
test_p2p_go_invite_auth is similar to test_p2p_go_invite with the main
difference being in the peer device pre-authorizing the invitation
instead of processing invitation at upper layers after having received
it.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen ebc61dc2db tests: Add test cases for GAS operations
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 72c052d525 tests: Add domain_suffix_match validation
This verifies that domain_suffix_match works correctly both for the
matching and mismatching cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen c7afc0789c tests: Add negative TLS test case to verify trust root validation
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen d93a240731 tests: Stop test run on NOTE command failure
There is no point trying to go through a test case if the NOTE command
to write TEST-START entry does not succeed. This avoids some excessive
waits on buildbot trying to forcefully kill the programs on its timeout
if wpa_supplicant gets stuck waiting for something (like the current
issue with libnl events and commands having a chance of hitting a
blocking wait on netlink messages).

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 033e48ee2d tests: Force GO to have an old entry in test_p2p_go_invite
This adds more coverage to testing by forcing the GO to be found with an
older entry in the BSS table and with that entry having a different
operating channel. Such a case has found issues with PD retries and
scanning if incorrect frequency and SSID is selected for the group.
Instead of relying on the old BSS entry with different operating channel
to happen based on a specific test case sequence, force this to happen
for this test case every time.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen efd43d85bd tests: Test case for Hotspot 2.0 with external SIM processing
This verifies network selection using 3GPP Network Information and
connection using EAP-SIM with GSM authentication handled by an external
program.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 0076a18f39 tests: Remove cred before changing domain
This is in preparation for supporting multiple domain values after which
setting the domain value does not replace the old value, but adds a new
one.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen dfe6ce4eeb tests: Make sure hlr_auc_gw exits and clean up sockets
If a test run is terminated forcefully, hlr_auc_gw could have been left
running and/or some of the control interface files could still remain.
This could result in hlr_auc_gw not starting again for the next test
run.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 0d4c5494bc tests: Skip EAP-SIM/AKA/AKA' if hlr_auc_gw not available
Do not fail the EAP-SIM/AKA/AKA' test cases if hlr_auc_gw is not
available since hlr_auc_gw is not considered required part for the test
setup.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen f9174c3b4e tests: Flush stdout after each status line print
This makes it more convenient to follow live test execution status.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 9626962d2f tests: Add test cases for WPA2-Enterprise
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 479cbb3892 tests: Start RADIUS authentication server
This can be used to run WPA2-Enterprise test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 997ebcfa5c tests: Auto detect group name
Some older systems used admin group, but adm group seems to be more
common nowadays, so detect this automatically rather than assume admin
group is used.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 66767f0f4a tests: Merge start-p2p-concurrent.sh functionality into start.sh
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 0d84c400f9 tests: Add mechanism for test cases to indicate a skipped run
This can be used by test cases that depend on some external component
that may not always be available to indicate clearly that a test case
was skipped rather than passed or failed.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 9b00f24a76 tests: run-tests.py -L to print out list of test cases
This can be used to get a summary of all the available test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 48d8a43a28 tests: Adjust debug verbosity levels to get rid of extra info
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 883ab1b9f1 tests: Document automated mac80211_hwsim test setup
This provides guidance on how to build the test setup, how to run the
tests, and how to add new test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 5f3eddac8e tests: Add test cases for P2P service discovery
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 7ebf841fc5 tests: Test GO functionality with legacy STAs
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen d85bb75d47 tests: Make run-tests.py command argument parser more flexible
This allow -e, -r, and -f arguments to be given in any order.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 3b7475d365 tests: Write test case result summary into a file
This can be used to build statistics from test execution without having
to go through number of log files.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 1fc114a16a tests: Add test duration and time to PASS/FAIL reports
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 8d0825d655 tests: Exit early if startup fails
There is no point trying to go through the tests if hostapd and
wpa_supplicant processes cannot be started properly.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 6ca3a98bc2 tests: Wait for driver scan state to clear between tests
cfg80211/mac80211 seems to getting stuck with scans every now and then.
Check for this special state and delay return from reset() until the
driver has stopped the scan operation. This reduces likelihood of
failing multiple test cases in a row because of a single error.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen ef2bd5a344 tests: Add a test case for P2P invitation
test_p2p_go_invite verifies that GO can invite a peer in a case where
the operating channel and peer's listen channel are different.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen d3b082371d tests: Speed up stop-wifi.sh
Split the long waits to iterations of shorter waits that can be stopped
based on processes having died.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 53b63a0a3f tests: Add support for using Linux kernel tracing functionality
run-all.sh and start.sh scripts can now take 'trace' command line
argument to request Linux tracing information from mac80211, cfg80211,
and wpa_supplicant to be recorded.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 9d507452dd tests: Clear global monitor interface on dump_monitor()
This avoids some issues with the global control interface socket
getting stuck with send buffer limit reached if test cases did not
use wait_global_event().

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen ea0e92eef5 tests: Check wpa_supplicant connection after reset
Some test runs have resulted in wpa_supplicant being unresponsive or
very slow on the control interface. Check for that type of issues as
part of the reset sequence that is done between each test case.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 18b12b56c1 tests: Add a test case for invitation after client removal
test_persistent_group_invite_removed_client verifies that a client
that is removed from a group can rejoin based on new invitation.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 2c914e2464 tests: Use a helper function for waiting session termination
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 451afb4fd3 tests: Add test cases for persistent P2P groups
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 672f3a72e4 tests: Extend test_autogo_2cli to test client removal
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen b162675fd9 tests: Add test cases for per-STA PSK in P2P group
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen dd850f4a11 tests: Make test_autogo validate group removal event on client
Use test_autogo to verify that P2P client is able to notice explicit
group session termination message from the GO. This would have caught
the regression in processing P2P deauthentication notifications.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 846be88975 tests: Use longer timeout in test_ap_wps_er_add_enrollee
This is another one of the test cases that can time out frequently
under valgrind during WPS exchange. Increase the timeout to make
false error reports less likely to occur.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 7e3f110b08 tests: Increase WPS timeout to 30 seconds
Number of crypto operations seem to take very long time in the valgrind
tests (about five seconds for public key generation for M1 and M2 on a
virtual server) and this is enough to push the test runs to hit the
timeout frequently even when there is no real error. Make this less
frequent by increasing WPS test case timeout from 15 to 30 seconds to
avoid issues based on the test scripts.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen b1ce1ec09b tests: Increase P2P group formation timeout to 20 seconds
Number of crypto operations seem to take very long time in the valgrind
tests (about five seconds for passphrase to PSK mapping and for public
key generation for M1 and M2 on a virtual server) and this is enough to
push the test runs to hit the timeout frequently even when there is no
real error. Make this less frequent by increasing group formation
timeout from 15 to 20 seconds to avoid issues based on the test scripts
(15 + config time seconds timeout in the protocol may still kick in,
though).

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 18ece3133e tests: Wait longer for program deinit
Wait a bit longer for wpa_supplicant/hostapd to exit and clear control
interface files separately if either any of the cleanup steps fail to do
so.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 15f7b02c95 tests: Wait for hostapd/wpa_supplicant to reply at start (concurrent)
Instead of waiting for a fixed duration, poll hostapd/wpa_supplicant
through the control interface until they are ready to reply in order to
avoid starting test case execution too early. This is like commit
b76579e0c0 but for the concurrent P2P test
cases that were forgotten from that commit.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen dcfb4d652a tests: Detect BSSID mismatch in test_ibss_rsn
It looks like mac80211 does not always manage to join the same IBSS and
this can result in test_ibss_rsn failures. Detect this case and try to
get the IBSSes to merge by running a scan prior to continuing with the
test case.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 3d5b356ac0 tests: Wait for all 4-way handshake pairs in test_ibss_rsn
The handshake between STA2 and STA1 was not tracked previously. For
completeness, include that in the list of handshakes that are explicitly
waited for to complete prior to starting the connectivity tests. Since
all key setup should be done at this point, remove the extra wait before
the last connectivity test between STA1 and STA2.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 853b49a030 tests: Increase test_ap_wps_init connection timeout
It looks like there may not be enough time to complete this test case in
15 seconds under valgrind on a virtual host every time, so increase the
timeout to 30 seconds to get more consistent test results.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen b76579e0c0 tests: Wait for hostapd/wpa_supplicant to reply at start
Instead of waiting for a fixed duration, poll hostapd/wpa_supplicant
through the control interface until they are ready to reply in order to
avoid starting test case execution too early.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 9e88556a1c tests: Kill hostapd/wpa_supplicant more forcefully if needed
Try to make sure new testing can be started by forcing
hostapd/wpa_supplicant to be killed with SIGKILL if needed. In addition,
wait a bit longer when killing the processes to avoid issues with the
next test run starting before the old one has been fully terminated.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 024913a156 tests: Stop valgrind.bin regardless of which option is started
The previous design of having to provide valgrind parameter to
stop-wifi.sh did not work since the new test setup may no match the
previous one. Instead of trying to figure out what needs to be stopped
based on previous run, stop all wpa_supplicant/hostapd processes running
under valgrind unconditionally to avoid cases where new set of processes
cannot be started due to existing processed.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen e5a3983819 tests: Use more enforced order for the RSN IBSS steps
test_ibss_rsn has been failing pretty frequently due to various issues
in getting all connections up. Try to address this initially by avoiding
concurrent operations and explicitly waiting for 4-way handshake
completion before testing data connection. Once this test case is
workign more robustly, a more difficult case with concurrent operations
can be added as a separate test case.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 433107f0a2 tests: Silence wlantest clear_tdls_counters output from stdout
This removes unnecessary "OK" lines from test logs.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen be1a40f26f tests: Redirect tcpdump output to a file
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen c548fb27c8 tests: Save debug log to a file and clean up stdout status
This makes it easier to figure out what failed and allows builbot to
integrate multiple logs and state information about the test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen f84692764a tests: Sleep even longer before starting valgrind tests
It looks like some virtual host setups are too slow to get
wpa_supplicant initialized under valgrind and this was triggering test
failures. Work around this by using even a longer wait before test case
execution.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen d011246f79 tests: Make wpa_supplicant and hostapd executable through valgrind
It looks like valgrind could not under buildbot with the default file
mode. Fix this by making wpa_supplicant and hostapd binaries readable
and executable by everyone.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 789959c493 tests: Continue even if device reset fails
This may provide better testing coverage by allowing temporary issues
during the test cycle to be ignored.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 0c43a982c7 tests: Add option to run test cases under valgrind/concurrent P2P
./run-all.sh can now take an optional argument to select whether to run
all test cases as before (default), to run these under valgrind
("valgrind"), to run P2P test cases with concurrent station interface
("concurrent"), or the concurrent P2P test cases under valgrind
("concurrent-valgrind").

valgrind cases report errors if a test case fails or valgrind reports an
error.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 3ed2814a1e tests: Use logger.info() instead of print to get one stream
print and logger.info() were directing output to different locations
(stdout and stderr, respectively) which resulted in buildbot showing
reordered entries. Use logger consistently to avoid that.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 4896ddaea1 tests: Check for exceptions during TEST-START/STOP
It looks like the NOTE commands can time out in some cases. Avoid
stopping the test run in such a case to get more coverage if this is a
temporary issue.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 76d320ef3f tests: Update concurrent P2P setup to match start.sh changes
The design for launching AP mode interfaces was changed, but
start-p2p-concurrent.sh was not updated with matching changes.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 9d86f37f78 tests: Validate AP connection in each TDLS step
Make sure the connection between each STA and the AP is in working state
between each TDLS setup/teardown operation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen ec9589fdac tests: Pass apdev instead of bssid to TDLS functions
This makes it easier to add new validation steps into TDLS setup and
teardown processes.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen fdae3c40f6 tests: Add a test case for IBSS RSN
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 0fa28afe35 tests: Use wpa_supplicant global control interface for P2P
This allows more consistent interface to be used regardless of which
P2P driver design is used (especially for P2P management operations
over netdev vs. dedicated P2P_DEVICE).

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 441d6d23b2 tests: Initialize global wpa_supplicant control interface
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen cd7f1b9a1d tests: Add test cases for Fast BSS Transition
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 280cd8a9a2 tests: Allow hwsim_test and wlantest_cli to be used from PATH
This makes it easier to support some test environments where the
repository is shared between hosts.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 8c87f65f32 tests: Use /var/run/hostapd-global to avoid socket file in work dir
This makes some cases more convenient with read-only file systems.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 6edaee9c82 tests: Test WPS ER UPnP functionality to add Enrollees
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen bdb112d35f Add bitfield routines
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 590160d502 tests: Add a test case for AP auto configuration on config token build
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 8e80dd5b0c tests: Use ignore_old_scan_res with some more WPS tests
The scan results from old test cases showing different SSID on the AP
can result in false failures, so avoid those by ignoring old scan
results from cfg80211.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen f59a10d405 tests: Generate a tarball of test results if a test fails
This makes it easier to collect failure data from test servers for
further analysis.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 79c3cbaf12 tests: Capture hwsim0 packet dump during test run
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen ea295abcd5 tests: Add test cases for NFC+WPS
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen c7860beb52 tests: Use Wlantest class in test_autogo_tdls
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 93a06242ce tests: Add a test case for Hotspot 2.0 network selection
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 6b67117a34 tests: Stop wpa_supplicant before hostapd
Stopping the AP first was not ideal for the test cases since it could
result in wpa_supplicant trying to connect back and start a scan at the
end of a test case and cause problems for the following test case that
tried to scan in the beginning while the previously started scan was
still in progress.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 62d58f7ae3 tests: Use FLUSH command to clear wpa_supplicant state
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 6dacb8e98b tests: Ignore old scan results in couple more WPS test cases
These have shown failures due to obsolete scan results from previous
test cases being present.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 1a8e4761da tests: Use a more compact summary of test results
Do not print the potentially long list of passed test cases. In case of
failure(s), make sure the failed test list is the last item in the
report.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 803edd1c09 tests: Fix BSS table flushing and old result ignoring for WPS tests
The WPS tests are more prone to fail if scan results from the previous
test cases are allowed to remain in the wpa_supplicant BSS table during
the consecutive test since the test setup uses the same BSSID for the
test APs that change their configuration. Avoid these mostly bogus
issues by enforcing wpa_supplicant to drop and ignore old scan results
during the WPS test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 347c77e6cc tests: Remove obsolete test script
The generic test cases and run-tests.py have removed need of this
separate test script.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 7585f349c7 tests: Add command line argument -f for specifying a test file
This can be used to run all test cases from a single test file.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 63a020ead8 tests: Use a single set of scripts for running both P2P and AP tests
This removes the unnecessary separation of P2P (no hostapd) and AP
tests. The same scripts can be used to prepare for these tests and to
execute the tests.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 0b20f514de tests: Make hostapd test setup more similar to the P2P tests
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen ae3ad3284a tests: Pass AP devices to test cases
This removes hardcoded assumptions about AP interfaces from test_*.py.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 302b7a1b09 tests: Add test cases for WPS operations
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen fde43cddb9 tests: Fix test_discovery to force full device discovery
P2P_PROV_DISC fails if the peer is not fully discovered and the previous
version of the test cases did not force this (i.e., it could have
started PD just based on having seen a Probe Request frame from the
peer).

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 5924d4c105 P2P: Add a test case for discovering a P2P client in a group
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen b12b7c7a1f tests: Make test_discovery report PD failures with more detail
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 5b06bdf795 tests: Add SA Query test with PMF
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 835a546b20 tests: Add test cases for PMF
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 5126138c9e tests: Add roaming test cases
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen fcbccf1aae tests: Set umask to avoid unexpected issues with hostapd sockets
buildbot seems to be running with more limited umask by default and that
prevented the hostapd per-interface socket from being accessed.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 8bc0799b93 tests: Use the ap_ifname variable instead of hardcoding ifname
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 894541ea9c tests: Get rid of the unnecessary add_tests() functions
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen b61e418c35 tests: Add helper functions for connection to an AP
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen e259d186cf tests: Add helper functions for starting hostapd AP
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 0165c4be10 tests: Add TDLS test cases for WEP and open network
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen e492837b67 tests: Add TDLS test cases with WPA-PSK and WPA+WPA2-PSK
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen b8cd4c542f tests: Configure hostapd dynamically during the tests
This makes it more convenient to change hostapd parameters between the
test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 9f46d57f2b tests: Rename AP testing scripts to be more generic
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen a9bdfd49a6 tests: Add more test cases for TDLS functionality
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen dc4e222cb7 tests: Use more thorough validation of TDLS frame paths
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 059555878e tests: Add forgotten new files to the repository
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 81266da728 tests: Add initial AP tests with hostapd
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen d014a15046 tests: Fix TDLS counter validation
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 8a244cd8a0 tests: Add concurrent version of P2P test setup
A virtual station interface in scanning state can change the P2P
operations quite a bit, so running all the P2P tests also in such
setup can increase testing coverage quite a bit.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 4441b9d571 tests: Use social channel scan to speed up tests
The discovery and group formation test cases do not need to run the full
scan as the first step, so get rid of it to make the tests complete more
quickly.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 47c34473f9 tests: Give document string for each test case as a description
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 1a4d80b8d5 tests: Group formation with PBC
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 5743006d36 tests: Add P2P device discovery and provision discovery test case
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen d963f03772 tests: Use social-only scan by default to speed up tests
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen c4fff52c89 tests: Add GO Negotiation without pre-authorization
This is the most common sequence for initiating GO Negotiation, so
include a test case that uses threads to follow both peers at the
same time to allow GO Negotiation to be re-initiated.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 4d7d61b689 tests: Fix wait duration
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 89ffe06d68 tests: Do not hide error return when using run-all.sh
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 2a4291ffdc tests: Register test cases automatically from test_p2p_*.py
This removes need for editing run-p2p-tests.py whenever new test files
are added.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 823d572f99 tests: Add a script for running all the automated tests
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 07a2e61b43 tests: Use wlantest to validate TDLS behavior
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen e5774e1888 tests: Reset devices based on each test
Make sure the devices are in known state before starting each test case.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 7cb08cdbd6 tests: Add a test case for using TDLS in a P2P group
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 78ebbf0916 tests: Add autogo test with two clients
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 8b2b687eb8 tests: Start wlantest on hwsim0
This is in preparation for using wlantest to verify correct behavior in
various test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen f3f8ee882f tests: Add support for separate P2P group interfaces
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 9e7308be40 tests: Reset device state at the end of full test run
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 4ea8d3b5cf tests: Add autonomous GO testing
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen dd34860dcd tests: Allow selected tests to be specified
Command line parameter to run-p2p-tests.py can now be used to select
which test case is run instead of always running all test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen caf518a743 tests: Add GO Negotiation provisioning method validation
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen f7b1a75036 tests: Validate GO Negotiation status code
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 809079d3ea tests: GO Negotiation with both devices using GO intent 15
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen c68f9a61c6 tests: Report group formation results as a dict
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen a311c61dd6 tests: Add test execution mechanism
run-p2p-tests.py can now be used to run all P2P test cases. The
actual test cases are defined in test_p2p_*.py files.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 731e60f5c5 tests: Add start/stop scripts and configuration files
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 3eb29b7b47 tests: Check connectivity in the P2P group
Use hwsim_test to verify that the formed group has working data
connectivity.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 1ae73b03be Add a starting point for mac80211_hwsim-based testing
This will hopefully grow over time to become a much more complete
testing mechanism that uses mac80211_hwsim to verify various
wpa_supplicant and hostapd functions automatically.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 565bb65d5c Fix test-{md5,sha1} builds
These need to include the libraries to fix aliasing_hide_typecast()
in md5-internal.c.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen 77b2c81275 Add aes_gmac() as a wrapper for AES GMAC operations using GCM
This is otherwise identical to aes_gcm_ae() but does not use the
plain/crypt pointers since no data is encrypted.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen d140db6adf Add support for using 192-bit and 256-bit keys with AES-GCM
This adds 192-bit and 256-bit key support to the internal AES
implementation and extends the AES-GCM functions to accept key length to
enable longer AES key use.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen af0963fab4 Support arbitrary IV length with AES-GCM
Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen c2372d7cf0 Add AES-GCM test vectors from gcm-spec.pdf
Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 0d7773b63f Add routines for encoding/decoding printf escaping mechanism
This can be used to build ASCII strings from binary data that is
more likely to use ASCII (i.e., text format is more natural
option than hexdump, but there is possibility of some non-ASCII
characters).

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 0f3d578efc Remove the GPL notification from files contributed by Jouni Malinen
Remove the GPL notification text from the files that were
initially contributed by myself.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen b87346c41a Remove test-https on "make clean"
This is not included in the TESTS list, but should be removed anyway.

Signed-hostap: Jouni Malinen <j@w1.fi>
13 years ago
Jouni Malinen cd52acec85 Rename tls_prf() to tls_prf_sha1_md5()
Prepare for multiple TLS PRF functions by renaming the SHA1+MD5 based
TLS PRF function to more specific name and add tls_prf() within the
internal TLS implementation as a wrapper for this for now.

Signed-hostap: Jouni Malinen <j@w1.fi>
13 years ago
Jouni Malinen b32a8d1dfe test-https: Fix memory leaks in TLS processing
Signed-hostap: Jouni Malinen <j@w1.fi>
13 years ago
Jouni Malinen f551fa8d50 Add test program for RC4 (test vectors from RFC 6229)
Signed-hostap: Jouni Malinen <j@w1.fi>
13 years ago
Jouni Malinen d10b13982d Add test-https for testing internal TLS client functionality
This tool can be used to test the internal TLS client implementation
against HTTPS servers.

Signed-hostap: Jouni Malinen <j@w1.fi>
13 years ago
Jouni Malinen 717cc12f60 Fix test-x509v3 build
Signed-hostap: Jouni Malinen <j@w1.fi>
13 years ago
Jouni Malinen 8d806cc2af test-sha1: Add test vectors from RFC 6070
The test with very large iterations count is commented out since it
takes quite long to derive (it does pass, though). In addition, the
last test vector is commented out since pbkdf2_sha1() does not support
arbitrary binary passphrases (\0 inside the string).
14 years ago
Jouni Malinen dacf478352 Add generic doubly-linked list implementation 15 years ago
Jouni Malinen 655702f38d Move test_x509v3 into the new tests subdirectory 15 years ago
Jouni Malinen 0bc377fa93 Resolve circular library references with --start-group
src/crypto/libcrypto.a and src/tls/libtls.a have circular references
and will need special handling with the linker at least for the time
being. This could be cleaned up eventually, but for now, provide a
mechanism to get the programs linked.
15 years ago
Jouni Malinen ab7ddc74ad Move asn1_test.c into tests subdirectory and split it in two
The new test-asn1 and test-x509 tools are built using libraries
from src/{utils,crypto,tls}. Currently, cross dependencies between
crypto and tls are still preventing the test-x509 from being linked
properly.
15 years ago
Jouni Malinen 1767f7c117 Resolve compiler warnings in the test programs 15 years ago
Jouni Malinen f8cf3ce6a6 Move more tests from wpa_supplicant/tests into tests 15 years ago
Jouni Malinen c7ab5122a7 Use simpler make rules for test programs 15 years ago
Jouni Malinen e280cf6693 Get rid of some compiler warnings 15 years ago
Jouni Malinen 668562d5fb Move MD4 test from wpa_supplicant/tests into tests 15 years ago
Jouni Malinen 631afd993f Add rules for building src/crypto as a library
For now, this is hardcoded to support only the internal crypto
implementation.
15 years ago
Jouni Malinen 841b52b403 Include needed header files to avoid compiler warnings 15 years ago
Jouni Malinen 6a230ba274 Add build rules for building a library from src/utils files
This is an initial step on providing an alternative build system that
uses libraries from src subdirectories.
15 years ago
Jouni Malinen 953f83439b Move Milenage test code into the new tests directory 15 years ago
Jouni Malinen 8ad733d5ea Use auto-generated dependency files and clean them 15 years ago
Jouni Malinen 1801bd7fae Move base64 test code into a new tests subdirectory 15 years ago