2023-12-08 09:00:31

by Frédéric Danis

[permalink] [raw]
Subject: [PATCH BlueZ v2] tools: avtest: Add reject-code option

Some PTS tests like A2DP/SNK/AVP/BI-03-C, A2DP/SNK/AVP/BI-08-C , …
request some specific rejection code to pass.
This commit add an option to specify the rejection code during
AVDTP_SET_CONFIGURATION rejection.
---
tools/avtest.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/tools/avtest.c b/tools/avtest.c
index ca37b3b46..5ac3418aa 100644
--- a/tools/avtest.c
+++ b/tools/avtest.c
@@ -188,7 +188,8 @@ static void dump_buffer(const unsigned char *buf, int len)
}

static void process_avdtp(int srv_sk, int sk, unsigned char reject,
- int fragment)
+ int fragment,
+ int reject_code)
{
unsigned char buf[672];
ssize_t len;
@@ -284,7 +285,8 @@ static void process_avdtp(int srv_sk, int sk, unsigned char reject,
if (reject == AVDTP_SET_CONFIGURATION) {
hdr->message_type = AVDTP_MSG_TYPE_REJECT;
buf[2] = buf[4];
- buf[3] = 0x13; /* SEP In Use */
+ buf[3] = reject_code ? reject_code :
+ 0x13; /* SEP In Use */
printf("Rejecting set configuration command\n");
len = write(sk, buf, 4);
} else {
@@ -443,7 +445,8 @@ static int set_minimum_mtu(int sk)
return 0;
}

-static void do_listen(const bdaddr_t *src, unsigned char reject, int fragment)
+static void do_listen(const bdaddr_t *src, unsigned char reject, int fragment,
+ int reject_code)
{
struct sockaddr_l2 addr;
socklen_t optlen;
@@ -483,7 +486,7 @@ static void do_listen(const bdaddr_t *src, unsigned char reject, int fragment)
continue;
}

- process_avdtp(sk, nsk, reject, fragment);
+ process_avdtp(sk, nsk, reject, fragment, reject_code);

if (media_sock >= 0) {
close(media_sock);
@@ -709,6 +712,7 @@ static void usage(void)
printf("Options:\n"
"\t--device <hcidev> HCI device\n"
"\t--reject <command> Reject command\n"
+ "\t--reject-code <code> Reject code to use\n"
"\t--send <command> Send command\n"
"\t--preconf Configure stream before actual command\n"
"\t--wait <N> Wait N seconds before exiting\n"
@@ -720,6 +724,7 @@ static struct option main_options[] = {
{ "help", 0, 0, 'h' },
{ "device", 1, 0, 'i' },
{ "reject", 1, 0, 'r' },
+ { "reject-code", 1, 0, 'R' },
{ "send", 1, 0, 's' },
{ "invalid", 1, 0, 'f' },
{ "preconf", 0, 0, 'c' },
@@ -764,12 +769,12 @@ int main(int argc, char *argv[])
unsigned char cmd = 0x00;
bdaddr_t src, dst;
int opt, mode = MODE_NONE, sk, invalid = 0, preconf = 0, fragment = 0;
- int avctp = 0, wait_before_exit = 0;
+ int avctp = 0, wait_before_exit = 0, reject_code = 0;

bacpy(&src, BDADDR_ANY);
bacpy(&dst, BDADDR_ANY);

- while ((opt = getopt_long(argc, argv, "+i:r:s:f:hcFCw:",
+ while ((opt = getopt_long(argc, argv, "+i:r:s:f:hcFCw:R:",
main_options, NULL)) != EOF) {
switch (opt) {
case 'i':
@@ -809,6 +814,10 @@ int main(int argc, char *argv[])
wait_before_exit = atoi(optarg);
break;

+ case 'R':
+ reject_code = atoi(optarg);
+ break;
+
case 'h':
default:
usage();
@@ -826,7 +835,7 @@ int main(int argc, char *argv[])

switch (mode) {
case MODE_REJECT:
- do_listen(&src, cmd, fragment);
+ do_listen(&src, cmd, fragment, reject_code);
break;
case MODE_SEND:
sk = do_connect(&src, &dst, avctp, fragment);
--
2.34.1



2023-12-08 10:05:40

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ,v2] tools: avtest: Add reject-code option

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=808168

---Test result---

Test Summary:
CheckPatch PASS 0.47 seconds
GitLint PASS 0.34 seconds
BuildEll PASS 23.79 seconds
BluezMake PASS 705.71 seconds
MakeCheck PASS 12.21 seconds
MakeDistcheck PASS 153.49 seconds
CheckValgrind PASS 215.19 seconds
CheckSmatch PASS 320.19 seconds
bluezmakeextell PASS 100.24 seconds
IncrementalBuild PASS 627.88 seconds
ScanBuild WARNING 907.88 seconds

Details
##############################
Test: ScanBuild - WARNING
Desc: Run Scan Build
Output:
tools/avtest.c:225:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:235:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:244:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:258:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:265:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:272:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:279:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:291:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:295:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:304:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:308:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:317:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:324:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:346:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:350:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:359:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:363:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:376:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:380:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:387:4: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:397:4: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:562:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:570:3: warning: Value stored to 'len' is never read
len = write(sk, buf, invalid ? 2 : 3);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:584:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 4 + sizeof(media_transport));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:597:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:607:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:619:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:634:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:646:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:655:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:662:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:698:2: warning: Value stored to 'len' is never read
len = write(sk, buf, AVCTP_HEADER_LENGTH + sizeof(play_pressed));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 warnings generated.



---
Regards,
Linux Bluetooth

2023-12-08 10:08:19

by Paul Menzel

[permalink] [raw]
Subject: Re: [PATCH BlueZ v2] tools: avtest: Add reject-code option

Dear Frédéric,


Thank you for your patch.

Am 08.12.23 um 10:00 schrieb Frédéric Danis:
> Some PTS tests like A2DP/SNK/AVP/BI-03-C, A2DP/SNK/AVP/BI-08-C , …
> request some specific rejection code to pass.
> This commit add an option to specify the rejection code during

add*s*

> AVDTP_SET_CONFIGURATION rejection.

It’d be great if you gave one example using that new option.

> ---
> tools/avtest.c | 23 ++++++++++++++++-------
> 1 file changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/tools/avtest.c b/tools/avtest.c
> index ca37b3b46..5ac3418aa 100644
> --- a/tools/avtest.c
> +++ b/tools/avtest.c
> @@ -188,7 +188,8 @@ static void dump_buffer(const unsigned char *buf, int len)
> }
>
> static void process_avdtp(int srv_sk, int sk, unsigned char reject,
> - int fragment)
> + int fragment,
> + int reject_code)
> {
> unsigned char buf[672];
> ssize_t len;
> @@ -284,7 +285,8 @@ static void process_avdtp(int srv_sk, int sk, unsigned char reject,
> if (reject == AVDTP_SET_CONFIGURATION) {
> hdr->message_type = AVDTP_MSG_TYPE_REJECT;
> buf[2] = buf[4];
> - buf[3] = 0x13; /* SEP In Use */
> + buf[3] = reject_code ? reject_code :
> + 0x13; /* SEP In Use */
> printf("Rejecting set configuration command\n");
> len = write(sk, buf, 4);
> } else {
> @@ -443,7 +445,8 @@ static int set_minimum_mtu(int sk)
> return 0;
> }
>
> -static void do_listen(const bdaddr_t *src, unsigned char reject, int fragment)
> +static void do_listen(const bdaddr_t *src, unsigned char reject, int fragment,
> + int reject_code)
> {
> struct sockaddr_l2 addr;
> socklen_t optlen;
> @@ -483,7 +486,7 @@ static void do_listen(const bdaddr_t *src, unsigned char reject, int fragment)
> continue;
> }
>
> - process_avdtp(sk, nsk, reject, fragment);
> + process_avdtp(sk, nsk, reject, fragment, reject_code);
>
> if (media_sock >= 0) {
> close(media_sock);
> @@ -709,6 +712,7 @@ static void usage(void)
> printf("Options:\n"
> "\t--device <hcidev> HCI device\n"
> "\t--reject <command> Reject command\n"
> + "\t--reject-code <code> Reject code to use\n"
> "\t--send <command> Send command\n"
> "\t--preconf Configure stream before actual command\n"
> "\t--wait <N> Wait N seconds before exiting\n"
> @@ -720,6 +724,7 @@ static struct option main_options[] = {
> { "help", 0, 0, 'h' },
> { "device", 1, 0, 'i' },
> { "reject", 1, 0, 'r' },
> + { "reject-code", 1, 0, 'R' },
> { "send", 1, 0, 's' },
> { "invalid", 1, 0, 'f' },
> { "preconf", 0, 0, 'c' },
> @@ -764,12 +769,12 @@ int main(int argc, char *argv[])
> unsigned char cmd = 0x00;
> bdaddr_t src, dst;
> int opt, mode = MODE_NONE, sk, invalid = 0, preconf = 0, fragment = 0;
> - int avctp = 0, wait_before_exit = 0;
> + int avctp = 0, wait_before_exit = 0, reject_code = 0;
>
> bacpy(&src, BDADDR_ANY);
> bacpy(&dst, BDADDR_ANY);
>
> - while ((opt = getopt_long(argc, argv, "+i:r:s:f:hcFCw:",
> + while ((opt = getopt_long(argc, argv, "+i:r:s:f:hcFCw:R:",
> main_options, NULL)) != EOF) {
> switch (opt) {
> case 'i':
> @@ -809,6 +814,10 @@ int main(int argc, char *argv[])
> wait_before_exit = atoi(optarg);
> break;
>
> + case 'R':
> + reject_code = atoi(optarg);
> + break;
> +
> case 'h':
> default:
> usage();
> @@ -826,7 +835,7 @@ int main(int argc, char *argv[])
>
> switch (mode) {
> case MODE_REJECT:
> - do_listen(&src, cmd, fragment);
> + do_listen(&src, cmd, fragment, reject_code);
> break;
> case MODE_SEND:
> sk = do_connect(&src, &dst, avctp, fragment);

Reviewed-by: Paul Menzel <[email protected]>


Kind regards,

Paul

2023-12-08 10:17:36

by Frédéric Danis

[permalink] [raw]
Subject: [PATCH BlueZ v3] tools: avtest: Add reject-code option

Some PTS tests like A2DP/SNK/AVP/BI-03-C, A2DP/SNK/AVP/BI-08-C , …
request some specific rejection code to pass.
This commit adds an option to specify the rejection code during
AVDTP_SET_CONFIGURATION rejection.

E.g. "avtest --reject setconf --reject-code 195" to reject setconf with
INVALID_SAMPLING_FREQUENCY code.

Reviewed-by: Paul Menzel <[email protected]>
---
tools/avtest.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/tools/avtest.c b/tools/avtest.c
index ca37b3b46..5ac3418aa 100644
--- a/tools/avtest.c
+++ b/tools/avtest.c
@@ -188,7 +188,8 @@ static void dump_buffer(const unsigned char *buf, int len)
}

static void process_avdtp(int srv_sk, int sk, unsigned char reject,
- int fragment)
+ int fragment,
+ int reject_code)
{
unsigned char buf[672];
ssize_t len;
@@ -284,7 +285,8 @@ static void process_avdtp(int srv_sk, int sk, unsigned char reject,
if (reject == AVDTP_SET_CONFIGURATION) {
hdr->message_type = AVDTP_MSG_TYPE_REJECT;
buf[2] = buf[4];
- buf[3] = 0x13; /* SEP In Use */
+ buf[3] = reject_code ? reject_code :
+ 0x13; /* SEP In Use */
printf("Rejecting set configuration command\n");
len = write(sk, buf, 4);
} else {
@@ -443,7 +445,8 @@ static int set_minimum_mtu(int sk)
return 0;
}

-static void do_listen(const bdaddr_t *src, unsigned char reject, int fragment)
+static void do_listen(const bdaddr_t *src, unsigned char reject, int fragment,
+ int reject_code)
{
struct sockaddr_l2 addr;
socklen_t optlen;
@@ -483,7 +486,7 @@ static void do_listen(const bdaddr_t *src, unsigned char reject, int fragment)
continue;
}

- process_avdtp(sk, nsk, reject, fragment);
+ process_avdtp(sk, nsk, reject, fragment, reject_code);

if (media_sock >= 0) {
close(media_sock);
@@ -709,6 +712,7 @@ static void usage(void)
printf("Options:\n"
"\t--device <hcidev> HCI device\n"
"\t--reject <command> Reject command\n"
+ "\t--reject-code <code> Reject code to use\n"
"\t--send <command> Send command\n"
"\t--preconf Configure stream before actual command\n"
"\t--wait <N> Wait N seconds before exiting\n"
@@ -720,6 +724,7 @@ static struct option main_options[] = {
{ "help", 0, 0, 'h' },
{ "device", 1, 0, 'i' },
{ "reject", 1, 0, 'r' },
+ { "reject-code", 1, 0, 'R' },
{ "send", 1, 0, 's' },
{ "invalid", 1, 0, 'f' },
{ "preconf", 0, 0, 'c' },
@@ -764,12 +769,12 @@ int main(int argc, char *argv[])
unsigned char cmd = 0x00;
bdaddr_t src, dst;
int opt, mode = MODE_NONE, sk, invalid = 0, preconf = 0, fragment = 0;
- int avctp = 0, wait_before_exit = 0;
+ int avctp = 0, wait_before_exit = 0, reject_code = 0;

bacpy(&src, BDADDR_ANY);
bacpy(&dst, BDADDR_ANY);

- while ((opt = getopt_long(argc, argv, "+i:r:s:f:hcFCw:",
+ while ((opt = getopt_long(argc, argv, "+i:r:s:f:hcFCw:R:",
main_options, NULL)) != EOF) {
switch (opt) {
case 'i':
@@ -809,6 +814,10 @@ int main(int argc, char *argv[])
wait_before_exit = atoi(optarg);
break;

+ case 'R':
+ reject_code = atoi(optarg);
+ break;
+
case 'h':
default:
usage();
@@ -826,7 +835,7 @@ int main(int argc, char *argv[])

switch (mode) {
case MODE_REJECT:
- do_listen(&src, cmd, fragment);
+ do_listen(&src, cmd, fragment, reject_code);
break;
case MODE_SEND:
sk = do_connect(&src, &dst, avctp, fragment);
--
2.34.1


2023-12-08 11:32:30

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ,v3] tools: avtest: Add reject-code option

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=808201

---Test result---

Test Summary:
CheckPatch PASS 0.34 seconds
GitLint PASS 5.31 seconds
BuildEll PASS 24.14 seconds
BluezMake PASS 722.61 seconds
MakeCheck PASS 11.68 seconds
MakeDistcheck PASS 159.32 seconds
CheckValgrind PASS 221.07 seconds
CheckSmatch PASS 328.72 seconds
bluezmakeextell PASS 103.24 seconds
IncrementalBuild PASS 677.93 seconds
ScanBuild WARNING 977.76 seconds

Details
##############################
Test: ScanBuild - WARNING
Desc: Run Scan Build
Output:
tools/avtest.c:225:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:235:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:244:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:258:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:265:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:272:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:279:5: warning: Value stored to 'len' is never read
len = write(sk, buf,
^ ~~~~~~~~~~~~~~
tools/avtest.c:291:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:295:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:304:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:308:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:317:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:324:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:346:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:350:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:359:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:363:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:376:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 4);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:380:5: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:387:4: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:397:4: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:562:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:570:3: warning: Value stored to 'len' is never read
len = write(sk, buf, invalid ? 2 : 3);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:584:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 4 + sizeof(media_transport));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:597:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:607:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:619:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:634:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:646:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:655:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 3);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:662:3: warning: Value stored to 'len' is never read
len = write(sk, buf, 2);
^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:698:2: warning: Value stored to 'len' is never read
len = write(sk, buf, AVCTP_HEADER_LENGTH + sizeof(play_pressed));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 warnings generated.



---
Regards,
Linux Bluetooth

2023-12-11 18:41:39

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ v3] tools: avtest: Add reject-code option

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Fri, 8 Dec 2023 11:17:11 +0100 you wrote:
> Some PTS tests like A2DP/SNK/AVP/BI-03-C, A2DP/SNK/AVP/BI-08-C , …
> request some specific rejection code to pass.
> This commit adds an option to specify the rejection code during
> AVDTP_SET_CONFIGURATION rejection.
>
> E.g. "avtest --reject setconf --reject-code 195" to reject setconf with
> INVALID_SAMPLING_FREQUENCY code.
>
> [...]

Here is the summary with links:
- [BlueZ,v3] tools: avtest: Add reject-code option
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=fb681e795027

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html