2023-03-23 10:38:44

by Simon Mikuda

[permalink] [raw]
Subject: [PATCH BlueZ 0/2] l2test fix+feature

Hello!

Added fix setting socket BT_MODE
Also added minor feature enabling hex input to PSM (e.g. 0x1001)

Best regards.

Simon Mikuda (2):
l2test: Enable hex input for PSM
l2test: Fix setting mode for BR/EDR l2cap socket

lib/l2cap.h | 2 ++
tools/l2test.c | 27 +++++++++++++++++++++++++--
2 files changed, 27 insertions(+), 2 deletions(-)

--
2.34.1


2023-03-23 10:39:16

by Simon Mikuda

[permalink] [raw]
Subject: [PATCH BlueZ 1/2] l2test: Enable hex input for PSM

---
tools/l2test.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/l2test.c b/tools/l2test.c
index 5aae4b687..595f1dab2 100644
--- a/tools/l2test.c
+++ b/tools/l2test.c
@@ -1416,7 +1416,10 @@ int main(int argc, char *argv[])
break;

case 'P':
- psm = atoi(optarg);
+ if (!strncasecmp(optarg, "0x", 2))
+ psm = strtoul(&optarg[2], NULL, 16);
+ else
+ psm = atoi(optarg);
break;

case 'I':
--
2.34.1

2023-03-23 11:44:53

by bluez.test.bot

[permalink] [raw]
Subject: RE: l2test fix+feature

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=733107

---Test result---

Test Summary:
CheckPatch FAIL 1.31 seconds
GitLint PASS 0.68 seconds
BuildEll PASS 26.34 seconds
BluezMake PASS 752.58 seconds
MakeCheck PASS 11.03 seconds
MakeDistcheck PASS 147.91 seconds
CheckValgrind PASS 240.89 seconds
CheckSmatch PASS 320.56 seconds
bluezmakeextell PASS 97.38 seconds
IncrementalBuild PASS 1229.04 seconds
ScanBuild PASS 972.80 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,2/2] l2test: Fix setting mode for BR/EDR l2cap socket
ERROR:SWITCH_CASE_INDENT_LEVEL: switch and case should be at the same indent
#108: FILE: tools/l2test.c:160:
+ switch (mode) {
+ case BT_MODE_BASIC:
[...]
+ case BT_MODE_ERTM:
[...]
+ case BT_MODE_STREAMING:
[...]
+ case BT_MODE_LE_FLOWCTL:
[...]
+ case BT_MODE_EXT_FLOWCTL:
[...]
+ default:

/github/workspace/src/src/13185459.patch total: 1 errors, 0 warnings, 44 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13185459.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth

2023-03-23 17:23:05

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/2] l2test: Enable hex input for PSM

Hi Simon,

On Thu, Mar 23, 2023 at 3:39 AM Simon Mikuda
<[email protected]> wrote:
>
> ---
> tools/l2test.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/l2test.c b/tools/l2test.c
> index 5aae4b687..595f1dab2 100644
> --- a/tools/l2test.c
> +++ b/tools/l2test.c
> @@ -1416,7 +1416,10 @@ int main(int argc, char *argv[])
> break;
>
> case 'P':
> - psm = atoi(optarg);
> + if (!strncasecmp(optarg, "0x", 2))
> + psm = strtoul(&optarg[2], NULL, 16);

strtoul should be able to autodetect the base and parse 0x if you give
0 as base:

https://linux.die.net/man/3/strtoul

> + else
> + psm = atoi(optarg);
> break;
>
> case 'I':
> --
> 2.34.1
>


--
Luiz Augusto von Dentz

2023-03-28 05:43:09

by Simon Mikuda

[permalink] [raw]
Subject: [PATCH BlueZ v2 0/2] l2test: Enable hex input for PSM

Thanks for review. I'm sending updated patches.

Simon Mikuda (2):
l2test: Enable hex input for PSM
l2test: Fix setting mode for BR/EDR l2cap socket

lib/l2cap.h | 2 ++
tools/l2test.c | 24 ++++++++++++++++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)

--
2.34.1

2023-03-28 20:58:32

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ v2 0/2] l2test: Enable hex input for PSM

Hello:

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

On Tue, 28 Mar 2023 07:26:17 +0200 you wrote:
> Thanks for review. I'm sending updated patches.
>
> Simon Mikuda (2):
> l2test: Enable hex input for PSM
> l2test: Fix setting mode for BR/EDR l2cap socket
>
> lib/l2cap.h | 2 ++
> tools/l2test.c | 24 ++++++++++++++++++++++--
> 2 files changed, 24 insertions(+), 2 deletions(-)

Here is the summary with links:
- [BlueZ,v2,1/2] l2test: Enable hex input for PSM
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=cedace72c3f7
- [BlueZ,v2,2/2] l2test: Fix setting mode for BR/EDR l2cap socket
(no matching commit)

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