Commit Graph

1668 Commits

Author SHA1 Message Date
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
Marcin Kraglak
89095eae05 tools/l2cap_tester: Add read server test case
This test checks data transfer from remote client to server.
2013-12-20 09:40:11 +02:00
Marcin Kraglak
120923cecd tools/l2cap_tester: Add write client test case
This test case write data from client to remote server.
2013-12-20 09:40:10 +02:00
Marcin Kraglak
1746f4f6c5 tools/l2cap_tester: Add read client test case
This test case send data from remote device to client.
It verifies if data is passed corerctly through L2CAP socket.
2013-12-20 09:40:08 +02:00
Johan Hedberg
de7ad8b451 tools/smp-tester: Prefer tester_warn() over fprintf 2013-12-17 13:00:16 +02:00
Andrei Emeltchenko
63840f3883 btmgmt: Remove unneeded code 2013-12-16 11:15:35 +02:00
Johan Hedberg
427f6eea4d btiotest: Add missing source type to bt_io_connect calls 2013-12-13 12:51:23 +02:00
Andrei Emeltchenko
e13bf62f66 l2cap-tester: Close sk in error path
This fixes resource leak warnings.
2013-12-12 09:57:08 +02:00
Andrei Emeltchenko
9bf453f9f1 tools/obex-server-tool: Fix checking incorrect error code
chdir return -1 if error and 0 in success.
2013-12-09 11:36:46 +02:00
Johan Hedberg
cf663b9f5a tools/l2test: Update to support new BT_SNDMTU/BT_RCVMTU socket options 2013-12-05 11:58:46 +02:00
Johan Hedberg
32b31f91b8 tools/l2test: Fix default LE PSM value
LE has different ranges for dynamic PSMs.
2013-12-01 19:36:16 +02:00
Johan Hedberg
44b3d5e480 tools/l2cap-server: Add basic LE Connect server test case 2013-12-01 19:18:23 +02:00
Johan Hedberg
3651a17f88 tools/l2cap-tester: Add basic LE client test cases 2013-12-01 19:18:23 +02:00
Johan Hedberg
9e08218d0f tools/smp-tester: Improve logging of received SMP PDUs 2013-11-29 15:12:49 +02:00
Johan Hedberg
1b69573571 tools/smp-tester: Minor whitespace fix 2013-11-29 15:09:25 +02:00
Johan Hedberg
31097ac39e tools/smp-tester: Unify SMP handler code for client and server tests 2013-11-29 15:06:39 +02:00
Johan Hedberg
10d860104b tools/smp-tester: Add support for generating the LTK 2013-11-29 14:12:02 +02:00
Johan Hedberg
ac2998a117 tools/smp-tester: Add expected Pairing Random packet to basic server test 2013-11-29 14:11:06 +02:00