diff mbox series

[v2,01/10] profile: Add support for experimental flag

Message ID 20230516205924.1040506-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit 67c5824fd071a758756bbb96f167a0d18c4c8520
Headers show
Series [v2,01/10] profile: Add support for experimental flag | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
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

Commit Message

Luiz Augusto von Dentz May 16, 2023, 8:59 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds experimental field to btd_profile so the plugin can indicate
drivers that depends on experimental to be enabled.
---
 src/profile.c | 6 ++++++
 src/profile.h | 5 +++++
 2 files changed, 11 insertions(+)

Comments

bluez.test.bot@gmail.com May 17, 2023, 1:33 a.m. UTC | #1
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=748169

---Test result---

Test Summary:
CheckPatch                    FAIL      6.73 seconds
GitLint                       PASS      3.96 seconds
BuildEll                      PASS      35.64 seconds
BluezMake                     PASS      1248.12 seconds
MakeCheck                     PASS      12.92 seconds
MakeDistcheck                 PASS      205.33 seconds
CheckValgrind                 PASS      331.37 seconds
CheckSmatch                   PASS      451.09 seconds
bluezmakeextell               PASS      135.40 seconds
IncrementalBuild              PASS      10357.78 seconds
ScanBuild                     PASS      1362.35 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v2,07/10] plugin: Treat -ENOTSUP as -ENOSYS
WARNING:ENOSYS: ENOSYS means 'invalid syscall nr' and nothing else
#101: FILE: src/plugin.c:189:
+			if (err == -ENOSYS || err == -ENOTSUP)

/github/workspace/src/src/13243878.patch total: 0 errors, 1 warnings, 8 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/13243878.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
patchwork-bot+bluetooth@kernel.org May 17, 2023, 7:50 p.m. UTC | #2
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue, 16 May 2023 13:59:15 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This adds experimental field to btd_profile so the plugin can indicate
> drivers that depends on experimental to be enabled.
> ---
>  src/profile.c | 6 ++++++
>  src/profile.h | 5 +++++
>  2 files changed, 11 insertions(+)

Here is the summary with links:
  - [v2,01/10] profile: Add support for experimental flag
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=67c5824fd071
  - [v2,02/10] bap: Mark driver as experimental
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=da762dfa0255
  - [v2,03/10] bass: Mark driver as experimental
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=bd14ad2e1f50
  - [v2,04/10] csip: Mark driver as experimental
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=16da92601f4a
  - [v2,05/10] mcp: Mark driver as experimental
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=62cbb2a9f57d
  - [v2,06/10] vcp: Mark driver as experimental
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2fa20fe9fc4a
  - [v2,07/10] plugin: Treat -ENOTSUP as -ENOSYS
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=ce7cd9fb0611
  - [v2,08/10] adapter: Add support for experimental flag
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=28917a3c7a4e
  - [v2,09/10] admin: Mark driver as experimental
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=943be6271d77
  - [v2,10/10] main: Rework config option parsing
    (no matching commit)

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/profile.c b/src/profile.c
index e1bebf1ee19c..ea188f36b6dd 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -775,6 +775,12 @@  static struct btd_profile *btd_profile_find_uuid(const char *uuid)
 
 int btd_profile_register(struct btd_profile *profile)
 {
+	if (profile->experimental && !(g_dbus_get_flags() &
+					G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) {
+		DBG("D-Bus experimental not enabled");
+		return -ENOTSUP;
+	}
+
 	profiles = g_slist_append(profiles, profile);
 	return 0;
 }
diff --git a/src/profile.h b/src/profile.h
index 6827f848148c..6871f2f0d7d8 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -28,6 +28,11 @@  struct btd_profile {
 	 */
 	bool external;
 
+	/* Indicates the profile is experimental and shall only be registered
+	 * when experimental has been enabled (see: main.conf:Experimental).
+	 */
+	bool experimental;
+
 	int (*device_probe) (struct btd_service *service);
 	void (*device_remove) (struct btd_service *service);