Commit Graph

1785 Commits

Author SHA1 Message Date
Johan Hedberg
6038dad985 tools/l2cap-tester: Add support for specifying security level 2014-01-20 13:14:28 +02:00
Johan Hedberg
a28de5e990 tools/mgmt-tester: Add some SSP Pairing Acceptor test cases 2014-01-20 11:27:11 +02:00
Johan Hedberg
bfe073141d tools/mgmt-tester: Add some Link Security Pairing Acceptor test cases 2014-01-20 11:10:24 +02:00
Johan Hedberg
472cc0a910 tools/rfcomm-tester: Clean up coding style 2014-01-16 12:23:16 +02:00
Johan Hedberg
dda90d0739 tools/rfcomm-tester: Don't enable SSP (as it's not necessary) 2014-01-16 12:23:15 +02:00
Johan Hedberg
809b0c2462 tools/rfcomm-tester: Only BR/EDR is relevant for RFCOMM 2014-01-16 12:23:15 +02:00
Johan Hedberg
33dcb461da tools/rfcomm-tester: Update callback to match new API 2014-01-16 12:23:15 +02:00
Marcin Kraglak
5574590647 tools/rfcomm-tester: Add RFCOMM server negative test case
This test case create RFCOMM server and reject incoming connection
from bthost.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
b0fee95e07 tools/rfcomm-tester: Add RFCOMM server test case
This test case create RFCOMM server and accept incoming connection from
client bthost.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
96283b9a5b tools/rfcomm-tester: Add Connection refused client test case
This will test RFCOMM client connection to wrong server channel.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
292cd05057 tools/rfcomm-tester: Implement client test case
This will test RFCOMM client connection.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
9b36ebbd23 tools/rfcomm-tester: Add basic rfcomm test case
This test case verifies creating rfcomm socket.
2014-01-16 12:23:15 +02:00
Marcin Kraglak
11bd593fd7 tools/rfcomm-tester: Initial version of rfcomm-tester
Add rfcomm-tester to tree.
2014-01-16 12:23:15 +02:00
Marcel Holtmann
81294e5f5a tools: Remove --smd option from proxy utility 2014-01-16 00:27:30 -08:00
Johan Hedberg
5b3860aac1 tools/mgmt-tester: Add auth failure mgmt event to pair_device test conditions 2014-01-15 15:28:09 +02:00
Johan Hedberg
21acd8257b tools/mgmt-tester: Add new link key mgmt event to pair_device test conditions 2014-01-15 15:28:09 +02:00
Johan Hedberg
10f21eb69f tools/mgmt-tester: Add basic pairing acceptor failure test 2014-01-15 15:21:29 +02:00
Johan Hedberg
120d0577b6 tools/mgmt-tester: Wait for link key event in pairing acceptor test 2014-01-15 15:21:29 +02:00
Johan Hedberg
b2c6b75fbf tools/mgmt-tester: Allow checking for mgmt events in pairing acceptor tests 2014-01-15 15:21:29 +02:00
Johan Hedberg
0d350f379f tools/mgmt-tester: Make expected mgmt event content checking optional 2014-01-15 15:21:29 +02:00
Johan Hedberg
fa8aa7b269 tools/mgmt-tester: Add simple pairing acceptor test case 2014-01-15 14:48:37 +02:00
Johan Hedberg
3b7d6cae7b tools/mgmt-tester: Include PIN callback as a necessary test condition 2014-01-15 14:48:12 +02:00
Johan Hedberg
126be2509f tools/mgmt-tester: Fix BR/EDR disable callback if it's the last setting changed 2014-01-15 12:27:30 +02:00
Marcel Holtmann
c99f14615e tools: Do not modify the available features 2014-01-14 13:43:12 -08:00
Andrei Emeltchenko
6edaf7105e l2test: Use correct buffer size 2014-01-14 13:25:21 +02:00
Andrei Emeltchenko
605739bdb5 scotest: Use correct buffer size 2014-01-14 13:25:21 +02:00
Johan Hedberg
4110e841dd tools/l2cap-tester: Add server side security block test case
Note that this test will currently fail part of the time due to a race
on the kernel side. This is because the kernel doesn't wait for remote
feature resolution before processing incoming L2CAP signaling packets.
2014-01-14 13:19:22 +02:00
Marcel Holtmann
6f10ace263 tools: Add support activating/deactivating traces 2014-01-14 03:14:38 -08:00
Johan Hedberg
fd25d1adb6 tools/l2cap-tester: Add two more Invalid PSM client tests for PSM 1 2014-01-14 10:00:45 +02:00
Marcel Holtmann
5bf4196468 shared: Add address and features configuration support 2014-01-13 22:57:14 -08:00
Marcel Holtmann
54b9036ef9 tools: Add Bluemoon configuration utility 2014-01-13 20:57:10 -08:00
Johan Hedberg
d31e9cf074 tools/mgmt-tester: Add basic non-pairable SSP test case 2014-01-13 17:00:31 +02:00
Johan Hedberg
c5e027cc26 tools/l2cap-tester: Add basic L2CAP client test with SSP enabled 2014-01-13 16:32:40 +02:00
Johan Hedberg
9e02000353 tools/l2cap-tester: Fix missing pairable setting enabling 2014-01-13 16:32:40 +02:00
Johan Hedberg
b2afb99935 tools/l2cap-tester: Add support for enabling SSP for tests 2014-01-13 16:32:39 +02:00
Johan Hedberg
b976acfe9a tools/mgmt-tester: Add Security Mode 3 rejection test cases 2014-01-13 14:38:59 +02:00
Johan Hedberg
180e202c1a tools/mgmt-tester: Add basic SSP rejection test cases 2014-01-13 14:32:26 +02:00
Johan Hedberg
e8f2389065 tools/mgmt-tester: Add remote PIN rejection test case 2014-01-13 14:00:14 +02:00
Johan Hedberg
aa7df805bf tools/mgmt-tester: Add basic PIN code rejection test case 2014-01-13 13:58:27 +02:00
Johan Hedberg
889221acac tools/mgmt-tester: Separate client (bthost) pairing parameters 2014-01-13 13:35:58 +02:00
Johan Hedberg
b42e5fcbf8 tools/mgmt-tester: Add basinc User Confirmation SSP test case 2014-01-13 13:24:17 +02:00
Sebastian Chlad
1d7c6a807d tools/bluetooth-player: check path validity
Bluetooth-player change-folder cmd approves any argument however it
can be and then should a valid path only. Failing in providing
a valid path crashes bluetooth-player thus argument should be
checked if it's a valid path.
2014-01-13 12:12:59 +02:00
Marcel Holtmann
20016a169c tools: Add first controller test case from HCI test specification 2014-01-13 00:52:30 -08:00
Szymon Janc
5ba9b51e8c tools: Stop converting file if write failed in seq2bseq
If write failed converted file would be broken. This make sure that
user is being informed about it.
2014-01-13 10:48:11 +02:00
Szymon Janc
3dc5c7866b tools: Fix build error in seq2bseq
Don't ignore return value of write. This fix following build error on
Ubuntu:

tools/seq2bseq.c: In function ‘convert_line’:
tools/seq2bseq.c:52:8: error: ignoring return value of ‘write’,
     declared with attribute warn_unused_result [-Werror=unused-result]
   write(fd, &val, 1);
2014-01-13 10:47:36 +02:00
Andrei Emeltchenko
37d5f0be31 tools/btproxy: Fix double close
setup_streams() already makes close()
2014-01-13 10:41:59 +02:00
Marcel Holtmann
138f1386c4 tools: Add test case for creating HCI connections 2014-01-12 19:46:06 -08:00
Marcel Holtmann
4e8ff0b5c8 tools: Check status of HCI Inquiry Complete event 2014-01-12 17:31:32 -08:00
Marcel Holtmann
b39f74c2d8 tools: Add simple Limited Inquiry test case to HCI testing 2014-01-12 17:28:31 -08:00
Marcel Holtmann
9e6322ab7b tools: Add informational HCI commands to test coverage 2014-01-12 16:42:46 -08:00
Marcel Holtmann
7ba4515fb6 tools: Add skeleton for HCI controller testing 2014-01-12 16:00:47 -08:00
Marcel Holtmann
d94debd256 tools: Remove GLib mainloop requirement from btmgmt utility 2014-01-12 02:23:01 -08:00
Marcel Holtmann
505693c878 tools: Change MSBC into mSBC for test case descriptions 2014-01-11 20:21:40 -08:00
Marcel Holtmann
b17127349f tools: Add management test cases for secure connections support 2014-01-11 20:12:50 -08:00
Marcel Holtmann
67269189ca tools: Add support for setting Secure Connection Only mode 2014-01-11 16:02:48 -08:00
Marcel Holtmann
fc217fc53f tools: Add firmware conversion utility 2014-01-11 00:50:41 -08:00
Marcel Holtmann
267247507b tools: Make use of generic endian conversion macros 2014-01-10 13:06:08 -08:00
Johan Hedberg
64488fbf77 tools/mgmt-tester: Add basic SSP test case 2014-01-10 16:05:09 +02:00
Johan Hedberg
7a01a6d36d tools/mgmt-tester: Add support for enabling client side SSP 2014-01-10 16:05:06 +02:00
Johan Hedberg
427df23bb2 tools/mgmt-tester: Add support for runtime based HCI data checks 2014-01-10 16:05:05 +02:00
Marcel Holtmann
ca1cb143d8 tools: Show results for local OOB extended data 2014-01-09 19:53:59 -08:00
Marcel Holtmann
6df84c66e9 tools: Account for kernel with secure connections support in mgmt-tester 2014-01-09 19:48:59 -08:00
Marcel Holtmann
ce827ffc71 tools: Add support for enabling secure connections support 2014-01-09 19:47:24 -08:00
Marcel Holtmann
86275d6304 tools: Add support for reading local OOB data from mgmt interface 2014-01-09 19:39:59 -08:00
Andrei Emeltchenko
5415f0b8c1 l2test: Fix using incorrect size of option
Use size of option instead of size of pointer
2014-01-09 18:22:55 +02:00
Andrei Emeltchenko
68f9701922 hcidump: Fix missing break 2014-01-09 18:22:55 +02:00
Johan Hedberg
cff3015e5a tools/mgmt-tester: Name Pair Device tests more descriptively 2014-01-09 15:11:16 +02:00
Johan Hedberg
a54f12fd15 tools/mgmt-tester: Add basic security mode 3 test case 2014-01-09 14:51:51 +02:00
Johan Hedberg
8a5b3e7ff4 tools/mgmt-tester: Fix potential NULL pointer dereference 2014-01-08 17:25:28 +02:00
Johan Hedberg
d7fdc9d059 emulator: Set bthost PIN Code when specified by test case 2014-01-08 16:37:34 +02:00
Johan Hedberg
438094e0b6 tools/mgmt-tester: Add basic support for responding to mgmt PIN Code requests 2014-01-08 16:37:34 +02:00
Johan Hedberg
67dbb5058c tools/mgmt-tester: Add basic Pair Device success test 2014-01-08 16:37:32 +02:00
Johan Hedberg
d07ec5fde1 tools/mgmt-tester: Add support for runtime determined send/expect data 2014-01-08 16:37:32 +02:00
Johan Hedberg
0a365d9e83 tools/mgmt-tester: Always set the bthost side to discoverable & connectable 2014-01-08 16:37:31 +02:00
Anderson Lizardo
ff0afe7b7f tools: Fix possible uninitialized variable in obexctl
On set_default_session(), if g_dbus_proxy_get_property() returns FALSE,
desc will be uninitialized. Given that this function already checks for
NULL proxy internally, it is enough to check whether it fails (and if
so, set a default prompt without destination).

Fixes this clang error:

tools/obexctl.c:439:6: error: variable 'desc' is used uninitialized
whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
2014-01-06 21:21:35 +02:00
Anderson Lizardo
57207bf438 tools: Fix unaligned memory access on smp-tester
Fixes clang errors like:

tools/smp-tester.c:263:11: error: cast from 'uint8_t *' (aka 'unsigned
char *') to 'u128 *' increases required alignment from 1 to 8
[-Werror,-Wcast-align]
2014-01-06 21:21:22 +02:00
Anderson Lizardo
76f3c751ed tools: Fix strncat() usage in hciconfig/hcitool
According to strncat() manpage:

"If src contains n or more characters, strncat() writes n+1 characters
to dest (n from src plus the terminating null byte).  Therefore, the
size of dest must be at least strlen(dest)+n+1"

While the current usage of strncat() cannot cause an overflow, if a
bigger string is added to the switch()'s without increasing the static
buffer, it would overflow by one byte due to the incorrect size
calculation.

Fixes clang errors like:

tools/hciconfig.c:827:33: error: the value of the size argument in
'strncat' is too large, might lead to a buffer overflow
[-Werror,-Wstrncat-size]
2014-01-06 21:20:23 +02:00
Marcel Holtmann
4b31ab4e37 tools: Allow using raw interface for 3DSP utility 2014-01-03 20:20:23 -08:00
Andrei Emeltchenko
74c0e1fed9 btproxy: Fix closing invalid file descriptor
Instead of invalid file descriptor dst_fd close src_fd.
2014-01-03 15:52:37 +02:00
Andrei Emeltchenko
9deb7158c0 btinfo: Add missing socket close() on exit 2014-01-03 15:51:13 +02:00
Marcel Holtmann
822d27806a tools: Add missing endian conversion 2014-01-01 22:23:05 -08:00
Marcel Holtmann
fbb5ab3f47 tools: Automatically powern on/off controller if needed 2014-01-01 22:14:48 -08:00
Marcel Holtmann
3a2df24e5d tools: Allow usage of raw device sockets for info utility 2014-01-01 21:23:16 -08:00
Marcel Holtmann
28a3044d61 tools: Use shared HCI code for information tool 2014-01-01 20:53:58 -08:00
Marcel Holtmann
b0ad16cf4d tools: Fix issue with too short packet length variable 2014-01-01 00:24:27 -08:00
Marcel Holtmann
f8c2b5e4e1 tools: Add support for proxying Qualcomm SMD based channels 2013-12-31 23:16:16 -08:00
Luiz Augusto von Dentz
afec6e365e tools/obexctl: Removes leading and trailing whitespace from commands
Leading and trailing whitespace shall be ignored
2013-12-31 13:38:37 +02:00
Sebastian Chlad
e8799bfd2d tools/bluetooth-player: Formatting commands
Formatting commands passed to bluetooth player.
Whitespace character trimmed.
2013-12-31 13:32:59 +02:00
Marcel Holtmann
98921e1bd5 tools: Add support for connecting to proxying servers 2013-12-30 23:35:23 -08:00
Marcel Holtmann
15097d34e1 monitor: Allow HCI controller proxying over TCP 2013-12-30 21:26:31 -08:00
Marcel Holtmann
43177237f7 tools: Add utility for proxying/forwarding HCI controllers 2013-12-30 20:50:03 -08:00
Marcel Holtmann
1f8fb96a65 tools: Check class of device value for 3D display 2013-12-29 15:24:48 -08:00
Marcel Holtmann
9116f11020 tools: Include disconnection event for 3D displays 2013-12-29 15:02:08 -08:00
Marcel Holtmann
e310672dd2 tools: Increase width for html2text conversion for long company names 2013-12-27 21:13:10 -08:00
Marcel Holtmann
78640291a9 tools: Add utility for testing 3D Sync Profile 2013-12-27 19:36:04 -08:00
Marcin Kraglak
85771054da tools/l2cap-tester: Remove not necessary bthost_set_server_psm
This function can be replaced with bthost_add_l2cap_server().
2013-12-20 13:02:31 +02:00
Marcin Kraglak
07cab19b2a tools/l2cap-tester: Fix memory leak
Set close_on_unref on new created GIOChannel and don't close
its file descriptor.

126 (120 direct, 6 indirect) bytes in 1 blocks aredefinitely
	lost in loss record 24 of 28
at 0x4A06409: malloc (in/usr/lib64/valgrind/vgpreload_memcheck
	-amd64-linux.so)
by 0x3C9564D88E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3C956881F4: g_io_channel_unix_new (in/usr/lib64/libglib-
	2.0.so.0.3600.3)
by 0x402A5A: l2cap_listen_cb (l2cap-tester.c:774)
by 0x3C95647DF5: g_main_context_dispatch (in/usr/lib64/
	libglib-2.0.so.0.3600.3)
by 0x3C95648147: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3C95648549: g_main_loop_run
	(in/usr/lib64/libglib-2.0.so.0.3600.3)
by 0x40A67C: tester_run (tester.c:784)
by 0x4026A9: main (l2cap-tester.c:991)
2013-12-20 12:19:15 +02:00
Johan Hedberg
845a7bdf82 tools/l2cap-tester: Fix checking for read() return values 2013-12-20 10:29:28 +02:00
Johan Hedberg
33eb51c937 tools/l2cap-tester: Fix checking for write() return values 2013-12-20 10:26:18 +02:00
Marcin Kraglak
a663775dbf tools/l2cap_tester: Add write server test case
These test case send data from local server to remote client.
2013-12-20 09:40:13 +02:00