Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v1 04/11] test: functional: answer the notification registered by the victim
Date: Tue, 15 Sep 2026 17:15:21 -0400	[thread overview]
Message-ID: <20260915211528.1223784-5-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20260915211528.1223784-1-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

The AVRCP target of the NN-2026-0145 test tells the victim it supports
the track changed event, so the victim registers a notification for it,
but the target never answers it.

The request then times out after 10 seconds, is retried once, and times
out again, so the victim only sends the ListPlayerAttributes the test
needs 20 seconds later, which is most of the time the test takes.

Answer it with an interim response, as a target would.

Assisted-by: opencode:claude-opus-5
---
 test/functional/test_avrcp.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/test/functional/test_avrcp.py b/test/functional/test_avrcp.py
index f6ede96cbc0b..da892d1e8be2 100644
--- a/test/functional/test_avrcp.py
+++ b/test/functional/test_avrcp.py
@@ -70,6 +70,7 @@ def check_avrcp_GHSA_m2vx_pw5f_rc8v(bus):
     AVCTP_RESPONSE = 1
     AVC_CTYPE_ACCEPTED = 0x09
     AVC_CTYPE_STABLE = 0x0C
+    AVC_CTYPE_INTERIM = 0x0F
     AVC_OP_VENDORDEP = 0x00
     AVC_SUBUNIT_PANEL = 0x09
 
@@ -213,6 +214,18 @@ def check_avrcp_GHSA_m2vx_pw5f_rc8v(bus):
                     )
                 elif pdu_id == PDU_REGISTER_NOTIFICATION:
                     print("[*] RegisterNotification: %s" % hexdump(params), flush=True)
+
+                    # Answer as a target would, otherwise the request
+                    # times out and is retried, and the controller only
+                    # moves on to the next one 20 seconds later
+                    self.response(
+                        transaction,
+                        AVC_CTYPE_INTERIM,
+                        avrcp_pdu(
+                            PDU_REGISTER_NOTIFICATION,
+                            bytes([EVENT_TRACK_CHANGED]) + bytes(8),
+                        ),
+                    )
                 else:
                     self.response(transaction, 0x0A, avrcp_pdu(pdu_id, b"\x00"))
 
-- 
2.55.0


  parent reply	other threads:[~2026-09-15 21:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 21:15 [PATCH BlueZ v1 00/11] Cover a BAP stream to a coordinated set Luiz Augusto von Dentz
2026-09-15 21:15 ` [PATCH BlueZ v1 01/11] shared/bass: add a ready callback Luiz Augusto von Dentz
2026-09-15 21:58   ` Cover a BAP stream to a coordinated set bluez.test.bot
2026-09-16  0:55   ` bluez.test.bot
2026-09-15 21:15 ` [PATCH BlueZ v1 02/11] bass: wait for the session to be ready before pushing a source Luiz Augusto von Dentz
2026-09-15 21:15 ` [PATCH BlueZ v1 03/11] test: functional: report what a test is waiting for Luiz Augusto von Dentz
2026-09-15 21:15 ` Luiz Augusto von Dentz [this message]
2026-09-15 21:15 ` [PATCH BlueZ v1 05/11] doc: describe the BAP coordinated set test cases Luiz Augusto von Dentz
2026-09-15 21:15 ` [PATCH BlueZ v1 06/11] emulator: use the handle of the receiving side Luiz Augusto von Dentz
2026-09-15 21:15 ` [PATCH BlueZ v1 07/11] emulator: allow the maximum number of CIS of a CIG Luiz Augusto von Dentz
2026-09-15 21:15 ` [PATCH BlueZ v1 08/11] device: keep the long term key of both roles Luiz Augusto von Dentz
2026-09-15 21:15 ` [PATCH BlueZ v1 09/11] client: allow a capability with the auto agent Luiz Augusto von Dentz
2026-09-15 21:15 ` [PATCH BlueZ v1 10/11] test: functional: fail as soon as an operation fails Luiz Augusto von Dentz
2026-09-15 21:15 ` [PATCH BlueZ v1 11/11] test: functional: add the BAP coordinated set tests Luiz Augusto von Dentz
2026-09-16 18:30 ` [PATCH BlueZ v1 00/11] Cover a BAP stream to a coordinated set patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260915211528.1223784-5-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox