Bug 2660 - Create mux socket for regress in temp directory
Summary: Create mux socket for regress in temp directory
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Regression tests (show other bugs)
Version: 7.4p1
Hardware: Other Linux
: P5 enhancement
Assignee: Damien Miller
URL:
Keywords:
Depends on:
Blocks: V_7_8
  Show dependency treegraph
 
Reported: 2017-01-03 23:19 AEDT by Colin Watson
Modified: 2021-04-23 15:09 AEST (History)
2 users (show)

See Also:


Attachments
Create mux socket for regress in temp directory (4.50 KB, patch)
2017-01-03 23:19 AEDT, Colin Watson
dtucker: ok+
Details | Diff
create forwarding.sh CTL socket in /tmp (305 bytes, patch)
2017-03-17 16:47 AEDT, Damien Miller
dtucker: ok+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Watson 2017-01-03 23:19:37 AEDT
Created attachment 2926 [details]
Create mux socket for regress in temp directory

In some setups, creating the socket under OBJ may result in a path that is too long for a Unix domain socket.  The failure in https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-zesty/zesty/s390x/o/openssh/20170103_003152_0b07a@/log.gz was due to this.

While of course it's possible to say that everyone must ensure that OBJ is short enough to avoid exceeding this limit, the limit is quite low at least on Linux (108 characters), and it would seem friendlier to create a temporary directory instead so that it's more likely to fit.  Patch attached (which overlaps a bit with that in https://bugzilla.mindrot.org/show_bug.cgi?id=2659, but not terribly).
Comment 1 Colin Watson 2017-01-04 14:32:37 AEDT
This has indeed fixed my remaining failures: with this and my other recent regress/ patches, I now have a full set of passing tests on Debian/amd64 and Ubuntu/{amd64,armhf,i386,ppc64el,s390x}.
Comment 2 Damien Miller 2017-03-17 16:47:45 AEDT
Created attachment 2964 [details]
create forwarding.sh CTL socket in /tmp

I think Colin's solution is best, but we're too close to release now. This just makes forwarding.sh use the same location as multiplex.sh and should take the immediate pain away.
Comment 3 Damien Miller 2017-06-30 13:43:00 AEST
Move incomplete bugs to openssh-7.6 target since 7.5 shipped a while back.

To calibrate expectations, there's little chance all of these are going to make 7.6.
Comment 4 Damien Miller 2017-06-30 13:44:27 AEST
remove 7.5 target
Comment 5 Damien Miller 2018-04-06 13:12:20 AEST
Move to OpenSSH 7.8 tracking bug
Comment 6 Darren Tucker 2018-07-20 14:41:16 AEST
Comment on attachment 2926 [details]
Create mux socket for regress in temp directory

looks reasonable to me
Comment 7 Damien Miller 2018-07-20 14:55:58 AEST
I've committed a slightly-modified version of Colin's patch. The only substantive change was s/TMP/SSH_REGRESS_TMP/ because the "rm -rf $TMP" gave me the heebie-jeebies wrt namespace pollution.

commit c59aca8adbdf7f5597084ad360a19bedb3f80970
Author: Damien Miller <djm@mindrot.org>
Date:   Fri Jul 20 14:53:42 2018 +1000

    Create control sockets in clean temp directories
    
    Adds a regress/mkdtemp tool and uses it to create empty temp
    directories for tests needing control sockets.
    
    Patch from Colin Watson via bz#2660; ok dtucker
Comment 8 Damien Miller 2021-04-23 15:09:39 AEST
closing resolved bugs as of 8.6p1 release