public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/3] shared/tester: add ability to skip tests unless explicitly selected
@ 2024-05-14 20:41 Pauli Virtanen
  2024-05-14 20:41 ` [PATCH BlueZ 2/3] tools: disable running TX timestamping tests for now Pauli Virtanen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Pauli Virtanen @ 2024-05-14 20:41 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Make it possible to skip running a test, and skip running if the test
was not explicitly selected on command line.
---

Notes:
    This series disables the TX timestamping related tests by default for
    now. The TX timestamping itself should be OK, and the assumption is we'd
    re-enable these tests again once the kernel feature is reworked.
    
    I left the BT_POLL_ERRQUEUE parts in aside from the tests for now, not
    yet clear where if that is going to go further yet.

 src/shared/tester.c | 32 ++++++++++++++++++++++++++++++++
 src/shared/tester.h |  2 ++
 2 files changed, 34 insertions(+)

diff --git a/src/shared/tester.c b/src/shared/tester.c
index a1ee5b687..56c8cba6f 100644
--- a/src/shared/tester.c
+++ b/src/shared/tester.c
@@ -563,6 +563,38 @@ void tester_pre_setup_failed(void)
 	g_idle_add(done_callback, test);
 }
 
+void tester_pre_setup_abort(void)
+{
+	struct test_case *test;
+
+	if (!test_current)
+		return;
+
+	test = test_current->data;
+
+	if (test->stage != TEST_STAGE_PRE_SETUP)
+		return;
+
+	if (test->timeout_id > 0) {
+		timeout_remove(test->timeout_id);
+		test->timeout_id = 0;
+	}
+
+	print_progress(test->name, COLOR_YELLOW, "not run");
+
+	g_idle_add(done_callback, test);
+}
+
+bool tester_pre_setup_skip_by_default(void)
+{
+	if (!option_prefix && !option_string) {
+		tester_pre_setup_abort();
+		return true;
+	}
+
+	return false;
+}
+
 void tester_setup_complete(void)
 {
 	struct test_case *test;
diff --git a/src/shared/tester.h b/src/shared/tester.h
index 16f41022d..1f8138434 100644
--- a/src/shared/tester.h
+++ b/src/shared/tester.h
@@ -59,6 +59,8 @@ void *tester_get_data(void);
 
 void tester_pre_setup_complete(void);
 void tester_pre_setup_failed(void);
+void tester_pre_setup_abort(void);
+bool tester_pre_setup_skip_by_default(void);
 
 void tester_setup_complete(void);
 void tester_setup_failed(void);
-- 
2.45.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH BlueZ 2/3] tools: disable running TX timestamping tests for now
  2024-05-14 20:41 [PATCH BlueZ 1/3] shared/tester: add ability to skip tests unless explicitly selected Pauli Virtanen
@ 2024-05-14 20:41 ` Pauli Virtanen
  2024-05-14 20:41 ` [PATCH BlueZ 3/3] Revert "mgmt-tester: update for Poll Errqueue experimental fature" Pauli Virtanen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Pauli Virtanen @ 2024-05-14 20:41 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Disable the TX timestamping related tests for now, as the feature will
need some further work.
---
 tools/iso-tester.c   | 5 +++++
 tools/l2cap-tester.c | 6 ++++++
 tools/sco-tester.c   | 6 ++++++
 3 files changed, 17 insertions(+)

diff --git a/tools/iso-tester.c b/tools/iso-tester.c
index d54fa56ec..e80c2159c 100644
--- a/tools/iso-tester.c
+++ b/tools/iso-tester.c
@@ -690,6 +690,11 @@ static void test_pre_setup(const void *test_data)
 	struct test_data *data = tester_get_data();
 	const struct iso_client_data *isodata = test_data;
 
+	if (isodata && isodata->so_timestamping) {
+		if (tester_pre_setup_skip_by_default())
+			return;
+	}
+
 	data->mgmt = mgmt_new_default();
 	if (!data->mgmt) {
 		tester_warn("Failed to setup management interface");
diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c
index 02d1571d2..c34080654 100644
--- a/tools/l2cap-tester.c
+++ b/tools/l2cap-tester.c
@@ -214,6 +214,12 @@ static void read_index_list_callback(uint8_t status, uint16_t length,
 static void test_pre_setup(const void *test_data)
 {
 	struct test_data *data = tester_get_data();
+	const struct l2cap_data *l2data = test_data;
+
+	if (l2data && l2data->so_timestamping) {
+		if (tester_pre_setup_skip_by_default())
+			return;
+	}
 
 	data->mgmt = mgmt_new_default();
 	if (!data->mgmt) {
diff --git a/tools/sco-tester.c b/tools/sco-tester.c
index ff8a3613f..a56cb9153 100644
--- a/tools/sco-tester.c
+++ b/tools/sco-tester.c
@@ -197,6 +197,12 @@ static void read_index_list_callback(uint8_t status, uint16_t length,
 static void test_pre_setup(const void *test_data)
 {
 	struct test_data *data = tester_get_data();
+	const struct sco_client_data *scodata = test_data;
+
+	if (scodata && scodata->so_timestamping) {
+		if (tester_pre_setup_skip_by_default())
+			return;
+	}
 
 	data->mgmt = mgmt_new_default();
 	if (!data->mgmt) {
-- 
2.45.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH BlueZ 3/3] Revert "mgmt-tester: update for Poll Errqueue experimental fature"
  2024-05-14 20:41 [PATCH BlueZ 1/3] shared/tester: add ability to skip tests unless explicitly selected Pauli Virtanen
  2024-05-14 20:41 ` [PATCH BlueZ 2/3] tools: disable running TX timestamping tests for now Pauli Virtanen
@ 2024-05-14 20:41 ` Pauli Virtanen
  2024-05-14 23:29 ` [BlueZ,1/3] shared/tester: add ability to skip tests unless explicitly selected bluez.test.bot
  2024-05-15 17:40 ` [PATCH BlueZ 1/3] " patchwork-bot+bluetooth
  3 siblings, 0 replies; 5+ messages in thread
From: Pauli Virtanen @ 2024-05-14 20:41 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

This reverts commit c777c55ab662db4e9853bb08a6e1e6c77b319e09.

The kernel feature needs further work.
---
 tools/mgmt-tester.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 81636200e..8a4fbc2eb 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -9985,7 +9985,7 @@ static const struct generic_data read_exp_feat_success = {
 
 
 static const uint8_t read_exp_feat_param_success_index_none[] = {
-	0x03, 0x00,				/* Feature Count */
+	0x02, 0x00,				/* Feature Count */
 	0x1c, 0xda, 0x47, 0x1c, 0x48, 0x6c,	/* UUID - Debug */
 	0x01, 0xab, 0x9f, 0x46, 0xec, 0xb9,
 	0x30, 0x25, 0x99, 0xd4,
@@ -9994,10 +9994,6 @@ static const uint8_t read_exp_feat_param_success_index_none[] = {
 	0x85, 0x98, 0x6a, 0x49, 0xe0, 0x05,
 	0x88, 0xf1, 0xba, 0x6f,
 	0x00, 0x00, 0x00, 0x00,			/* Flags */
-	0x33, 0x57, 0x7b, 0xb4, 0x21, 0xc0,	/* UUID - Poll Errqueue */
-	0xc1, 0x8b, 0x79, 0x46, 0x9f, 0xb6,
-	0x4c, 0x8c, 0x51, 0x69,
-	0x00, 0x00, 0x00, 0x00,			/* Flags */
 };
 
 static const struct generic_data read_exp_feat_success_index_none = {
-- 
2.45.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [BlueZ,1/3] shared/tester: add ability to skip tests unless explicitly selected
  2024-05-14 20:41 [PATCH BlueZ 1/3] shared/tester: add ability to skip tests unless explicitly selected Pauli Virtanen
  2024-05-14 20:41 ` [PATCH BlueZ 2/3] tools: disable running TX timestamping tests for now Pauli Virtanen
  2024-05-14 20:41 ` [PATCH BlueZ 3/3] Revert "mgmt-tester: update for Poll Errqueue experimental fature" Pauli Virtanen
@ 2024-05-14 23:29 ` bluez.test.bot
  2024-05-15 17:40 ` [PATCH BlueZ 1/3] " patchwork-bot+bluetooth
  3 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2024-05-14 23:29 UTC (permalink / raw)
  To: linux-bluetooth, pav

[-- Attachment #1: Type: text/plain, Size: 2753 bytes --]

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

---Test result---

Test Summary:
CheckPatch                    FAIL      1.22 seconds
GitLint                       FAIL      1.09 seconds
BuildEll                      PASS      24.25 seconds
BluezMake                     PASS      1664.16 seconds
MakeCheck                     PASS      13.01 seconds
MakeDistcheck                 PASS      174.92 seconds
CheckValgrind                 PASS      247.08 seconds
CheckSmatch                   WARNING   348.72 seconds
bluezmakeextell               PASS      118.31 seconds
IncrementalBuild              PASS      4560.27 seconds
ScanBuild                     PASS      999.19 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,3/3] Revert "mgmt-tester: update for Poll Errqueue experimental fature"
WARNING:UNKNOWN_COMMIT_ID: Unknown commit id 'c777c55ab662db4e9853bb08a6e1e6c77b319e09', maybe rebased or not pulled?
#96: 
This reverts commit c777c55ab662db4e9853bb08a6e1e6c77b319e09.

/github/workspace/src/src/13664420.patch total: 0 errors, 1 warnings, 18 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/13664420.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:
[BlueZ,1/3] shared/tester: add ability to skip tests unless explicitly selected

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: B2 Line has trailing whitespace: "    "
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
tools/sco-tester.c: note: in included file:./lib/bluetooth.h:219:15: warning: array of flexible structures./lib/bluetooth.h:224:31: warning: array of flexible structures


---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH BlueZ 1/3] shared/tester: add ability to skip tests unless explicitly selected
  2024-05-14 20:41 [PATCH BlueZ 1/3] shared/tester: add ability to skip tests unless explicitly selected Pauli Virtanen
                   ` (2 preceding siblings ...)
  2024-05-14 23:29 ` [BlueZ,1/3] shared/tester: add ability to skip tests unless explicitly selected bluez.test.bot
@ 2024-05-15 17:40 ` patchwork-bot+bluetooth
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2024-05-15 17:40 UTC (permalink / raw)
  To: Pauli Virtanen; +Cc: linux-bluetooth

Hello:

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

On Tue, 14 May 2024 23:41:48 +0300 you wrote:
> Make it possible to skip running a test, and skip running if the test
> was not explicitly selected on command line.
> ---
> 
> Notes:
>     This series disables the TX timestamping related tests by default for
>     now. The TX timestamping itself should be OK, and the assumption is we'd
>     re-enable these tests again once the kernel feature is reworked.
> 
> [...]

Here is the summary with links:
  - [BlueZ,1/3] shared/tester: add ability to skip tests unless explicitly selected
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a9f80a8195b7
  - [BlueZ,2/3] tools: disable running TX timestamping tests for now
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=975d3b148694
  - [BlueZ,3/3] Revert "mgmt-tester: update for Poll Errqueue experimental fature"
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d9de306a28fe

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-15 17:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-14 20:41 [PATCH BlueZ 1/3] shared/tester: add ability to skip tests unless explicitly selected Pauli Virtanen
2024-05-14 20:41 ` [PATCH BlueZ 2/3] tools: disable running TX timestamping tests for now Pauli Virtanen
2024-05-14 20:41 ` [PATCH BlueZ 3/3] Revert "mgmt-tester: update for Poll Errqueue experimental fature" Pauli Virtanen
2024-05-14 23:29 ` [BlueZ,1/3] shared/tester: add ability to skip tests unless explicitly selected bluez.test.bot
2024-05-15 17:40 ` [PATCH BlueZ 1/3] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox