summaryrefslogtreecommitdiff
path: root/unit/test-avdtp.c
Commit message (Collapse)AuthorAgeFilesLines
* build: Replace use of g_memdup with util_memdupLuiz Augusto von Dentz2022-01-061-3/+3
| | | | | | | | | | | 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.
* shared/util: use 64-bit bitmap in util_get/clear_uidPauli Virtanen2021-09-061-1/+1
| | | | | | | | | | | The util_get/clear_uid functions use int type for bitmap, and are used e.g. for SEID allocation. However, valid SEIDs are in range 1 to 0x3E (AVDTP spec v1.3, 8.20.1), and 8*sizeof(int) is often smaller than 0x3E. The function is also used in src/advertising.c, but an explicit maximum value is always provided, so growing the bitmap size is safe there. Use 64-bit bitmap instead, to be able to cover the valid range.
* unit: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- GPL-2.0-or-later : 25 LGPL-2.1-or-later : 1 GPL-2.0-only : 2 BSD-2-Clause : 1 License: GPL-2.0-or-later unit/test-hog.c unit/test-eir.c unit/test-gobex-header.c unit/test-crc.c unit/test-avrcp.c unit/test-ringbuf.c unit/test-gobex-apparam.c unit/test-gobex.c unit/test-hfp.c unit/test-textfile.c unit/test-avdtp.c unit/test-sdp.c unit/test-gatt.c unit/test-avctp.c unit/test-gattrib.c unit/test-queue.c unit/test-gobex-packet.c unit/test-uuid.c unit/test-crypto.c unit/test-uhid.c unit/test-gdbus-client.c unit/test-midi.c unit/test-lib.c unit/test-mgmt.c unit/test-gobex-transfer.c License: LGPL-2.1-or-later unit/test-mesh-crypto.c License: GPL-2.0-only unit/util.h unit/util.c License: BSD-2-Clause unit/test-ecc.c
* unit: Fix fsanitize-address-use-after-scope with GCC 9Luiz Augusto von Dentz2019-01-141-4/+9
| | | | | | | Raw data payload must be copied since the declaration goes out of scope: Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=202213
* unit: Make use of tester_monitor to print input/output PDUsLuiz Augusto von Dentz2018-10-081-9/+2
| | | | | | | | | | | | | | | | | | | | | | | tester_monitor will forward the data to btmon when -m/--monitor is enabled which will attempt to decode the PDUs: = test-gatt: /robustness/unkown-command - init 11:44:53.464325 = test-gatt: /robustness/unkown-command - setup = test-gatt: /robustness/unkown-command - setup complete = test-gatt: /robustness/unkown-command - run < test-gatt: User Data TX ATT: Exchange MTU Request (0x02) len 2 Client RX MTU: 23 > test-gatt: User Data RX ATT: Exchange MTU Response (0x03) len 2 Server RX MTU: 512 < test-gatt: User Data TX ATT: Unknown (0xff) len 1 00 . = test-gatt: /robustness/unkown-command - test passed = test-gatt: /robustness/unkown-command - teardown = test-gatt: /robustness/unkown-command - teardown complete = test-gatt: /robustness/unkown-command - done
* unit: Replace use of g_malloc+memcpy with gmemdupLuiz Augusto von Dentz2015-03-271-2/+1
| | | | | This seems to fix problems of make check not working in 32 bit systems with gcc 5.0.
* unit/test-avdtp: Use tester frameworkLuiz Augusto von Dentz2015-03-261-64/+40
| | | | Our tester framework actually produces much better output.
* unit/avdtp: Refactor context destroyAndrei Emeltchenko2015-02-221-36/+22
| | | | | destroy_context() function will be used for dummy_tests without context_execute()
* android/avdtp: Refactor local SEP list handlingAndrei Emeltchenko2015-02-221-41/+54
| | | | | | In order to deduplicate similar code in android/ and profiles/ we need to handle local SEP queue outside of avdtp.c. GSList is transformed to queue.
* unit/avdtp: Add check for too many SEP creationAndrei Emeltchenko2015-02-191-0/+7
| | | | Test checks that maximum numbers of SEPs registered is MAX_SEID.
* unit/avdtp: Add duplicate SEID testAndrei Emeltchenko2015-02-191-0/+43
| | | | | | Add test adding two SEP, then remove first and create another one. With the current code new SEP has the same SEID (2!). Following patches fixing the bug.
* unit/avdtp: Add SEP register/unregister testsAndrei Emeltchenko2015-02-191-0/+34
| | | | | Add register_sep and unregister_sep testing registering maximum amount of SEPs.
* unit/avdtp: trivial: Remove empty lineAndrei Emeltchenko2014-01-271-1/+0
|
* unit/avdtp: Remove extra zero table entryAndrei Emeltchenko2014-01-221-1/+1
| | | | Remove not needed table entry copied, probably, from unit/sdp
* unit: Fix test failures with glib 2.39.0Colin Watson2014-01-061-2/+6
| | | | | | | | | | | | | glib 2.39.0 made this change: - g_source_remove() will now throw a critical in the case that you try to remove a non-existent source. We expect that there is some code in the wild that will fall afoul of this new critical but considering that we now reuse source IDs, this code is already broken and should probably be fixed. This patch fixes the test suite to keep better track of whether sources have already been removed and avoid double-removals.
* android/AVDTP: Remove get_all parameter for get_capability callbackLuiz Augusto von Dentz2013-12-231-4/+4
| | | | | This is not necessary anymore since all delay reporting is now added automatically whenever supported.
* unit/AVDTP: Add /TP/SIG/SYN/BV-06-C testLuiz Augusto von Dentz2013-12-231-0/+16
| | | | | Verify that a delay report received by a SRC IUT while in the STREAMING state is properly accepted as valid.
* unit/AVDTP: Add /TP/SIG/SYN/BV-05-C testLuiz Augusto von Dentz2013-12-231-1/+14
| | | | | Verify that a delay report received by a SRC IUT while in the OPEN state is properly accepted as valid.
* unit/AVDTP: Add /TP/SIG/SYN/BV-04-C testLuiz Augusto von Dentz2013-12-231-0/+12
| | | | | | | Verify that an initial delay report is sent by a SNK (INT) device when the Stream Configuration Procedure is initiated by the SNK device (transition from IDLE to OPEN state) and that the report conforms to the specification.
* android/AVDTP: Fix not sending delay reporting capabilityLuiz Augusto von Dentz2013-12-231-1/+1
| | | | | If the SEP supports delay reporting and remote device request is GET_ALL add delay report capability.
* unit/AVDTP: Add /TP/SIG/SYN/BV-03-C testLuiz Augusto von Dentz2013-12-231-1/+16
| | | | | | | Verify that an initial delay report is sent by a SNK (ACP) device when the Stream Configuration Procedure is initiated by the SRC device (transition from IDLE to OPEN state) and that the report conforms to the specification.
* unit/AVDTP: Add /TP/SIG/SYN/BV-02-C testLuiz Augusto von Dentz2013-12-231-0/+9
| | | | | | | Verify that the delay reporting capability is configured by a SNK device when it is offered by the SRC device. This allows a SRC device to detect and use the delay reporting capability of a SNK device when the SNK device is the INT of the start streaming procedure.
* unit/AVDTP: Add /TP/SIG/SYN/BV-01-C testLuiz Augusto von Dentz2013-12-231-0/+28
| | | | | Verify if the IUT (SNK device) offers the delay reporting capability. This is required in order to enable a SRC to configure delay reporting.
* unit/AVDTP: Add /TP/SIG/FRA/BV-02-C testLuiz Augusto von Dentz2013-12-181-1/+48
| | | | | Verify ithat the IUT (SNK) is able to receive streaming media data on an established stream.
* unit/AVDTP: Add /TP/SIG/FRA/BV-01-C testLuiz Augusto von Dentz2013-12-181-4/+105
| | | | | Verify that the IUT (INT and ACP) fragments the signaling messages that cannot fit in a single L2CAP packet.
* unit/AVDTP: Add /TP/SIG/SMG/BI-36-C testLuiz Augusto von Dentz2013-12-051-0/+8
| | | | | Verify that the IUT (INT) is able to ignore a reserved capability in the GetAllCapabilities response.
* unit/AVDTP: Add /TP/SIG/SMG/BI-35-C testLuiz Augusto von Dentz2013-12-051-0/+10
| | | | | Verify that the IUT (INT) is able to ignore a reserved capability in the GetAllCapabilities response.
* unit/AVDTP: Add /TP/SIG/SMG/BI-33-C testLuiz Augusto von Dentz2013-12-051-0/+5
| | | | | Verify that the IUT (ACP) is able to issue a get all capabilities reject response to the INT.
* unit/AVDTP: Add /TP/SIG/SMG/BI-32-C testLuiz Augusto von Dentz2013-12-051-1/+7
| | | | | Verify that the IUT (ACP) is able to issue a get all capabilities reject response to the INT.
* unit/AVDTP: Add /TP/SIG/SMG/ESR04/BI-28-C testLuiz Augusto von Dentz2013-12-051-0/+3
| | | | | Verify that the IUT (ACP) is able to issue a general reject response to the Lower Tester (INT).
* unit/AVDTP: Add /TP/SIG/SMG/BI-30-C testLuiz Augusto von Dentz2013-12-051-0/+8
| | | | | Verify that the IUT (INT) is able to ignore a reserved capability in the GetCapabilities response.
* unit/AVDTP: Add /TP/SIG/SMG/BI-28-C testLuiz Augusto von Dentz2013-12-051-0/+3
| | | | | Verify that the IUT (ACP) is able to issue a general reject response to the Lower Tester (INT).
* unit/AVDTP: Add /TP/SIG/SMG/BI-27-C testLuiz Augusto von Dentz2013-12-051-0/+32
| | | | | | Verify that the IUT (ACP) is able to issue a reject response signal upon tester's request in answer to a suspend stream command from the Lower Tester (INT).
* unit/AVDTP: Add /TP/SIG/SMG/BI-26-C testLuiz Augusto von Dentz2013-12-051-0/+13
| | | | | Verify that the IUTi (ACP) is able to issue a suspend stream reject response to the Lower Tester (INT).
* unit/AVDTP: Add /TP/SIG/SMG/BI-25-C testLuiz Augusto von Dentz2013-12-051-1/+43
| | | | | Verify that the IUT (ACP) is able to report to the tester the rejection of a suspend stream command sent by the Lower Tester (INT).
* unit/AVDTP: Add /TP/SIG/SMG/BI-24-C testLuiz Augusto von Dentz2013-12-051-0/+30
| | | | | Verify that the IUT (ACP) is able to issue a reject response signal upon tester's request in answer to a close stream command.
* unit/AVDTP: Add /TP/SIG/SMG/BI-23-C testLuiz Augusto von Dentz2013-12-051-0/+13
| | | | | Verify that the IUT (ACP) is able to issue a close stream reject response to the Lower Tester (INT).
* unit/AVDTP: Add /TP/SIG/SMG/BI-22-C testLuiz Augusto von Dentz2013-12-051-1/+15
| | | | | Verify that the IUT (INT) is able to report the rejection by the remote device of the close stream command.
* unit/AVDTP: Add /TP/SIG/SMG/BI-21-C testLuiz Augusto von Dentz2013-12-051-0/+30
| | | | | Verify that the IUT (ACP) is able to issue a reject response signal upon tester's request in answer to a start stream command.
* unit/AVDTP: Add /TP/SIG/SMG/BI-20-C testLuiz Augusto von Dentz2013-12-051-0/+11
| | | | | Verify that the IUT (ACP) is able to issue a start stream reject response to the INT.
* unit/AVDTP: Add /TP/SIG/SMG/BI-19-C testLuiz Augusto von Dentz2013-12-051-0/+20
| | | | | Verify that the IUT (INT) is able to report the rejection by the remote device of the start stream command.
* unit/AVDTP: Add /TP/SIG/SMG/BI-18-C testLuiz Augusto von Dentz2013-12-051-0/+16
| | | | | Verify that the IUT (ACP) is able to issue a reject response signal upon tester's request in answer to an open stream command.
* unit/AVDTP: Add /TP/SIG/SMG/BI-17-C testLuiz Augusto von Dentz2013-12-051-0/+8
| | | | | Verify that the IUT (ACP) is able to issue an Open stream reject response to the INT.
* unit/AVDTP: Add /TP/SIG/SMG/BI-11-C testLuiz Augusto von Dentz2013-12-051-0/+11
| | | | | Verify that the IUT (ACP) is able to issue a get configuration reject response to the INT.
* unit/AVDTP: Add /TP/SIG/SMG/BI-10-C testLuiz Augusto von Dentz2013-12-051-1/+29
| | | | | Verify that the IUT (ACP) is able to issue a get configuration reject response to the INT.
* unit/AVDTP: Add /TP/SIG/SMG/BI-09-C testLuiz Augusto von Dentz2013-12-051-0/+27
| | | | | Verify that the IUT (ACP) is able to issue a reject response signal upon tester's request in answer to a set configuration command.
* unit/AVDTP: Add /TP/SIG/SMG/BI-08-C testLuiz Augusto von Dentz2013-12-051-0/+12
| | | | | Verify that the IUT (ACP) is able to issue a set configuration reject response to the INT if the SEP is already configured.
* unit/AVDTP: Add /TP/SIG/SMG/BI-07-C testLuiz Augusto von Dentz2013-12-051-9/+16
| | | | | Verify that the IUT (INT) is able to detect the rejection by the ACP of a set configuration command.
* unit/AVDTP: Add /TP/SIG/SMG/BI-06-C testLuiz Augusto von Dentz2013-12-051-0/+5
| | | | | Verify that the IUT (ACP) is able to issue a reject response signal upon tester's request in answer to a get capabilities command.
* unit/AVDTP: Add /TP/SIG/SMG/BI-05-C testLuiz Augusto von Dentz2013-12-051-0/+5
| | | | | Verify that the IUT (INT) is able to detect the rejection by the ACP of a get capabilities command.