Re: [PATCH v7] usbip: make remote list honor parsable output

From: jasoncola1

Date: Sat Oct 24 2026 - 00:07:22 EST


Hi Shuah and all,

Following up on the October 1 test report for v7. The host and client
ran in two separate x86_64 QEMU VMs on Linux 7.3-rc5, on one physical
host. The report includes before/after remote-list output, unchanged
human-readable output, attach/detach checks, and matching transfer
checksums.

Could you let me know whether that addresses the requested validation,
or whether you need a different test setup before review can proceed?

Thanks,
Jason

On Thu, 01 Oct 2026 09:13:21 -0700, jasoncola1@xxxxxxxxx wrote:
> Hi Shuah and all,
>
> I tested the exact v7 patch with the host and client on two separate
> x86_64 QEMU VMs, both running Linux 7.3.0-rc5, built from the official
> v7.3-rc5 tag (72d3fcf802c45d00b300f25b848a93c3a2bd7c7e).
>
> The host was 192.0.2.1 and the client 192.0.2.2. A QEMU USB mass-storage
> device (46f4:0001, busid 2-1) was bound to usbip-host and exported by
> the real usbipd on port 3240. Both client binaries were built from the
> same 7.3-rc5 usbip-utils 2.0 sources; only the v7 change differs.
>
> Before, on the client:
> $ /opt/usbip-before/usbip list -p -r 192.0.2.1
> Exportable USB devices
> ======================
> - 192.0.2.1
> 2-1: QEMU : QEMU USB mass storage (46f4:0001)
> : /sys/devices/pci0000:00/0000:00:03.0/usb2/2-1
> : (Defined at Interface level) (00/00/00)
> exit=0
>
> After, on the same client against the same host:
> $ /opt/usbip-after/usbip list -p -r 192.0.2.1
> busid=2-1#usbid=46f4:0001#
> exit=0
>
> The output without -p was byte-identical before and after. The v7
> client also attached the device at VHCI port 08, enumerated it as
> /dev/sda, and read the full 1 MiB disk. Its SHA-256 matched the source:
> 87b755d14716cb3fd1622fae9c5dc5f7e2b758fb1b4c2575234839ba2f7d6b03
> Detach succeeded and left no imported port. Unbinding on the host made
> the parsable list exit 0 with zero bytes on stdout; rebinding restored
> the record. All commands passed. The attached report records exact
> commands, output, exit codes, source identifiers, and test limitations.
>
> These were two VMs on one physical host, with emulated USB hardware,
> not two physical machines. No code changes were made to v7; -p still
> precedes -r. Codex assisted with test orchestration and this report.
>
> Thanks,
> Jason
>
>
> On Thu, 01 Oct 2026 06:53:52 -0600, Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> wrote:
> > On 10/1/26 06:49, Shuah Khan wrote:
> > > On 9/26/26 22:00, Jason Colapietro wrote:
> > >> Hi Shuah and all,
> > >>
> > >> The exact v7 patch has now been built and tested with a native Linux
> > >> USB/IP stack.
> > >>
> > >> Test setup: Alpine Linux 3.23.4 on aarch64, kernel 6.18.53-0-lts,
> > >> usbip-utils 2.0. A QEMU USB mass-storage device (46f4:0001, busid 2-1)
> > >> was bound to usbip-host and exported by usbipd. The client connected
> > >> to 127.0.0.1:3240.
> > >>
> > >> With the unpatched client, "usbip list -p -r 127.0.0.1" still printed
> > >> the human-readable "Exportable USB devices" report, reproducing the
> > >> bug. With the v7 client, the same command returned:
> > >>
> > >>      busid=2-1#usbid=46f4:0001#
> > >>
> > >> "usbip list -r 127.0.0.1" retained its human-readable output,
> > >> including the device path and interface details. After unbinding the
> > >> device, the parsable command exited successfully with zero bytes on
> > >> stdout; rebinding restored the record.
> > >>
> > >> I also attached busid 2-1 through the v7 client. "usbip port" showed
> > >> it imported through vhci_hcd at port 08, and lsusb showed the device
> > >> on both the original and virtual host buses. Detach succeeded, leaving
> > >> no imported port. The build, list, attach, and detach commands all
> > >> exited successfully.
> > >>
> > >> This was one Linux VM with an emulated USB device and TCP loopback. I
> > >> have not tested physical USB hardware or two separate machines. The
> > >> existing option-order behavior is unchanged: -p must precede -r.
> > >
> > > Please test this with two systems hots running on one and client on the
> > > other. Send me before and after output that shows the bug and that it is
> > > fixed by your change.
> >
> > Another thing. This needs to be reproduced and tested on the latest kenel,
> > Linux 7.3-rc5
> >
> > thanks,
> > -- Shuah