功能:扩展U盘兼容并优化插拔响应和导出负载

This commit is contained in:
songyiming committed 2026-11-04 19:12:42 +08:00
1 parent b2de05c6a6
commit bb5f554820
9 files changed
+589 -73

No files matched your search

+6
View File
@@ -33,6 +33,12 @@ class UsbQmpTests(unittest.TestCase):
device = next(a for n, a in q.calls if n == "device_add")
self.assertEqual(device["filter"], "0x08:0x0951:0x1666:-1:1|-1:-1:-1:-1:0")
def test_any_storage_filter_keeps_hid_and_hub_out(self):
q = FakeQmp()
usb.attach(q, 100, 40001, "ehci-2.0")
device = next(a for n, a in q.calls if n == "device_add")
self.assertEqual(device["filter"], "0x08:-1:-1:-1:1|-1:-1:-1:-1:0")
def test_busy_endpoint_is_never_replaced(self):
q = FakeQmp(occupied=True)
with self.assertRaisesRegex(RuntimeError, "already exists"):