Closed xeruf closed 3 years ago
It looks like the test instance of Syncthing which is launched here terminates itself because the GUI listening port is already in use:
[JUKSI] 20:21:19 WARNING: Failed starting API: listen tcp 127.0.0.1:49878: bind: address already in use
[JUKSI] 20:21:19 INFO: Detected 1 NAT service
[JUKSI] 20:21:19 WARNING: Starting API/GUI: listen tcp 127.0.0.1:49878: bind: address already in use
[JUKSI] 20:21:19 INFO: UPnP parse: dial tcp 192.168.178.1:49000: operation was canceled
[JUKSI] 20:21:19 INFO: UPnP parse: dial tcp 192.168.178.1:49000: operation was canceled
[JUKSI] 20:21:20 INFO: TCP listener (127.0.0.1:32452) shutting down
[JUKSI] 20:21:20 INFO: Exiting
[monitor] 20:21:20 INFO: Syncthing exited: exit status 1
I'm wondering why that happens. A unique port is generated via the ephemeral_port()
function in the PKGBUILD so the likeliness for a collision should be small.
Could it be that ctest invokes the two tests (one for the library and one for the CLI) in parallel so they interfere with each other? I've never had this problem, though.
Ha, for another project I have globally set CTEST_PARALLEL_LEVEL
to 3, that might indeed be related. So that variable either needs to be reset before testing or the tests should be patched to be parallelisable.
Thanks for the application and packaging anyways :)
Should be fixed on master using https://cmake.org/cmake/help/latest/prop_test/RESOURCE_LOCK.html#prop_test:RESOURCE_LOCK.
I have seen #35,#63,#105 but none seem to contain info for how to resolve this properly...
Relevant components
syncthingctl
)libsyncthing
)Environment and versions Arch via AUR
Logs