On 16.07.19 18:09, Eric Blake wrote: > On 7/16/19 10:58 AM, Max Reitz wrote: > >>>> Ah, OK. So, uh, we effectively can’t run any Python tests on macOS? >>> >>> Not when our CI is set up to use super-long file names: >>> >>> + File >>> "/private/var/folders/sy/2x5qvs0n4lg18fry9jz4y21m0000gn/T/cirrus-ci-build/tests/qemu-iotests/../../python/qemu/machine.py", >>> line 294, in launch >> >> That isn’t really long. > > The MacOS limit is 104 (or 103 if you insist on using the trailing NUL > yourself), compared to Linux at 108 (107). And: > > $ printf > "/private/var/folders/sy/2x5qvs0n4lg18fry9jz4y21m0000gn/T/cirrus-ci-build/tests/qemu-iotests/scratch/name" > | wc -c > 104 > > shows that we are right on the verge of overflowing the space allotted, > with any socket name worth using when the socket lives inside > qemu-iotests/scratch. > >> >>> Is there any way to create our sockets somewhere under /tmp instead of >>> inside tests/qemu-iotests, so that we have a shorter filename for >>> sockets no matter how deep in the file hierarchy the tests themselves live? >>> >>> Also, at one point, we tossed around the idea of >>> s/qemu-iotests/iotests/, to shave off 5 characters that don't really add >>> anything. >> >> I’d personally rather just skip the iotests if we detect such a silly >> OS, but maybe that’s just me. > > It's a rather unfortunate limit, but it's not all that silly (the limit > is based on the fact that struct sockaddr has to fit inside a nice > power-of-2 structure somewhere in the kernel, and enough else is used > that you really are left with just 104/108 bytes, or even 92 bytes if > you use HP-UX 11). POSIX does not place a minimum length on sun_path, > but I know of no system that does not allow at least 92 bytes, if you > are aiming for a portably-small name.
It does come to me as a surprise that the sockaddr is a path instead of, say, an inode number. But shaving off the “qemu-” seems like the wrong approach to me still. Max
signature.asc
Description: OpenPGP digital signature
