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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
./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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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).
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.
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.