On 16/07/2019 18.12, Max Reitz wrote: > On 16.07.19 18:09, Eric Blake wrote: >> On 7/16/19 10:58 AM, Max Reitz wrote: [...] >>>> 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.
Anyway, it would be great if someone who's familiar with the code could
find a proper fix for this problem. FWIW, it also happens on Linux:
mkdir
/tmp/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
cd
/tmp/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/
~/path/to/qemu/configure --target-list=x86_64-softmmu
make -j8
cd tests/qemu-iotests/
./check -g quick -qcow2
...
058 fail [09:29:33] [09:29:34] output mismatch
(see 058.out.bad)
--- /home/thuth/devel/qemu/tests/qemu-iotests/058.out 2019-04-23
16:43:12.000000000 +0200
+++
/tmp/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/058.out.bad
2019-07-18 09:29:34.305070819 +0200
@@ -17,18 +17,22 @@
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read 4096/4096 bytes at offset 8192
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-nbd: UNIX socket path
'/tmp/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/scratch/qemu-nbd.sock'
is too long
+Path must be less than 108 bytes
...
065 fail [09:29:38] [09:29:38] output mismatch
(see 065.out.bad)
--- /home/thuth/devel/qemu/tests/qemu-iotests/065.out 2019-04-23
16:43:12.000000000 +0200
+++
/tmp/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/tests/qemu-iotests/065.out.bad
2019-07-18 09:29:38.568118520 +0200
@@ -1,5 +1,41 @@
-........
+....E..E
+======================================================================
+ERROR: test_qmp (__main__.TestQCow3LazyQMP)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+ File "065", line 75, in setUp
+ self.vm.launch()
+ File
"/home/thuth/devel/qemu/tests/qemu-iotests/../../python/qemu/machine.py", line
294, in launch
+ self._launch()
+ File
"/home/thuth/devel/qemu/tests/qemu-iotests/../../python/qemu/machine.py", line
311, in _launch
+ self._pre_launch()
+ File "/home/thuth/devel/qemu/tests/qemu-iotests/../../python/qemu/qtest.py",
line 103, in _pre_launch
+ super(QEMUQtestMachine, self)._pre_launch()
+ File
"/home/thuth/devel/qemu/tests/qemu-iotests/../../python/qemu/machine.py", line
262, in _pre_launch
+ server=True)
+ File "/home/thuth/devel/qemu/tests/qemu-iotests/../../python/qemu/qmp.py",
line 60, in __init__
+ self.__sock.bind(self.__address)
+OSError: AF_UNIX path too long
...
Thomas
signature.asc
Description: OpenPGP digital signature
