3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-18 10:19:24 +01:00
Commit Graph

196 Commits

Author SHA1 Message Date
James Prestwood
2ec66c9d3f test-runner: fixed garbage output in test results
When printing test results the line separators were not NULL terminated
causing garbage bytes to be printed at the end.
2018-12-17 11:17:34 -06:00
James Prestwood
dd835aba2e test-runner: fix removal of SIM/AKA/AKA' files
If ofono/phonesim is not found on the system, any test requiring those will
be skipped. In this case we would still try and remove symlinks that were
never created. An error would be printed, but the actual source tree files
were getting removed. This adds a new goto label where we can skip the tmpfs
removal in this error case.
2018-12-05 22:24:08 -06:00
Andrew Zaborowski
862707f943 test-runner: Add dbus verbose output options
-v dbus may help debug find client authentication problems but if
everything is ok it will not print any messages.  -v dbus-monitor starts
the dbus-monitor.
2018-11-30 10:26:30 -06:00
Tim Kourt
2cc4fdbf45 t-runner: Add verbosity option for TLS debug 2018-11-02 15:54:32 -05:00
Denis Kenzior
a4512f3cd6 hwsim: Use l_genl_family_set_unicast_handler 2018-11-02 15:52:56 -05:00
Marcel Holtmann
554e4f55db build: Fix includes for using with -std=c99 compiler option 2018-11-01 22:37:11 +01:00
Marcel Holtmann
72a64fa7fb build: Adjust to the latest ELL signal API changes 2018-11-01 22:09:19 +01:00
Marcel Holtmann
2b36727f3a test-runner: Use l_main_run_with_signal instead of open coding it 2018-11-01 20:46:18 +01:00
Marcel Holtmann
36f5056810 hwsim: Use l_main_run_with_signal instead of open coding it 2018-11-01 19:58:34 +01:00
James Prestwood
a2df686d97 hwsim: limit "Unknown attribute type:" print
Since we don't catch all hwsim attribute types in unicast_handler
you see tons of "Unknown attribute type: X" prints. Since this is
not an error, we should only print if the attribute does not exist
in the attribute list.
2018-10-24 16:23:12 -05:00
James Prestwood
ceca5c42ba hwsim: update hwsim attrs to latest mac80211_hwsim 2018-10-24 16:23:12 -05:00
Marcel Holtmann
2606bc73ad build: Add DAEMON_ prefix to CONFIGDIR and STORAGEDIR 2018-09-14 17:58:44 +02:00
Marcel Holtmann
ea20559599 tools: Change net.connman.iwd.hwsim to net.connman.hwsim 2018-09-14 15:27:57 +02:00
Marcel Holtmann
502aac073f tools: Add configure option and D-Bus policy file for hwsim utility 2018-09-14 15:24:15 +02:00
Marcel Holtmann
b88388b172 hwsim: Fix missing handling of help option -h 2018-09-14 15:17:14 +02:00
Tim Kourt
83e66b5831 tools: add needed CONFIG_SECURITYFS option
Add CONFIG_SECURITYFS as a required configuration option
for the kernels to be used with test-runner.
2018-09-13 16:42:23 -05:00
Mat Martineau
27e9b6c435 tools: Remove unused kernel config
CONFIG_DRIVER_NL80211 isn't an option for the kernel. Maybe it was
mistakenly added based on the hostap configuration instructions in
doc/test-runner.txt

If the intent was to add CONFIG_CFG80211 and CONFIG_MAC80211, they're
already in the relevant kernel defconfigs.
2018-06-19 16:06:08 -05:00
Denis Kenzior
e15caa2288 test-runner: Fix kernel command line parsing
Kernel command line arguments were not being parsed properly, $PATH in
particular was completely screwed up and causing commands in user's
$PATH to fail
2018-06-14 15:19:50 -05:00
James Prestwood
16a2fb2664 test-runner: added CONFIG_NLMON to kernel config 2018-05-24 19:42:19 -05:00
Andrew Zaborowski
465488878e hwsim: Look up radio address in radio_info
In mac80211_hwsim each radio is assigned two addresses, the second (addr
1) being used over nl80211.  In SendFrame we'd hardcode the mapping of
address 0 to address 1 even though we track all the addresses in radio_info,
so instead use that data to find the radio that has given address 0.  Also
if no address 0 matches what was supplied over DBus try to find a matching
address 1.

There are ways userspace can request different addresses when managing
mac80211_hwsim radios and the hardcoded mapping would become wrong.
2018-05-22 11:35:57 -05:00
Andrew Zaborowski
676a1f48c3 hwsim: Don't crash if source radio not found
We already print an error when this happens, no need to crash.
2018-05-22 11:35:05 -05:00
James Prestwood
23b9963b20 test-runner: fix iwd verbosity
Specifying --verbose iwd will now enable the -d flag for IWD
2018-05-21 17:49:01 -05:00
Denis Kenzior
d13f10c111 test-runner: Add hwsim to --gdb support 2018-05-21 17:33:45 -05:00
Tim Kourt
79ce3f645f t-runner: init stat totals
the stat_totals structure was not initialized and produced
a garbage output when printed
2018-05-10 18:58:13 -05:00
Mat Martineau
9252d23358 test-runner: Use l_strdup_printf to combine strings
There's a new "-Werror=format-overflow" warning in gcc 8 that detects
potential overflow or truncation with sprintf/snprintf, so the
test-runner build fails with gcc 8. Using l_strdup_printf allows the
build to succeed, and moves a few large buffers from the stack to the
heap.
2018-05-09 20:41:51 -05:00
James Prestwood
aed98137fb test-runner: set env flag if valgrind is being used
If the hw.conf option 'start_iwd' is false, then iwd is started
inside the python test, which means it will not know if the
--valgrind option was passed to test runner. If this is the case
an environment variable is set so the python test knows the
option is being used.
2018-04-27 11:21:33 -05:00
James Prestwood
eaf93de0fa test-runner: enable verbose output for kernel
This was mistakenly removed. This allows you to use "-v kernel"
2018-04-24 14:55:39 -05:00
James Prestwood
f67505c5df test-runner: fix warning in gdb patch 2018-04-03 15:34:51 -05:00
James Prestwood
461b39f206 test-runner: add feature to debug processes with gdb
Specifying the --gdb <process> option to test runner will run gbd on
the given process. Using this option will turn off all timeouts in
test-runner.
2018-04-02 12:49:09 -05:00
Andrew Zaborowski
90366ba0c4 test-runner: Kill hwsim after failed hostapd setup
Without this subsequent tests may be affected by hwsim not being
restarted.

Additionally in 4.13 the kernel will not use the registered hwsim
wmedium for wiphys created after the HWSIM_CMD_REGISTER call and
there's no way to re-register it without disconnecting from netlink
which is a bit of work.  It's a one line fix in 4.13, I've not yet
checked if this has changed in current git.
2018-03-21 14:25:30 -05:00
Andrew Zaborowski
4a7e228da8 test-runner: Run all APs as one hostapd instance
When running multiple BSSes in one ESS this solves the communication
between them (called RRB) for purposes like preauthentication,
FT key pull and push and FT-over-DS without complicated bridges.  At the
same time we're unlikely to have a scenario where we need the
communication to fail so there's no need for this to be configurable.

The supporting code for multiple hostapd processes is left in place so
that configure_hostapd_instances can decide how many processes to run
based on hw.conf and policies.  start_hostapd now uses "-i wln0,..."
which is no longer documented in hostapd manual page or usage() but
still supported in current git and required if interface names are not
provided in the config files (possibly unless -b is used which is also
undocumented.)
2018-03-21 14:25:11 -05:00
Tim Kourt
0afdd64db5 t-runner: refactor logic for output hiding 2018-02-07 11:33:23 -06:00
Tim Kourt
290f4e24d4 t-runner: fix 'new line' usage for non-verbose mode 2018-02-07 11:33:19 -06:00
James Prestwood
fc9fe34ba0 test-runner: remove unneeded argument parsing
There was an unnecessary l_strsplit call when parsing the verbose
options for test-runner. The verbose options get parsed inside
qemu already, so this call was removed.
2018-02-02 14:38:23 -06:00
James Prestwood
bcf9ec5922 tools: add valgrind option to test-runner
Can now pass -V, --valgrind to test-runner to run valgrind on
iwd during autotests. Note: the verbose option for iwd must
also be passed in order to see output (-v iwd).
2018-02-01 13:21:55 -06:00
James Prestwood
d25e88cd8d t-runner: Fixed crash
test-runner would segfault if no verbose option was passed.
2018-02-01 10:30:48 -06:00
Denis Kenzior
17f55f3b4a hwsim: Fix leak of send_frame_info->user_data
In case the genl object is cleaned up prior to the callback being
called, the DBus message might get leaked.  Can only happen in bizarre
cases.
2018-01-30 23:03:07 -06:00
James Prestwood
f22ec55efb hwsim: add spoofing frame support
Added a new method SendFrame() under the radios .Interface
interface. This method takes two byte arrays as parameters,
first is the station address to send the frame to, and the
second is the raw frame data.
2018-01-30 22:59:32 -06:00
James Prestwood
20fc857afd test-runner: added more verbosity options
The following verbose options can be used:

"unit" - see output from unit tests
"kernel" - see hwsim kernel prints
"pytests" - see prints from python autotests
2018-01-24 17:07:43 -06:00
James Prestwood
802a8f86ff test-runner: make verbose option -v application specific
The existing verbose option would turn on debug logging for most
processes in the test-runner framework. This change makes the verbose
option more granular. The --verbose or -v option should now be
followed by a comma separated list of the test-runner processes you
want to see debug logging from. Currently iwd, hwsim, ofonod, and
hostapd are valid options to pass to the verbose flag e.g.

-v iwd,hwsim,ofonod,hostapd

Or any single/combination of the above applications.
2018-01-24 11:17:30 -06:00
Denis Kenzior
d98349d201 tools: Remove unused kernel config
CONFIG_CRYPTO_USER_API_AKCIPHER was superceded by the keys API and not
actually used now.
2018-01-22 10:27:50 -06:00
Mat Martineau
9ea0063eb9 tools: Add SHA512 to kernel config
This hash algorithm is used by the ELL unit tests.
2018-01-19 12:50:05 -06:00
James Prestwood
d175e4aa42 test-runner: add ofono/phonesim to test-runner
A new option 'sim_keys' can be put in the SETUP group. If
sim_keys=ofono, then test-runner will attempt to start ofono
and phonesim to be used with EAP-SIM/AKA. If ofono OR phonesim
are not found the test will be skipped.

Any other value of 'sim_keys' should be a 'keys' file
e.g. /tmp/sim_keys.conf which should contain hardcoded
SIM/AKA key values.
2017-12-14 17:46:46 -06:00
Tim Kourt
f6ae59e48e tools: add DES cipher algorithm support 2017-10-31 16:53:00 -05:00
Andrew Zaborowski
a7ee2c428a hwsim: Use util_is_broadcast_address
Replace is_multicast_addr with util_is_broadcast_address usage.
is_multicast_addr seems to have been wrong, first because we're not
interested in just any multicast address (defined to be same as "group
address"), but rather specifically the broadcast address, as we don't
know of any specific address groups other than broadcast.  And also
wrong because the "Individual/Group bit" is the LSB of byte 0, not the
MSB of byte 0 apparently.
2017-09-22 10:09:01 -05:00
Andrew Zaborowski
c8854d9a4c hwsim: Use new mpdu.h structs 2017-08-31 15:13:09 -05:00
Marcel Holtmann
c0a77f32c1 test-runner: Add support for Qemu on PowerPC 32-bit and 64-bit 2017-08-30 14:25:03 -07:00
Andrew Zaborowski
bf86081eba hwsim: Add Rule.Drop property
Add a way to have matching packets dropped by the hwsim medium.
2017-08-23 13:26:58 -05:00
Marcel Holtmann
45e4626d80 test-runner: Add support for Qemu on ARM 32-bit and 64-bit 2017-08-08 00:00:59 -07:00
Mat Martineau
21fae3d1d9 test-runner: Avoid intermediate string in number conversion
Derive a floating-point interval value from integers using math rather
than integer->string->float conversion. The string technique triggered a
-Wformat-overflow warning.
2017-07-11 16:34:52 -07:00