Commit graph

441 commits

Author SHA1 Message Date
Jouni Malinen ad36d27d6a tests: Remove ignore_old_scan_res workaround
Now that wpa_supplicant requests the driver (cfg80211) to clear its scan
cache automatically after each BSS_FLUSH/FLUSH command, the previously
used ignore_old_scan_res workaround should not be needed for the hwsim
test cases anymore.

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-03 08:59:59 +02:00
Jouni Malinen 5dec879d5b tests: Verify STA command output and EAPOL state
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-02 18:10:30 +02:00
Jouni Malinen 75b25ece93 tests: Verify GET_CONFIG ctrl_iface command on hostapd
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-01 22:15:36 +02:00
Jouni Malinen 9488858f29 tests: Add more thorough WPS_AP_PIN validation
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-01 22:11:46 +02:00
Jouni Malinen 3bdf7d7f67 tests: Verify WPS_CHECK_PIN functionality
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-01 21:30:57 +02:00
Jouni Malinen 474d209057 tests: P2P SD using per-peer query
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-01 20:01:00 +02:00
Jouni Malinen 8fdcca3452 tests: Verify P2P SD request cancel
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-01 19:56:24 +02:00
Jouni Malinen 34d35be44b tests: P2P service discovery with GAS fragmentation
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-01 18:56:20 +02:00
Jouni Malinen 984c5b96e3 tests: P2P Presence Request
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-01 18:46:28 +02:00
Jouni Malinen 9a170ed244 tests: Add some coverage for Device Discoverability exchange
This is not really perfect, but something to get a bit more testing
coverage.. For proper discoverability mechanism validation, the P2P
client would need to go to sleep to avoid acknowledging the GO
Negotiation Request frame. Offchannel Listen mode operation on the P2P
Client with mac80211_hwsim is apparently not enough to avoid the
acknowledgement on the operating channel, so need to disconnect from the
group which removes the GO-to-P2P Client part of the discoverability
exchange in practice.

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-01 17:37:08 +02:00
Jouni Malinen 0187c41d88 Declare wpa_debug_* variables in src/utils/wpa_debug.h
These were somewhat more hidden to avoid direct use, but there are now
numerous places where these are needed and more justification to make
the extern int declarations available from wpa_debug.h. In addition,
this avoids some warnings from sparse.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 19:29:52 +02:00
Jouni Malinen 7fd15145ff tests: RADIUS
This adds initial set of test cases to increase RADIUS testing coverage.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 19:03:39 +02:00
Jouni Malinen d78f33030d tests: SSID contents and encoding
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 19:03:39 +02:00
Jouni Malinen 20e5c2830f tests: Add IEEE 802.1X and dynamic WEP test cases
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 19:03:39 +02:00
Jouni Malinen 2e3aec56e7 tests: Verify mixed mode WPA+WPA2 operation
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 19:03:39 +02:00
Jouni Malinen 08567ff6da tests: Verify WMM AC configuration and ACM=1 downgrade VO/VI->BE
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 15:45:18 +02:00
Jouni Malinen c2f70afa51 tests: WEXT functionality
It did not look like open mode association completed with WEXT.. I'm
commenting that test case out for now since WPA2-PSK worked. If you care
about WEXT, feel free to fix it and submit a patch to remove the
"REMOVED_" prefix here..

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 15:45:18 +02:00
Jouni Malinen 6e917c3e25 tests: Increase nl80211 test coverage with monitor/connect
Add test cases to use connect command instead of auth+assoc commands and
AP mode operations using the old monitor interface design.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 15:45:18 +02:00
Jouni Malinen d7257de631 tests: Verify cfg80211 P2P Device use
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 15:45:18 +02:00
Jouni Malinen 9489637b42 tests: Verify dynamic wpa_supplicant interface addition/removal
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 15:45:18 +02:00
Jouni Malinen 0fab9ce67a tests: Verify PMKSA caching
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 19:25:42 +02:00
Jouni Malinen 75d13bc657 tests: Point to the main hwsim page instead of directly to buildbot
This page provides more helpful information than the buildbot UI.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 18:37:40 +02:00
Jouni Malinen d671a42013 tests: Verify hostapd WPS_GET_STATUS command
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 17:49:21 +02:00
Jouni Malinen 35831e94ff tests: Verify hostapd WPS_CONFIG command
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 17:39:58 +02:00
Jouni Malinen 097cd9cd4d tests: Verify WPS information in hostapd STA command
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 17:33:02 +02:00
Jouni Malinen b1448311c2 tests: Show test counter on the START line
This makes it more convenient to figure out how far a test cycle is from
live logs.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 17:18:17 +02:00
Jouni Malinen 2bb9e28336 tests: Validate EAP-EKE proposal negotiation
This covers all currently supported algorithms and the case of no match.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 17:18:17 +02:00
Jouni Malinen 18030dc033 tests: Verify dual-radio WPS operations
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 17:18:17 +02:00
Jouni Malinen 7daa9b9ad4 tests: Use a single channel scan to avoid unnecessary wait
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 17:18:17 +02:00
Jouni Malinen a6cf5cd655 tests: Verify SAE anti-clogging mechanism
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 17:18:17 +02:00
Jouni Malinen e4357b190f tests: Verify wps_ap_pin command behavior
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:33 +02:00
Jouni Malinen e912986056 tests: Verify concurrent WPS protocol run with assigned PIN
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen a60a6d6b80 tests: Verify that another station cannot use same PIN
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen 362ba6de98 tests: Verify selected registrar clearing on PIN method completion
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen 71afe83441 tests: WPS cancel on AP
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen be92357074 tests: WPS ER configuring AP over UPnP
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen 38ae43de6b tests: WPS ER unsubscription from event on WPS_ER_STOP
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen 800bcf4ea1 tests: WPS ER selecting AP using BSSID instead of UUID
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen eeefe187bc tests: Verify WPS AP auto upgrade from WPA/TKIP to WPA/TKIP+WPA2/CCMP
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen d658205a89 tests: Verify PIN mismatch behavior
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen 6645ff5094 tests: Verify WPS AP Setup Locking on AP PIN failures
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen 10ea684830 tests: Verify WPS extensibility (version and new attribute)
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen bff3ac5b3c tests: Verify EAP-WSC fragmentation and mixed mode WPA+WPA2
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen 6f62809b4b tests: Verify FT EAP
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen 6e658cc42d tests: Verify FT SAE
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen 2b00519431 tests: WPA2-Enterprise with PMF required
Increase test coverage with PMF required configuration and SHA256-based
AKM in one of the EAP test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:31 +02:00
Jouni Malinen 71390dc87e tests: Verify WPA-Enterprise functionality
All the previous EAP test cases were using WPA2-Enterprise.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:31 +02:00
Jouni Malinen 910d2ca7c1 tests: Verify IBSS with WPA-None
The actual data connection does not seem to work with mac80211_hwsim, so
the hwsim_test results are ignored for now.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:31 +02:00
Jouni Malinen b553eab1a9 tests: Verify FT-over-DS
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:31 +02:00
Jouni Malinen 4a5a5792f1 tests: Verify PeerKey handshake
NOTE: Actual use of the direct link (DLS) is not supported in
mac80211_hwsim, so this operation fails at setting the keys after
successfully completed 4-way handshake. This test case does allow the
key negotiation part to be tested for coverage, though.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-28 16:32:54 +02:00
Jouni Malinen 4472aafbe0 tests: Generate a combined code coverage report
This combines coverage from all three separate reports into a single
report.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-28 16:32:54 +02:00
Jouni Malinen 75b2b9cfb0 tests: Verify EAP fast reauthentication
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-28 16:32:54 +02:00
Jouni Malinen 698f8324c6 tests: Verify PEAPv0 Crypto-Binding
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-28 16:32:54 +02:00
Jouni Malinen 6435799b85 tests: Add WNM test cases
These are not yet complete, but at least some frame exchanges can
be verified for WNM operations.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-27 20:04:27 +02:00
Jouni Malinen bcbd74155e tests: Mark kernel issues more clearly in the log file
It was previously not obvious from the <test case>.log file that a test
case was marked failed based on kernel issues. Make this very clear to
avoid wasting time on figuring out what caused the failure.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-27 18:11:07 +02:00
Jouni Malinen 3f33b3ad8c tests: Collect code coverage separately from each component in vm
Use a more robust design for collecting the gcov logs from the case
where test cases are run within a virtual machine. This generates a
writable-from-vm build tree for each component separately so that the
lcov and gcov can easily find the matching source code and data files.
In addition, prepare the reports automatically at the end of the
vm-run.sh --codecov execution.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-27 18:11:07 +02:00
Jouni Malinen 629dbdd36a tests: Wait for AP-ENABLED
It takes some time for hostapd to complete AP startup. In some cases,
this could potentially result in station starting a scan before the AP
is beaconing or ready to reply to probes. To avoid such race conditions,
wait for AP-ENABLED before going ahead with the test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-27 18:11:07 +02:00
Jouni Malinen 04e6278848 tests: Verify that WPS re-provisioning replaces old network block
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-12-26 20:50:28 +02:00
Jouni Malinen 9d2cb3ec94 Make CONFIG_TESTING_OPTIONS=y enable all testing options
This makes it easier to enable various testing parameters and
functionality in build configuration.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-12-26 20:50:28 +02:00
Jouni Malinen cf9189b94c tests: Verify scan behavior
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 20:50:23 +02:00
Jouni Malinen cef16c47fb tests: Include additional ANQP elements for testing coverage
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 18:27:48 +02:00
Jouni Malinen dcd6816817 tests: Verify Interworking network selection with other EAP types
This adds number of test cases to go through various possible EAP
configurations for Interworking network selection.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen 0aca5d1361 tests: Verify NAI Realm list with multiple realms in one entry
In addition, use TTLS/PAP to increase testing coverage.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen e209eb989c tests: Verify Interworking network selection based on roaming consortium
In addition, use PEAP as the EAP method to increase testing coverage.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen 459e96cd3b tests: Interworking network select with simulated SIM/USIM
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen 84262feffd tests: Verify behavior on malformed GAS responses
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen fe871e48b8 tests: Verify failure status code processing in GAS/ANQP
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen d9474958d7 tests: Clean up GAS/ANQP message processing
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen 18dd2af04b tests: Use helper functions for GAS test cases
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen bfe375ec77 tests: Verify behavior on incorrect GAS response type
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen 2cace98ee1 tests: Add a GAS query timeout test case
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen e4a44b3c09 tests: Add a GAS comeback delay test case
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen 8426a1474a tests: Verify Wi-Fi Display operations
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:44 +02:00
Jouni Malinen 3a64d523fa tests: Increase test coverage on BSS command
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:44 +02:00
Jouni Malinen 2cdd91d8b1 tests: Verify sharing and unsharing of ANQP results
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:44 +02:00
Jouni Malinen 8175854e6e tests: Use shorter Interworking element for larger coverage
Since the venue information in the Interworking element is optional,
include both the cases of it included and not included in the test
cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:44 +02:00
Jouni Malinen 0589f40146 tests: Use a single channel scan to avoid unnecessary full scans
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:44 +02:00
Jouni Malinen 715bf904ff tests: Verify Interworking Probe Request filtering
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 13:37:06 +02:00
Jouni Malinen f4bfa2d27f tests: Allow gcov to be used when running test cases within vm
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 13:37:06 +02:00
Jouni Malinen 0eff1ab3cb tests: Add test cases for various ciphers
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-25 11:17:32 +02:00
Jouni Malinen 65249f6c4a tests: Verify QoS Mapping results in Data frames
This verifies that IP packets with various DSCP values are mapped to the
correct TID both with default mapping and with custom QoS mappings.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-24 20:21:58 +02:00
Johannes Berg 625188e5bf hwsim tests: Handle regdomain requests in vm scripts
In order to handle regulatory domain requests, crda needs to be
installed on the host, but we also need to install a uevent helper in
the VM so that it gets executed (since we don't run udev).

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
2013-12-24 06:49:57 +02:00
Jouni Malinen 3208c3e970 tests: Add QoS Map test case
This verifies that QoS Map configuration and update can be completed.
Actual QoS mapping for Data frames within mac80211/cfg80211 is not yet
verified.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-12-23 13:50:54 +02:00
Johannes Berg 667a158d08 tests: VM test script: Copy gcov data if present
If there's code coverage analysis data, copy it out of the VM
to be able to analyse it later. Also add a description to the
README file about how to use it.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
2013-12-07 17:45:12 -08:00
Jouni Malinen 50acc38469 tests: Remove special start.sh option for concurrent P2P tests
These were not really used in practice and better quality test cases for
concurrent P2P operations are now available in tests_p2p_concurrency.py
using the standard test framework design. Remove the special concurrent
option for start.sh and the run-all.sh concurrent and
concurrent-valgrind operations to clean up scripts.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-24 21:20:15 +02:00
Jouni Malinen 41af1305d7 tests: Add test cases for concurrent P2P operations
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-24 21:20:15 +02:00
Jouni Malinen 19ae1d0788 tests: Verify P2P operations with a separate group interface
This extends P2P test coverage to include the case of separate group
interface use with autonomous GO and group formation through GO
negotiation.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-24 15:32:52 +02:00
Jouni Malinen 01370f49a6 tests: Verify that re-invoked P2P group is identified as persistent
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-21 11:39:12 +02:00
Johannes Berg 8c30ab492c hwsim tests: Check kernel messages for lockdep complaints
Lockdep complaints are never good, so check for them in the
kernel messages, not just for warnings and bugs.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
2013-11-20 16:39:24 +02:00
Jouni Malinen 848bb8dea9 tests: Use per-test case log/capture file from wlantest
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-17 21:47:06 +02:00
Jouni Malinen 393e90191e tests: Verify GO channel switch behavior
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-17 17:46:23 +02:00
Johannes Berg a572f0b960 hwsim tests: Print failed tests nicer
There's no reason to format the failed tests as a python
list, just print a (space-separated) list of test names.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
2013-11-17 16:46:41 +02:00
Jouni Malinen 0c9057970b tests: Do not override existing .config from build.sh
This allows the build.sh script to be used to rebuild binaries based on
existing configuration in addition to the initial case of preparing
suitable build configuration.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-09 15:40:06 +02:00
Jouni Malinen b4b89ae3aa tests: Remove duplicated mkdir for LOGDIR
LOGDIR directory is created automatically if LOGDIR variable was not
set. If the variable is set, that directory is expected to exist.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-09 15:34:29 +02:00
Michal Kazior d65a593b1e tests: Use proper admin group in start.sh
wpa_supplicant configuration files had a hardcoded GROUP=admin. The
start.sh script failed on a system without admin group (some systems
have it named adm).

Generate configuration files with appropriate GROUP in the log dir
and use them.

Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
2013-11-09 15:31:35 +02:00
Jouni Malinen 483691bd73 tests: Verify GAS query while associated
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-08 00:41:58 +02:00
Jouni Malinen 836a374566 tests: Verify GAS fragmentation
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-08 00:22:33 +02:00
Jouni Malinen 469f5f3c93 tests: Use only new scan results for Hotspot 2.0 test cases
It looks like old scan results (different SSID for the same BSSID) could
cause test failures.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-08 00:22:33 +02:00
Johannes Berg 4ecf11c559 hwsim tests: Make channel configuration for VM tests easier
Add a CHANNELS configuration to the script running the VM
that can be added to the vm-config file to allow running
the tests with hwsim devices supporting more than a single
channel.

Eventually, with the (hopefully) upcoming dynamic work in
mac80211_hwsim, this might go away entirely, but for now
this allows testing more code paths.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
2013-11-07 14:01:06 +02:00
Jouni Malinen b4264f8f67 tests: Verify disallow_aps with Interworking
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-07 00:12:30 +02:00
Jouni Malinen 6a0b400273 tests: Verify no-duplicate-networks with Interworking connection
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-07 00:12:30 +02:00
Jouni Malinen dd6f538ea5 tests: Verify BSS additional/removal during HT co-ex scan
This verifies that hostapd can add and remove a secondary BSS
during an ongoing HT co-ex scan.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-06 15:52:40 +02:00
Jouni Malinen 742117ad88 tests: BSS removal during ongoing HT or ACS scan
These verify that hostapd is able to remove a BSS while the radio is
still in the progress of the initial channel parameter determination.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-06 01:11:25 +02:00
Jouni Malinen a364852be8 tests: Adjust BSS add/remove test cases for primary BSS constraint
Since removal of the primary BSS is now going to remove all the BSSs
for a radio, these two test cases need changes to not trigger false
failures.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-06 01:08:54 +02:00
Jouni Malinen 66f0bdb465 tests: Handle hostapd dying more gracefully
Catch exceptions from operations that try to remove hostapd interface
and rename the log file. If these operations fail due to socket
connection issues, hostapd has likely died or gotten stuck somewhere.
Report the test case as a failure and stop test run cleanly.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-05 13:21:58 +02:00
Johannes Berg 5061a301e5 hwsim tests: Check kernel messages for warnings/bugs
When a test passes but the kernel printed warnings, consider
the test to have failed.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
2013-11-05 10:17:35 +02:00
Jouni Malinen d355372ce4 tests: HS 2.0 excluded SSID
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-04 14:48:33 +02:00
Jouni Malinen d1ba402fe5 tests: HS 2.0 required roaming consortium
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-04 14:48:28 +02:00
Jouni Malinen 2232edf8e2 tests: Use dictionary as add_cred_values() parameter
This makes it more convenient to use this function for cases that modify
credential parameters.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-04 13:12:34 +02:00
Jouni Malinen 5c5656c37a tests: Do not require hlr_auc_gw for HS 2.0 username/password
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-04 13:12:28 +02:00
Jouni Malinen 8454e1fd33 tests: Add preliminary version of DFS test cases
These are still disabled by default since they require mac80211_hwsim
changes that are not yet in the upstream kernel and because the test
cases do not fully work yet. Anyway, they are quite convenient for
development use, so good to have them available in the main repository.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-03 21:57:39 +02:00
Jouni Malinen 1b3926ef73 tests: Add a test case for HT40 co-ex scan
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-03 21:30:31 +02:00
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>
2013-11-03 21:30:31 +02:00
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>
2013-11-03 20:20:50 +02:00
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>
2013-11-03 19:51:06 +02:00
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>
2013-11-03 19:51:06 +02:00
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>
2013-11-03 11:31:48 +02:00
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>
2013-11-03 11:31:48 +02:00
Jouni Malinen 1640a2e424 tests: Add test cases for SAE
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-03 11:31:48 +02:00
Jouni Malinen f5f59e4f57 tests: Clean up output formatting with str.format()
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-02 17:07:13 +02:00
Jouni Malinen bafd8bfa57 tests: Remove trailing whitespace
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-02 15:40:36 +02:00
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>
2013-11-02 15:39:25 +02:00
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>
2013-11-02 13:53:23 +02:00
Jouni Malinen 57661377df tests: Use a helper function to rename wpa_supplicant/hostapd logs
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-02 13:04:06 +02:00
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>
2013-11-02 12:20:59 +02:00
Jouni Malinen 75428961d9 tests: Split hostapd debug log into per test case files
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-02 11:53:38 +02:00
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>
2013-11-02 11:27:16 +02:00
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>
2013-11-02 11:22:16 +02:00
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>
2013-11-02 10:30:37 +02:00
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>
2013-11-02 10:17:46 +02:00
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>
2013-11-02 10:17:44 +02:00
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>
2013-11-02 10:16:28 +02:00
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>
2013-11-02 10:03:14 +02:00
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>
2013-11-02 10:01:09 +02:00
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>
2013-10-31 23:04:50 +02:00
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>
2013-10-31 14:39:09 +02:00
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>
2013-10-31 14:36:26 +02:00
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>
2013-10-31 14:27:57 +02:00
Jouni Malinen 353e5067ff tests: Split wpa_supplicant debug logs into per test case files
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-10-31 13:19:38 +02:00
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>
2013-10-31 12:51:08 +02:00
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>
2013-10-31 11:49:58 +02:00
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>
2013-10-31 11:43:45 +02:00
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>
2013-10-31 11:35:02 +02:00
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>
2013-10-31 11:26:52 +02:00
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>
2013-10-31 11:08:16 +02:00
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>
2013-10-31 11:08:16 +02:00
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>
2013-10-31 11:08:16 +02:00
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>
2013-10-31 11:08:16 +02:00
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>
2013-10-31 11:08:16 +02:00
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>
2013-10-31 11:08:16 +02:00