martinpitt / umockdev

Mock hardware devices for creating unit tests and bug reporting
https://launchpad.net/umockdev
GNU Lesser General Public License v2.1
314 stars 58 forks source link

pcap: Add appropriate endianness conversions for USB pcap header #234

Open benzea opened 8 months ago

benzea commented 8 months ago

The USB pcap header should always be little endian. As such, add the appropriate conversions where necessary to ensure that the data is interpreted correctly on big endian architectures.

Maybe this fixes the sparc SIGBUS problem

benzea commented 8 months ago

Hmm, that amd64 ubuntu:devel failure does not look like a regression from this patch (failing after umockdev-testbed/libc so /umockdev-testbed/uevent/libudev). Looks a little bit odd to be honest …

benzea commented 8 months ago

Uh, did the test previously pass on s390x? I am a bit confused that the urb is not reaped in https://download.copr.fedorainfracloud.org/results/packit/martinpitt-umockdev-234/fedora-rawhide-s390x/07099222-umockdev/builder-live.log.gz :-)

But, I think I would need to debug on an s390x machine. Just staring at the code I don't see anything wrong.

martinpitt commented 8 months ago

that amd64 ubuntu:devel failure does not look like a regression from this patch

I haven't seen it fail recently, but I retried and it passed.

Uh, did the test previously pass on s390x?

Yes, it did. Everything has been green for a while except for nix, and that got fixed this morning. So this is definitively a regression. Note that s390x is big-endian (for that very reason I want it in PR tests).

benzea commented 8 months ago

Yes, it did. Everything has been green for a while except for nix, and that got fixed this morning. So this is definitively a regression. Note that s390x is big-endian (for that very reason I want it in PR tests).

That is … odd. It must be pure luck that it is working, but no idea right now how that could happen (possibly because those are mostly control transfers). Anyway, later.