Message ID | 20241022072423.4080043-1-quic_amisjain@quicinc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v1] obex: Resolve SRM issue for PTS testcases | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | fail | WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #102: value in the PUT/GET request and carries on with the PUT/GET operation with SRM disabled. WARNING:TYPO_SPELLING: 'recieving' may be misspelled - perhaps 'receiving'? #105: though recieving the unknown SRM value. ^^^^^^^^^ ERROR:GERRIT_CHANGE_ID: Remove Gerrit Change-Id's before submitting upstream #110: Change-Id: I399b1daacdcfa118137dc9798529514d36fd78ed WARNING:LONG_LINE: line length of 95 exceeds 80 columns #123: FILE: gobex/gobex.c:320: + if(srm != G_OBEX_SRM_DISABLE && srm != G_OBEX_SRM_ENABLE && srm != G_OBEX_SRM_INDICATE) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 14) #123: FILE: gobex/gobex.c:320: + if(srm != G_OBEX_SRM_DISABLE && srm != G_OBEX_SRM_ENABLE && srm != G_OBEX_SRM_INDICATE) + return; //unknown srm value ERROR:SPACING: space required before the open parenthesis '(' #123: FILE: gobex/gobex.c:320: + if(srm != G_OBEX_SRM_DISABLE && srm != G_OBEX_SRM_ENABLE && srm != G_OBEX_SRM_INDICATE) WARNING:TABSTOP: Statements should start on a tabstop #124: FILE: gobex/gobex.c:321: + return; //unknown srm value /github/workspace/src/src/13845233.patch total: 2 errors, 5 warnings, 9 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/13845233.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. |
tedd_an/GitLint | fail | WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 11: B1 Line exceeds max length (89>80): "value in the PUT/GET request and carries on with the PUT/GET operation with SRM disabled." |
tedd_an/BuildEll | success | Build ELL PASS |
tedd_an/BluezMake | success | Bluez Make PASS |
tedd_an/MakeCheck | success | Bluez Make Check PASS |
tedd_an/MakeDistcheck | success | Make Distcheck PASS |
tedd_an/CheckValgrind | success | Check Valgrind PASS |
tedd_an/CheckSmatch | success | CheckSparse PASS |
tedd_an/bluezmakeextell | success | Make External ELL PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
tedd_an/ScanBuild | success | Scan Build PASS |
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=901706 ---Test result--- Test Summary: CheckPatch FAIL 0.55 seconds GitLint FAIL 0.45 seconds BuildEll PASS 24.59 seconds BluezMake PASS 1718.68 seconds MakeCheck PASS 13.73 seconds MakeDistcheck PASS 180.60 seconds CheckValgrind PASS 256.27 seconds CheckSmatch PASS 358.60 seconds bluezmakeextell PASS 121.28 seconds IncrementalBuild PASS 1516.97 seconds ScanBuild PASS 1026.16 seconds Details ############################## Test: CheckPatch - FAIL Desc: Run checkpatch.pl script Output: [v1] obex: Resolve SRM issue for PTS testcases WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #102: value in the PUT/GET request and carries on with the PUT/GET operation with SRM disabled. WARNING:TYPO_SPELLING: 'recieving' may be misspelled - perhaps 'receiving'? #105: though recieving the unknown SRM value. ^^^^^^^^^ ERROR:GERRIT_CHANGE_ID: Remove Gerrit Change-Id's before submitting upstream #110: Change-Id: I399b1daacdcfa118137dc9798529514d36fd78ed WARNING:LONG_LINE: line length of 95 exceeds 80 columns #123: FILE: gobex/gobex.c:320: + if(srm != G_OBEX_SRM_DISABLE && srm != G_OBEX_SRM_ENABLE && srm != G_OBEX_SRM_INDICATE) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 14) #123: FILE: gobex/gobex.c:320: + if(srm != G_OBEX_SRM_DISABLE && srm != G_OBEX_SRM_ENABLE && srm != G_OBEX_SRM_INDICATE) + return; //unknown srm value ERROR:SPACING: space required before the open parenthesis '(' #123: FILE: gobex/gobex.c:320: + if(srm != G_OBEX_SRM_DISABLE && srm != G_OBEX_SRM_ENABLE && srm != G_OBEX_SRM_INDICATE) WARNING:TABSTOP: Statements should start on a tabstop #124: FILE: gobex/gobex.c:321: + return; //unknown srm value /github/workspace/src/src/13845233.patch total: 2 errors, 5 warnings, 9 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/13845233.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. ############################## Test: GitLint - FAIL Desc: Run gitlint Output: [v1] obex: Resolve SRM issue for PTS testcases WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 11: B1 Line exceeds max length (89>80): "value in the PUT/GET request and carries on with the PUT/GET operation with SRM disabled." --- Regards, Linux Bluetooth
Hi Amisha, On Tue, Oct 22, 2024 at 3:24 AM Amisha Jain <quic_amisjain@quicinc.com> wrote: > > Add check for unknown/undefined srm value. > > This fix is required to pass the below the PTS testcases : > 1. OPP/SR/GOEP/SRM/BI-02-C > 2. FTP/SR/GOEP/SRM/BI-02-C > 3. PBAP/PSE/GOEP/SRM/BI-05-C > > Description - Verify that the Server ignores a SRM header with an invalid > value in the PUT/GET request and carries on with the PUT/GET operation with SRM disabled. > > Current Behaviour - Server is sending SRM enable in the response even > though recieving the unknown SRM value. > > To fix this, I have added the check to verify the valid SRM values > before continuing with SRM enable. > > Change-Id: I399b1daacdcfa118137dc9798529514d36fd78ed > --- > gobex/gobex.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/gobex/gobex.c b/gobex/gobex.c > index 40d6b8129..4dc3d8b23 100644 > --- a/gobex/gobex.c > +++ b/gobex/gobex.c > @@ -317,6 +317,9 @@ static void set_srm(GObex *obex, guint8 op, guint8 srm) > struct srm_config *config = obex->srm; > gboolean enable; > > + if(srm != G_OBEX_SRM_DISABLE && srm != G_OBEX_SRM_ENABLE && srm != G_OBEX_SRM_INDICATE) > + return; //unknown srm value > + Perhaps use a switch case to handle to enumerate the supported/unsupported opcodes. > if (config == NULL) { > if (srm == G_OBEX_SRM_DISABLE) > return; > -- > 2.34.1 > >
diff --git a/gobex/gobex.c b/gobex/gobex.c index 40d6b8129..4dc3d8b23 100644 --- a/gobex/gobex.c +++ b/gobex/gobex.c @@ -317,6 +317,9 @@ static void set_srm(GObex *obex, guint8 op, guint8 srm) struct srm_config *config = obex->srm; gboolean enable; + if(srm != G_OBEX_SRM_DISABLE && srm != G_OBEX_SRM_ENABLE && srm != G_OBEX_SRM_INDICATE) + return; //unknown srm value + if (config == NULL) { if (srm == G_OBEX_SRM_DISABLE) return;