summaryrefslogtreecommitdiff
path: root/android/tester-main.c
Commit message (Collapse)AuthorAgeFilesLines
* build: Replace use of g_memdup with util_memdupLuiz Augusto von Dentz2022-01-061-35/+42
| | | | | | | | | | | This replaces the uses of g_memdup with util_memdup since the former has been deprecated: warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead [-Wdeprecated-declarations] g_memdup2 requires bumping glib version which would likely have its own problems thus why util_memdup was introduced.
* emulator: Inclusive language changesArchie Pusaka2021-09-211-1/+1
| | | | | | | | BT core spec 5.3 promotes the usage of inclusive languages. This CL replaces some terms with the more appropriate counterparts, such as "central", "peripheral", and "accept list". Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* android: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- Apache-2.0 : 80 LGPL-2.1-or-later : 42 GPL-2.0-or-later : 9 License: Apache-2.0 android/bluetoothd-wrapper.c android/tester-hidhost.c android/tester-map-client.c android/hal-audio-aptx.c android/hal-audio.c android/hal-handsfree-client.c android/tester-gatt.c android/hal-pan.c android/hal-socket.c android/tester-hdp.c android/tester-pan.c android/tester-avrcp.c android/hal-a2dp-sink.c android/hal-gatt.c android/hal-avrcp.c android/tester-a2dp.c android/hal-audio.h android/hal-bluetooth.c android/tester-socket.c android/hal-health.c android/hal-a2dp.c android/hal-ipc.c android/hal-avrcp-ctrl.c android/hal-sco.c android/hal-ipc.h android/tester-main.c android/hal-audio-sbc.c android/hal-utils.c android/hal-map-client.c android/hal-handsfree.c android/hal-log.h android/hal.h android/hal-utils.h android/tester-bluetooth.c android/hal-hidhost.c android/audio_utils/resampler.h android/audio_utils/resampler.c android/system/audio.h android/hardware/bt_sock.h android/hardware/bt_gatt_client.h android/hardware/bt_hh.h android/hardware/bluetooth.h android/hardware/hardware.h android/hardware/bt_hf_client.h android/hardware/bt_rc.h android/hardware/bt_hf.h android/hardware/bt_pan.h android/hardware/bt_gatt_types.h android/hardware/hardware.c android/hardware/audio_effect.h android/hardware/audio.h android/hardware/bt_gatt_server.h android/hardware/bt_gatt.h android/hardware/bt_hl.h android/hardware/bt_mce.h android/hardware/bt_av.h android/client/if-hh.c android/client/if-sco.c android/client/pollhandler.h android/client/haltest.c android/client/tabcompletion.c android/client/if-hf-client.c android/client/history.h android/client/if-audio.c android/client/terminal.h android/client/if-av.c android/client/if-main.h android/client/if-av-sink.c android/client/terminal.c android/client/if-mce.c android/client/if-hf.c android/client/pollhandler.c android/client/if-sock.c android/client/if-rc-ctrl.c android/client/if-rc.c android/client/history.c android/client/if-pan.c android/client/if-gatt.c android/client/if-bt.c android/client/if-hl.c License: LGPL-2.1-or-later android/sco.h android/socket.c android/tester-main.h android/hidhost.h android/map-client.h android/utils.h android/hal-msg.h android/health.h android/avrcp-lib.c android/bluetoothd-snoop.c android/a2dp.c android/bluetooth.h android/a2dp-sink.c android/handsfree-client.c android/audio-msg.h android/main.c android/pan.c android/ipc-tester.c android/health.c android/socket.h android/handsfree.h android/avrcp-lib.h android/a2dp-sink.h android/system-emulator.c android/gatt.c android/avrcp.h android/pan.h android/test-ipc.c android/hidhost.c android/a2dp.h android/avrcp.c android/sco-msg.h android/bluetooth.c android/map-client.c android/handsfree-client.h android/ipc.c android/handsfree.c android/gatt.h android/ipc.h android/ipc-common.h android/compat/wordexp.h android/cutils/properties.h License: GPL-2.0-or-later android/avdtp.h android/avctp.c android/avdtptest.c android/sco.c android/log.c android/avdtp.c android/avctp.h android/compat/readline/history.h android/compat/readline/readline.h
* tools/l2cap-tester: Add test for waiting disconnection responseArchie Pusaka2020-06-041-1/+1
| | | | | | This is to test the behaviour of L2CAP channel when closed with shut_down(sock, SHUT_WR). In this case, we should wait until we receive a disconnection response before raising G_IO_HUP.
* build: Move declaration of _GNU_SOURCE back into individual source filesMarcel Holtmann2018-12-061-0/+2
|
* android: Fix some compilation warningsSzymon Janc2018-05-251-1/+1
|
* android/tester: Fix remote advertising dataSzymon Janc2017-12-211-2/+1
| | | | | Advertising Data doesn't have terminator field like EIR. This was causing error logs from kernel when data length was corrected.
* android/tester-main.c:Fixed Memory leakAnchit Narang2015-07-271-9/+27
| | | | | | | This patch fixes memory leak issues in various functions by allocating memory to structure step only after intial checks are performed as control was returning from these checks without freeing memory allocated to it.
* emulator/bthost: Add support for setting custom ADV dataSzymon Janc2015-05-171-2/+11
| | | | This allows to set any ADV data and not just flags.
* android/tester: Add test for GATT server app indication confirmationJakub Tyszkowski2015-02-191-1/+16
| | | | | This adds checking if sent indication or notification has been confirmed over HAL.
* android/tester: Add case for error passing in GATT server responsesJakub Tyszkowski2015-02-191-0/+8
| | | | This is to verify proper error passing from user apps.
* android/tester: Fix wrong checkAndrei Emeltchenko2014-12-221-2/+2
| | | | Fixes typo mixing exp_inst with rec_inst.
* android/tester: add initial support for map-client testerGrzegorz Kolodziejczyk2014-12-181-0/+188
| | | | | | This adds callback, callback verification, step verification, mas instance verification, map client profile setup handling and basic files.
* android/tester: Set action status to fail if no l2cap data is givenGrzegorz Kolodziejczyk2014-12-181-1/+3
| | | | | | No status set in zeroized step mean that this status is SUCCESS (value 0). If no data is present while setting l2cap server, status should be set to FAIL.
* android/tester: Refractor properties veryfyingGrzegorz Kolodziejczyk2014-12-181-8/+9
| | | | | | | | Pre condition for properties veryfying is to have set expected properties in step - there is no need to check it inside veryfying function. However veryfying function should check if number of expected or received number of properties is valid. If properties are expected but number of them is 0, test should fail.
* android/tester: Print debug log if emulator startsGrzegorz Kolodziejczyk2014-12-181-1/+1
| | | | | If emulator starts tester should print debug log instead of warn. In quiet mode it's unnecessary to print that emulator starts.
* android/tester: Refreactor tester-main header includesGrzegorz Kolodziejczyk2014-12-181-2/+12
| | | | | Profile testers should contain necessary headers include instead of tester-main header.
* android/tester: Remove not needed include of hal_msg.hGrzegorz Kolodziejczyk2014-12-101-2/+5
| | | | | We shouldn't include header for one define. All test cases use internal defines for commands as adopted.
* android/tester: Put gatt callback declaration in right placeGrzegorz Kolodziejczyk2014-12-101-43/+43
| | | | | Gatt callback declaration should be defined after their definitions. This is the adopted style.
* android/tester: Add missing AVRCP cb_table entriesGrzegorz Kolodziejczyk2014-12-101-0/+8
| | | | | cb_table should be filled simultaneously with expected bt_callbacks enum. Without this, debug logs can cause errors.
* android/tester: Initialize unused callback to NULLAndrei Emeltchenko2014-11-101-1/+2
|
* android/tester: Fix PAN control state callbacks parametersSzymon Janc2014-11-071-6/+5
| | | | Order of parameters was changed in Android 5 API.
* android: Update Android system headers to 5.0 APIAndrei Emeltchenko2014-11-071-4/+7
| | | | Android headers are used for Linux host build.
* android/tester: Fix typo in function nameAndrei Emeltchenko2014-11-061-2/+2
|
* android/tester: Add AVRCP GetElementAttributes test caseRavi kumar Veeramally2014-10-291-0/+26
|
* android/tester: Add AVRCP RegNotifTrackChanged test caseRavi kumar Veeramally2014-10-291-0/+16
|
* android/tester: Add AVRCP GetPlayStatus test caseRavi kumar Veeramally2014-10-291-0/+33
|
* android/tester: Fix wrong state comparison in A2DP and AVRCP testsRavi kumar Veeramally2014-10-291-2/+18
| | | | | btav_connection_state_t and btav_audio_state_t enum values are wrongly stored in different enum type(bt_state_t state).
* android/tester: Add GATT server send response to write req test casesGrzegorz Kolodziejczyk2014-10-241-1/+72
| | | | This adds send response by server to write request test cases.
* android/tester: Add GATT server send response to read req test casesGrzegorz Kolodziejczyk2014-10-241-1/+64
| | | | This adds send response by server to read request test cases.
* android/tester: Add GATT server send indication test casesGrzegorz Kolodziejczyk2014-10-241-0/+2
| | | | This adds send indication by server test cases.
* android/tester: Add missing hook removalJakub Tyszkowski2014-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | Missing hook removal was resulting in memory leak: 936 bytes in 39 blocks are definitely lost in loss record 42 of 45 ==15026== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==15026== by 0x407D60: btdev_add_hook (btdev.c:3226) ==15026== by 0x40EB75: read_info_callback (tester-main.c:364) ==15026== by 0x4142B5: request_complete (mgmt.c:245) ==15026== by 0x41441A: can_read_data (mgmt.c:349) ==15026== by 0x41663C: read_callback (io-glib.c:170) ==15026== by 0x5083CE4: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) ==15026== by 0x5084047: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) ==15026== by 0x5084309: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) ==15026== by 0x4162D0: tester_run (tester.c:815) ==15026== by 0x40263E: main (tester-main.c:2716)
* android/tester: Add GATT server delete service test casesGrzegorz Kolodziejczyk2014-10-101-1/+15
| | | | This adds delete service by server test cases.
* android/tester: Add GATT server stop service test casesGrzegorz Kolodziejczyk2014-10-101-1/+15
| | | | This adds stop service by server test cases.
* android/tester: Add GATT server start service test casesGrzegorz Kolodziejczyk2014-10-101-1/+15
| | | | This adds start service by server test cases.
* android/tester: Add GATT server add descriptor test casesGrzegorz Kolodziejczyk2014-10-061-1/+24
| | | | This adds descriptor add by server test cases.
* android/tester: Add GATT server add characteristic test casesGrzegorz Kolodziejczyk2014-10-061-1/+40
| | | | This adds characteristic add by server test cases.
* android/tester: Add GATT server add include service test casesGrzegorz Kolodziejczyk2014-10-061-1/+32
| | | | This adds include service add by server test cases.
* android/tester: Add GATT server add service test casesGrzegorz Kolodziejczyk2014-10-061-1/+36
| | | | This adds service add by server test cases.
* android/tester: Add case for reconnecting HID keyboard deviceJakub Tyszkowski2014-10-061-0/+1
| | | | | This test case checks if we correctly raise security level for reconnecting keyboard devices when previously paired.
* android/tester: Add encryption change callbackJakub Tyszkowski2014-10-061-0/+25
| | | | This is needed for encryption verification.
* android/tester: Improve HIDHost data sending verificationJakub Tyszkowski2014-10-061-0/+3
| | | | | | | | | | Hciemu hooks may be called in different test stage than we expect and we shouldn't blindly verifying the step with success every time when data is send, as we really dont know the step we are currently in. This patch fixes this issue by splitting the action in two steps: action step that triggers data sending and callback step that verifies on remotes sid that data was send.
* android/tester: Rename and expose callback verification functionJakub Tyszkowski2014-10-061-39/+39
| | | | | | This is needed to verify action result on remotes side by using hciemu hooks for example. As hooks are test specific, we need this to be exposed to other testers.
* android/tester: Add GATT server connect successful test caseGrzegorz Kolodziejczyk2014-10-061-1/+32
| | | | It will connect to powered on and visible device.
* android/tester: Fix debug callback logsGrzegorz Kolodziejczyk2014-10-061-0/+1
| | | | | Debug logs for callback should also print logs if callback is not expected. Additional value in callback enum is added (BT_CB_NONE).
* android/tester: Add support for GATT Notification in testerMarcin Kraglak2014-10-021-2/+49
| | | | Service register_for_notification and notification callbacks.
* android/tester: Use generic connect callback for simple casesJakub Tyszkowski2014-10-021-0/+10
| | | | | This is usefull when no custom behavior and just simple pdu exchange is needed.
* android/tester: Add generic hook to handle pdu exchangeJakub Tyszkowski2014-10-021-0/+61
| | | | | | | | | | | | | | | | This allows tester-main to register hooks for certain CID to automatically perform pdu exchange by registering array of pdu pairs (request_pdu, response_pdu). When end_pdu is used instead of request_pdu, response is sent immediately without incoming pdu verification. A pair with end_pdus set as request and response is considered as the end of pdu pairs array. This callback can also handle sdp request<->response while transaction ID for the response is swaped to match the one from SDP request. 'emu_l2cap_cid_data' is used to pass tha appropriate data to the hook mechanism. It is similar to 'emu_cid_data" used in other testers and eventually will replace those.
* android/tester: Make tester debug logs verboseGrzegorz Kolodziejczyk2014-09-291-19/+130
| | | | | This adds additional logs to match function. In case if compared values don't match, tester will print those values.
* android/tester: Reverse condition checkSzymon Janc2014-09-291-133/+128
| | | | This allows to avoid extra indentation.