| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
This attempts to test BT_DEFER_SETUP is properly set when the test has
defer flag set.
|
|
|
|
|
| |
This adds ISO 48_2_1 Defer Send test which enables just output instead
of both.
|
|
|
|
|
| |
This adds isotest.rst which documents the modes and options of
isotest(1) and is then converted isotest.1 manpage.
|
|
|
|
| |
This adds isotest tool which can be used to test ISO sockets.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds iso-tester which tests BTPROTO_ISO socket:
Basic Framework - Success
Basic ISO Socket - Success
Basic ISO Get Socket Option - Success
Basic ISO Set Socket Option - Success
ISO QoS 8_1_1 - Success
ISO QoS 8_2_1 - Success
ISO QoS 16_1_1 - Success
ISO QoS 16_2_1 - Success
ISO QoS 16_2_1 CIG 0x01 - Success
ISO QoS 16_2_1 CIG 0x01 CIS 0x01 - Success
ISO QoS 24_1_1 - Success
ISO QoS 24_2_1 - Success
ISO QoS 32_1_1 - Success
ISO QoS 32_2_1 - Success
ISO QoS 44_1_1 - Success
ISO QoS 44_2_1 - Success
ISO QoS 48_1_1 - Success
ISO QoS 48_2_1 - Success
ISO QoS 48_3_1 - Success
ISO QoS 48_4_1 - Success
ISO QoS 48_5_1 - Success
ISO QoS 48_6_1 - Success
ISO QoS 8_1_2 - Success
ISO QoS 8_2_2 - Success
ISO QoS 16_1_2 - Success
ISO QoS 16_2_2 - Success
ISO QoS 24_1_2 - Success
ISO QoS 24_2_2 - Success
ISO QoS 32_1_2 - Success
ISO QoS 32_2_2 - Success
ISO QoS 44_1_2 - Success
ISO QoS 44_2_2 - Success
ISO QoS 48_1_2 - Success
ISO QoS 48_2_2 - Success
ISO QoS 48_3_2 - Success
ISO QoS 48_4_2 - Success
ISO QoS 48_5_2 - Success
ISO QoS 48_6_2 - Success
ISO QoS - Invalid
ISO Connect2 CIG 0x01 - Success
ISO Send - Success
ISO Receive - Success
ISO Defer - Success
ISO Defer Send - Success
ISO Defer Receive - Success
ISO Defer Reject - Success
ISO Send and Receive - Success
ISO Broadcaster - Success
ISO Broadcaster BIG 0x01 - Success
ISO Broadcaster BIG 0x01 BIS 0x01 - Success
ISO Broadcaster Receiver - Success
|
|
|
|
| |
This adds support to create objects that map to ISO sockets.
|
|
|
|
| |
This adds ISO Socket UUID as response to Read Exp Feature.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the errors reported by the scan-build.
tools/test-runner.c:315:2: warning: Null pointer passed to 1st parameter
expecting 'nonnull' [core.NonNullParamChecker]
execve(argv[0], argv, qemu_envp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/test-runner.c:554:6: warning: Null pointer passed to 1st parameter
expecting 'nonnull' [core.NonNullParamChecker]
if (chdir(home + 5) < 0) {
^~~~~~~~~~~~~~~
tools/test-runner.c:638:6: warning: Null pointer passed to 1st parameter
expecting 'nonnull' [core.NonNullParamChecker]
if (chdir(home + 5) < 0) {
^~~~~~~~~~~~~~~
tools/test-runner.c:695:6: warning: Null pointer passed to 1st parameter
expecting 'nonnull' [core.NonNullParamChecker]
if (chdir(home + 5) < 0) {
^~~~~~~~~~~~~~~
tools/test-runner.c:984:3: warning: Value stored to 'serial_fd' is never
read [deadcode.DeadStores]
serial_fd = -1;
^ ~~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the errors reported by the scan-build.
tools/btmgmt.c:2699:2: warning: Value stored to 'argc' is never read
[deadcode.DeadStores]
argc -= optind;
^ ~~~~~~
tools/btmgmt.c:2859:2: warning: Value stored to 'argc' is never read
[deadcode.DeadStores]
argc -= optind;
^ ~~~~~~
tools/btmgmt.c:2860:2: warning: Value stored to 'argv' is never read
[deadcode.DeadStores]
argv += optind;
^ ~~~~~~
tools/btmgmt.c:2934:2: warning: Value stored to 'argc' is never read
[deadcode.DeadStores]
argc -= optind;
^ ~~~~~~
tools/btmgmt.c:2935:2: warning: Value stored to 'argv' is never read
[deadcode.DeadStores]
argv += optind;
^ ~~~~~~
tools/btmgmt.c:3000:2: warning: Value stored to 'argc' is never read
[deadcode.DeadStores]
argc -= optind;
^ ~~~~~~
tools/btmgmt.c:3001:2: warning: Value stored to 'argv' is never read
[deadcode.DeadStores]
argv += optind;
^ ~~~~~~
tools/btmgmt.c:3261:11: warning: Value stored to 'index' during its
initialization is never read [deadcode.DeadStores]
uint16_t index = mgmt_index;
^~~~~ ~~~~~~~~~~
tools/btmgmt.c:3450:2: warning: Value stored to 'argc' is never read
[deadcode.DeadStores]
argc -= optind;
^ ~~~~~~
tools/btmgmt.c:3451:2: warning: Value stored to 'argv' is never read
[deadcode.DeadStores]
argv += optind;
^ ~~~~~~
tools/btmgmt.c:4822:2: warning: Null pointer passed to 2nd parameter
expecting 'nonnull' [core.NonNullParamChecker]
memcpy(cp->data + uuid_bytes, adv_data, adv_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/btmgmt.c:4823:2: warning: Null pointer passed to 2nd parameter
expecting 'nonnull' [core.NonNullParamChecker]
memcpy(cp->data + uuid_bytes + adv_len, scan_rsp, scan_rsp_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/btmgmt.c:5244:2: warning: Null pointer passed to 2nd parameter
expecting 'nonnull' [core.NonNullParamChecker]
memcpy(cp->data + uuid_bytes, adv_data, adv_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/btmgmt.c:5245:2: warning: Null pointer passed to 2nd parameter
expecting 'nonnull' [core.NonNullParamChecker]
memcpy(cp->data + uuid_bytes + adv_len, scan_rsp, scan_rsp_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the null dereference reported by the scan-build.
tools/mgmt-tester.c:12025:28: warning: Access to field 'cap_len' results
in a dereference of a null pointer (loaded from variable 'rp')
[core.NullDereference]
if (sizeof(rp->cap_len) + rp->cap_len != length) {
^~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a test case to test if the scan response data is updated
when the following scenarios are performed.
1. Add Extended Advertising Parameters Command
2. Add Extended Advertising Data Command w/ Scan Resp Data
3. Remove Advertising Command
4. Add Extended Advertising Parameters Command
5. Add Extended Advertising Data Command w/ Scan Resp Data
6. Host should set Scan Resp Data
|
| |
|
|
|
|
|
|
| |
This patch adds new command to support the following MGMT API:
Add Extended Advertising Parameters Command
Add Extended Advertising Data Command
|
|
|
|
|
|
|
|
|
| |
This fixes the regression introduced by
ab31e2f7e828df3d971cba6f12859edc69f149d5 which causes tests using
add_advertising_mgmt_cmd_arr:
Add Advertising - Success (Name+data+appear) Timed out
Add Ext Advertising - Success (Name+data+appear) Timed out
|
|
|
|
|
| |
Kernel events should have been managed so the audio card is accessible
from PipeWire
|
|
|
|
|
| |
With this commit audio daemons can detect an audio card with output and
input, allowing to test interaction between BlueZ and the audio daemon.
|
|
|
|
| |
Audio daemons requests access to DBus session to start
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running on a computer with a real Bluetooth controller (e.g. hci0) and
multiple emulators (e.g. hci1 and hci2) it isn't possible to use the
emulators with 2 test-runner vms.
If btproxy is started without index parameter the first test-runner will
use hci0, and btprox can't be started with multiple index parameters
(e.g. -i1 -i2).
This patch keeps the old beahvior when used without -i option, in this case
it will try to use the first controller available.
It also allows to select multiple controllers to be used by btproxy.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following build error:
CC tools/mgmt-tester.o
tools/mgmt-tester.c: In function ‘setup_command_generic’:
tools/mgmt-tester.c:7503:16: error: the comparison will always evaluate
as ‘true’ for the pointer operand in
‘(const struct setup_mgmt_cmd *)test->setup_mgmt_cmd_arr +
(sizetype)(i * 24)’ must not be NULL [-Werror=address]
7503 | for (; test->setup_mgmt_cmd_arr + i; ++i) {
| ^~~~
|
|
|
|
|
| |
This makes test-runner wait for system_bus_socket to be available before
continuing otherwise the likes of bluetoothd would likely fail to start.
|
|
|
|
|
|
|
|
|
|
|
| |
Following scenario happens when prov is false and we have double free as
mentioned in the below
bluez-5.64/tools/mesh-gatt/prov-db.c:847: freed_arg: "g_free" frees
"in_str".
bluez-5.64/tools/mesh-gatt/prov-db.c:867: double_free: Calling "g_free"
frees pointer "in_str" which has already been freed.
|
|
|
|
|
|
|
|
|
| |
Reported by coverity tool as follows :
bluez-5.64/tools/meshctl.c:1968: freed_arg: "g_free" frees "mesh_dir".
bluez-5.64/tools/meshctl.c:2018: double_free: Calling "g_free" frees
pointer "mesh_dir" which has already been freed.
|
|
|
|
|
|
|
|
| |
While performing static tool analysis using coverity found following
reports for resouse leak
bluez-5.64/tools/obex-client-tool.c:315: leaked_handle: Handle variable
"sk" going out of scope leaks the handle.
|
|
|
|
|
|
|
|
|
|
|
| |
While performing static tool analysis using coverity found following
reports for resouse leak
bluez-5.64/tools/mesh/mesh-db.c:2388: leaked_handle: Handle variable
"fd" going out of scope leaks the handle.
bluez-5.64/tools/mesh/mesh-db.c:2388: leaked_storage: Variable "str"
going out of scope leaks the storage it points to.
|
|
|
|
|
|
|
|
| |
While performing static tool analysis using coverity found following
reports for resouse leak
bluez-5.64/tools/l2cap-tester.c:1712: leaked_handle: Handle variable
"new_sk" going out of scope leaks the handle.
|
|
|
|
|
|
|
|
| |
While performing static tool analysis using coverity found following
reports for resouse leak
bluez-5.64/tools/create-image.c:124: leaked_storage: Variable "map"
going out of scope leaks the storage it points to.
|
|
|
|
|
|
|
|
| |
While performing static tool analysis using coverity found
following reports for resouse leak
bluez-5.64/tools/cltest.c:75: leaked_handle: Handle variable "fd"
going out of scope leaks the handle.
|
|
|
|
|
|
|
| |
Some branches of execution can make handle (socket) leakage.
Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.
|
|
|
|
|
|
|
|
| |
According to man buffer allocated by getline() should be freed by
the user program even if getline() failed.
Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.
|
|
|
|
|
|
|
|
| |
printf() was using function that return dynamic allocated memory as
a parameter.
Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.
|
|
|
|
|
| |
This adds a dedicated option to start D-Bus alone which can be useful
when testing the bluetoothd with the likes of valgrind.
|
|
|
|
|
|
|
|
| |
In tools/btmgmt.c and tools/hex2hcd.c few sscanf does not limit width
of fields. This could lead to static overflow and stack corruption.
Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.
|
|
|
|
|
|
|
|
|
|
| |
If malformed packet is proceed with zero 'size' field we will face with
wrong behaviour of write() call. Value 'toread - 1' gives wrong sign
for value 'written' (-1) in write() call. To prevent this we should
check that 'toread' is not equal to zero.
Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.
|
|
|
|
|
|
|
|
| |
Array 'c_brf_chip' of size 8 could be accessed by index > 7. We should
limit array access like in previous check at line 221.
Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.
|
| |
|
|
|
|
|
| |
This moves adds the functionality of bluetooth-player into
bluetoothctl.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This updates usage so it list -l/--emulator properly:
test-runner - Automated test execution utility
Usage:
test-runner [options] [--] <command> [args]
Options:
-a, --auto Find tests and run them
-d, --dbus Start D-Bus daemon
-m, --monitor Start btmon
-l, --emulator Start btvirt
-u, --unix [path] Provide serial device
-q, --qemu <path> QEMU binary
-k, --kernel <image> Kernel image (bzImage)
-h, --help Show help options
|
|
|
|
|
| |
This fixes -l/--emulator not able to start depending on what parameters
are given as it was not setting the directory properly.
|
|
|
|
|
|
|
|
|
| |
Instead of parsing the command line, which can contain a shell script,
run using /bin/sh so it allows more complex command line to be tested:
sudo tools/test-runner -l -d -k <pathto/bzImage> --
'client/bluetoothctl power on && sleep 2 && client/bluetoothctl power
off'
|
|
|
|
|
|
|
|
| |
This adds an option (-l/--emulator) to start btvirt before processing
the command which is convenient to runs tools like bluetoothctl:
sudo tools/test-runner -l -d -k <pathto/bzImage> --
client/bluetoothctl power on
|
|
|
|
|
| |
If no specific index is given attempt to bind the next index if the
current one is already in use.
|
|
|
|
|
|
| |
mesh-cfgtest.c uses MAX_PATH so it should include limits.h.
fixes compilation error with musl-based toolchains.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getrandom and sys/random.h are only available since glibc 2.25:
https://www.gnu.org/software/gnulib/manual/html_node/sys_002frandom_002eh.html
resulting in the following build failures since version 5.63 and
https://git.kernel.org/pub/scm/bluetooth/bluez.git/log/?qt=grep&q=getrandom:
plugins/autopair.c:20:24: fatal error: sys/random.h: No such file or directory
#include <sys/random.h>
^
To fix this build failure, add util_getrandom and a fallback (borrowed
from pipewire and licensed under MIT):
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/pipewire/utils.c
Fixes:
- http://autobuild.buildroot.org/results/6b8870d12e0804d6154230a7322c49416c1dc0e2
|
|
|
|
|
|
|
| |
This forces the behavior where not all data can be written at once so it
is able to reproduce the from [1].
[1]https://bugzilla.kernel.org/show_bug.cgi?id=215594
|
|
|
|
|
|
| |
This adds a third argument to connect command so a channel can be passed
to CreateSession which is useful since it possible to force a specific
RFCOMM channel.
|
|
|
|
| |
This attempts to test traffic similar to OBEX using big chunk of data.
|
|
|
|
|
| |
An info message suggesting to request a remote node composition
should reference the correct menu command: "composition-get".
|
|
|
|
| |
Fix keyword typos and comments.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This fixes various issues found when sanitizers are enabled.
|