diff mbox series

[BlueZ,1/4] vhci: Add function to pause processing input from vhci

Message ID feaee15ebafa76155f6c1a91755d6d5ba054d451.1692451184.git.pav@iki.fi
State New
Headers show
Series [BlueZ,1/4] vhci: Add function to pause processing input from vhci | expand

Commit Message

Pauli Virtanen Aug. 19, 2023, 1:31 p.m. UTC
Add function to pause (temporarily) reading data from vhci.  This can be
used to synchronously pause handling of btdev commands from the kernel.
---
 emulator/vhci.c | 9 +++++++++
 emulator/vhci.h | 1 +
 2 files changed, 10 insertions(+)

Comments

bluez.test.bot@gmail.com Aug. 19, 2023, 3:56 p.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=777635

---Test result---

Test Summary:
CheckPatch                    PASS      2.53 seconds
GitLint                       FAIL      1.59 seconds
BuildEll                      PASS      27.66 seconds
BluezMake                     PASS      992.12 seconds
MakeCheck                     PASS      12.10 seconds
MakeDistcheck                 PASS      158.27 seconds
CheckValgrind                 PASS      258.93 seconds
CheckSmatch                   WARNING   345.63 seconds
bluezmakeextell               PASS      104.86 seconds
IncrementalBuild              PASS      3340.97 seconds
ScanBuild                     PASS      1062.42 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,3/4] sco-tester: add test for ACL disconnect before SCO established

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
8: B1 Line exceeds max length (86>80): "Link: https://lore.kernel.org/linux-bluetooth/00000000000013b93805fbbadc50@google.com/"
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
tools/sco-tester.c: note: in included file:./lib/bluetooth.h:216:15: warning: array of flexible structures./lib/bluetooth.h:221:31: warning: array of flexible structures


---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Aug. 21, 2023, 8 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 Sat, 19 Aug 2023 16:31:20 +0300 you wrote:
> Add function to pause (temporarily) reading data from vhci.  This can be
> used to synchronously pause handling of btdev commands from the kernel.
> ---
>  emulator/vhci.c | 9 +++++++++
>  emulator/vhci.h | 1 +
>  2 files changed, 10 insertions(+)

Here is the summary with links:
  - [BlueZ,1/4] vhci: Add function to pause processing input from vhci
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=dbe52200549b
  - [BlueZ,2/4] hciemu: Add hciemu_flush_client_events for ordering VHCI vs bthost
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=bfcc3f7bf48f
  - [BlueZ,3/4] sco-tester: add test for ACL disconnect before SCO established
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=465108814db2
  - [BlueZ,4/4] iso-tester: add test for ACL disconnect before ISO created
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=70b4db6803b4

You are awesome, thank you!
diff mbox series

Patch

diff --git a/emulator/vhci.c b/emulator/vhci.c
index ecf1db3c7..c6a5caa5e 100644
--- a/emulator/vhci.c
+++ b/emulator/vhci.c
@@ -178,6 +178,15 @@  void vhci_close(struct vhci *vhci)
 	vhci_destroy(vhci);
 }
 
+bool vhci_pause_input(struct vhci *vhci, bool paused)
+{
+	if (paused)
+		return io_set_read_handler(vhci->io, NULL, NULL, NULL);
+	else
+		return io_set_read_handler(vhci->io, vhci_read_callback, vhci,
+									NULL);
+}
+
 struct btdev *vhci_get_btdev(struct vhci *vhci)
 {
 	if (!vhci)
diff --git a/emulator/vhci.h b/emulator/vhci.h
index 68eae4c4a..12c4b55a0 100644
--- a/emulator/vhci.h
+++ b/emulator/vhci.h
@@ -31,3 +31,4 @@  int vhci_set_emu_opcode(struct vhci *vhci, uint16_t opcode);
 int vhci_set_force_static_address(struct vhci *vhci, bool enable);
 int vhci_force_devcd(struct vhci *vhci, const void *data, size_t len);
 int vhci_read_devcd(struct vhci *vhci, void *buf, size_t size);
+bool vhci_pause_input(struct vhci *vhci, bool paused);