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
9f22db6df8
emulator/bthost: Remove double lookup with bthost_find_l2cap_cb_by_psm
2013-12-20 09:37:00 +02:00
Johan Hedberg
2fe0179189
emulator/bthost: Make bthost_add_l2cap_conn return the added struct for convenience
2013-12-20 09:35:33 +02:00
Marcin Kraglak
75c50937fe
emulator: Add new method for adding l2cap server
...
This method allow user to add l2cap server and register
connect callback. If no callback is specified, it will behave
like bthost_set_server_psm() method.
2013-12-20 09:32:16 +02:00
Luiz Augusto von Dentz
6b0038ef55
android/A2DP: Fix disconnecting after AVDTP session creation
...
Once the connection is handover to AVDTP code the GIOChannel can be
unref but it should not close the connection.
2013-12-20 09:26:54 +02:00
Luiz Augusto von Dentz
9d893d60a9
android/AVDTP: Add avdtp_shutdown
...
avdtp_shutdown can be used to disconnect closing all existing stream
properly.
2013-12-20 09:26:54 +02:00
Luiz Augusto von Dentz
c9f7f76c2c
android/A2DP: Use avdtp_add_disconnect_cb to cleanup on disconnect
...
This replaces the use of g_io_add_watch with avdtp_add_disconnect_cb so
connection tracking stay within AVDTP code.
2013-12-20 09:26:54 +02:00
Luiz Augusto von Dentz
2621ba911f
android/AVDTP: Add avdtp_add_disconnect_cb and avdtp_remove_disconnect_cb
...
With these functions the user application can detect when the AVDTP has
been disconnected and cleanup properly.
2013-12-20 09:26:54 +02:00
Szymon Janc
ff43d507cd
android/bluetooth: Fix sending invalid RSSI device property
...
RSSI property is of int32_t type but int8_t was send in durring
remote devices discovery.
2013-12-19 22:19:25 +01:00
Jakub Tyszkowski
6fe056da22
android/tester: Add start device discovery done test case
...
This tests device discovery start being reported as done because of
ongoing discovery.
2013-12-19 16:40:10 +02:00
Jakub Tyszkowski
2d51debd6d
android/tester: Add device discovery cancel success test case
...
Test for successfull discovery canceling after it was started.
2013-12-19 16:40:01 +02:00
Jakub Tyszkowski
e3c51867d9
android/tester: Add stop device discovery done test case
...
Add test case for stopping device discovery when it wasn't started.
2013-12-19 16:39:50 +02:00
Jakub Tyszkowski
2a814c460c
android/tester: Add start device discovery success test case
...
Add test case for starting device discovery with success.
2013-12-19 16:39:43 +02:00
Jakub Tyszkowski
47b3dda804
android/tester: Fix bluetooth disable success test case
...
This fixes not checking for proper status on bluetooth disable.
2013-12-19 16:39:36 +02:00
Jakub Tyszkowski
1474f6cdfe
android/tester: Fix for not checking for BT_STATUS_SUCCESS
...
For BT_STATUS_SUCCESS no checks were done as it is 0 in bt_status_t
enum. Valid status for no status expected should be STATUS_NOT_EXPECTED.
2013-12-19 16:38:59 +02:00
Sebastian Chlad
478e2235c0
android/build: Add l2test to Android.mk
...
Enable l2test tool for the Android target.
2013-12-19 14:18:58 +01:00
Luiz Augusto von Dentz
f9762f5e53
audio/AVRCP: Fix check for values out of range in SetAbsoluteVolume
...
Volume is 7 bits since the 8 bit should be ignored as it is reserved it
should never be > 127. Futhermore the value passed to
media_transport_update_device_volume should be the stored in volume as
it ignores the reserved bits properly.
2013-12-19 15:08:56 +02:00
Sebastian Chlad
94b43b6463
android/pts: Add PICS, PIXITs and PTS for L2CAP
...
This allows better tracking of the current state of implementation
2013-12-19 13:52:10 +01:00
Marcin Kraglak
303acb8364
emulator: Add L2CAP PSM handling to bthost
...
Store the PSM of L2CAP connections. We retrieve the PSM from the
connection request frame.
2013-12-19 13:58:09 +02:00
Andrei Emeltchenko
94d49aa07e
android/socket: Handle Android events for server socket
...
Add watch for tracking events from Android framework for server socket.
Android might want to close server connection, in this case we close
our listening socket and cleaning up rfsock structure. Glib watch is
added with high priority to avoid races.
2013-12-19 11:08:22 +02:00
Andrei Emeltchenko
54468c7fbd
android/tester: Add Socket test close and listen
...
This test the situation when Android close file descriptor we passed to
it and try to listen() again.
2013-12-19 11:08:22 +02:00
Andrei Emeltchenko
402fef79e1
android/tester: Test that connect call returns channel number
...
The test connects to emulated bthost and read channel number
2013-12-19 11:08:22 +02:00
Andrei Emeltchenko
eaf5064375
android/socket: Connect directly to RFCOMM channel if uuid is zero
...
Check uuid and connect to specified RFCOMM channel directly if uuid is
zeroed.
2013-12-19 11:08:22 +02:00
Andrei Emeltchenko
b81374ec80
android/socket: Refactor connect to allow directly connect to rfcomm
...
Since Socket HAL allows us to specify RFCOMM channel number and directly
connect refactor send function to allow connect directly is uuid is zero
and channel number is specified.
2013-12-19 11:08:22 +02:00
Ravi kumar Veeramally
fe8dabaaa1
android/pan: Change local_role to NONE only when device list is empty
2013-12-19 10:11:14 +02:00
Ravi kumar Veeramally
f8a38f2f68
android/pan: Free device after sending diconnected notification
2013-12-19 10:10:25 +02:00
Luiz Augusto von Dentz
24fc2b639e
android/AVDTP: Fix not removing start_timer source
...
It is possible that stream->start_timer can be set on stream_free which
should then should take care of remove it properly otherwise it can
trigger which would very likely cause a crash.
Thanks to Hannu Mallat <hannu.mallat@jolla.com> for reporting it.
2013-12-18 14:53:34 +02:00
Grzegorz Kolodziejczyk
eb220d8d8b
android/tester: Add bluetooth HAL test case - name prefix
...
This add prefix for bluetooth HAL test case names. Bluetooth HAL test
cases now can be easily distinguished. Now Bluetooth HAL test cases
can be run separately.
2013-12-18 14:52:30 +02:00
Grzegorz Kolodziejczyk
394b243eca
android/tester: Move Bluetooth HAL functions before socket HAL
...
This patch move bluetooth HAL test functions before socket
HAL functions. This make it more readable for future test cases growth.
2013-12-18 14:52:11 +02:00
Johan Hedberg
08340f7fdb
android/tester: Fix expected_property_len value for bdname test
2013-12-18 12:39:01 +02:00
Johan Hedberg
27c4ddc3bd
android/tester: Fix whitespace wrt braces
2013-12-18 12:32:01 +02:00
Andrei Emeltchenko
1006b785ac
android/tester: Enable bthost after device is enabled
...
This puts bthost to connectible mode allowing us to use powered setup
for connect to emulated device.
2013-12-18 12:23:23 +02:00
Andrei Emeltchenko
0dc41e579d
android/tester: Check return status for enable()
...
Use check_expected_status helper for test for returned status in
enable() HAL call.
2013-12-18 12:23:17 +02:00
Andrei Emeltchenko
4a60ca797e
android/tester: Check status returned from HAL calls
...
In test setup phase check status returned from enable() call.
2013-12-18 12:23:14 +02:00
Grzegorz Kolodziejczyk
fa2450491e
android/tester: Add SERVICE_RECORD set prop fail test case
...
This adds SERVICE_RECORD set property fail test case due to only
get possibility.
2013-12-18 12:22:08 +02:00
Grzegorz Kolodziejczyk
7dcbb651cf
android/tester: Add RSSI set prop fail test case
...
This adds RSSI set property fail test case due to be only remote device
property.
2013-12-18 12:22:08 +02:00
Grzegorz Kolodziejczyk
a326f43754
android/tester: Add TOD set prop fail test case
...
This adds TYPE_OF_DEVICE set property fail test case due to only
get possibility.
2013-12-18 12:22:08 +02:00
Grzegorz Kolodziejczyk
0ce90dca34
android/tester: Add COD set prop fail test case
...
This adds CLASS_OF_DEVICE set property fail test case due to only
get possibility.
2013-12-18 12:22:08 +02:00
Grzegorz Kolodziejczyk
82a12efec1
android/tester: Add UUIDS set prop fail test case
...
This adds UUIDS set property fail test case due to only get
possibility.
2013-12-18 12:22:08 +02:00
Luiz Augusto von Dentz
d853443954
unit/AVDTP: Add /TP/SIG/FRA/BV-02-C test
...
Verify ithat the IUT (SNK) is able to receive streaming media data on an
established stream.
2013-12-18 12:17:00 +02:00
Luiz Augusto von Dentz
1a564b5b2b
unit/AVDTP: Add /TP/SIG/FRA/BV-01-C test
...
Verify that the IUT (INT and ACP) fragments the signaling messages that
cannot fit in a single L2CAP packet.
2013-12-18 12:17:00 +02:00
Andrei Emeltchenko
efe7bd03fa
android/tester: Fix not returning in failure
2013-12-18 10:41:31 +02:00
Szymon Janc
9a706710e4
bluetooth/hidhost: Fix using feature event as output event
...
Rename handle_uhid_event to handle_uhid_output and make it handle only
output events.
2013-12-18 10:01:30 +02:00
Grzegorz Kolodziejczyk
004ea08953
android/tester: Check adapter cb irrespective of receiving order
...
This patch change checking of expected callbacks from static order to
dynamic. For example properties can be received in different order
than now.
2013-12-18 09:54:28 +02:00