After getting OpenSSH 7.7 to build :), the initial test fails as follows: test_kex: ............................................................................ ............................................................................ ............................................................................ ............................................................................ ................................................ 352 tests ok test_hostkeys: .................. 18 tests ok test_match: ...... 6 tests ok /home/git/openssh-portable/ssh-keygen -if /home/git/openssh-portable/regress/rsa_ssh2.prv | diff - /home/git/openssh-portable/regress/rsa_openssh.prv tr '\n' '\r' </home/git/openssh-portable/regress/rsa_ssh2.prv > /home/git/openssh-portable/regress/rsa_ssh2_cr.prv /home/git/openssh-portable/ssh-keygen -if /home/git/openssh-portable/regress/rsa_ssh2_cr.prv | diff - /home/git/openssh-portable/regress/rsa_openssh.prv awk '{print $0 "\r"}' /home/git/openssh-portable/regress/rsa_ssh2.prv > /home/git/openssh-portable/regress/rsa_ssh2_crnl.prv /home/git/openssh-portable/ssh-keygen -if /home/git/openssh-portable/regress/rsa_ssh2_crnl.prv | diff - /home/git/openssh-portable/regress/rsa_openssh.prv cat /home/git/openssh-portable/regress/rsa_openssh.prv > /regress/t2.out /bin/sh: /regress/t2.out: cannot create This comes down to the OBJ variable being set to REGRESSTMP = "$(PWD)/regress" Which may work on some platforms but is not portable. REGRESSTMP = `pwd` resolves properly My proposed fix is this, which allows the tests to run in a generic LINUX/POSIX environment and is agnostic to make. +++ b/Makefile.in @@ -577,7 +577,7 @@ regress-binaries: regress/modpipe$(EXEEXT) \ regress/unittests/utf8/test_utf8$(EXEEXT) \ regress/misc/kexfuzz/kexfuzz$(EXEEXT) -REGRESSTMP = "$(PWD)/regress" +REGRESSTMP = `pwd` tests interop-tests t-exec unit: regress-prep regress-binaries $(TARGETS) Cheers, Randall
Randall S. Becker <rsbecker at nexbridge.com> wrote:> > -REGRESSTMP = "$(PWD)/regress" > +REGRESSTMP = `pwd` > > tests interop-tests t-exec unit: regress-prep regress-binaries $(TARGETS) >It looks like the problem is that pwd is in uppercase, not so much the distinction between $() and ``. Can you confirm?>
On 13 April 2018 at 08:29, Josh Soref <jsoref at gmail.com> wrote:> Randall S. Becker <rsbecker at nexbridge.com> wrote: >> >> >> -REGRESSTMP = "$(PWD)/regress" >> +REGRESSTMP = `pwd` >> >> tests interop-tests t-exec unit: regress-prep regress-binaries $(TARGETS) > > > It looks like the problem is that pwd is in uppercase, not so much the > distinction between $() and ``.I would not put too much effort into analysing this. I made the original change in https://github.com/openssh/openssh-portable/commit/3fd2d229 with good intentions but there were a number of problems with it, the last of which was discovered just before the release. We decided that we would back it out but given how close to release it was we deferred it. -- Darren Tucker (dtucker at dtucker.net) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
On Thu, Apr 12, 2018 at 6:29 PM, Josh Soref <jsoref at gmail.com> wrote:> Randall S. Becker <rsbecker at nexbridge.com> wrote: > >> >> -REGRESSTMP = "$(PWD)/regress" >> +REGRESSTMP = `pwd` >> >> tests interop-tests t-exec unit: regress-prep regress-binaries $(TARGETS) >> > > It looks like the problem is that pwd is in uppercase, not so much the > distinction between $() and ``.PWD is a commonly set environment variable, built into shells such as bash, Changing it from "$(PWD)/regress" to `pwd` is begging for issues compiling it in Windows environments, where spaces and Unicode may be in the working directory name.. It's also no longer setting the directory to the "/regress" subdirectory, which is begging for confusion if done uncautiously.
On Thu, Apr 12, 2018 at 10:29:13PM +0000, Josh Soref wrote:> Randall S. Becker <rsbecker at nexbridge.com> wrote: > > -REGRESSTMP = "$(PWD)/regress" > > +REGRESSTMP = `pwd` > > > > tests interop-tests t-exec unit: regress-prep regress-binaries $(TARGETS) > > It looks like the problem is that pwd is in uppercase, not so much the > distinction between $() and ``.I think you're tripping over the difference between make and shell syntax here. In make, $(PWD) is a variable reference, not command substitution as in shell, and will work provided that a PWD environment variable exists, which in practice will depend mainly on the calling shell. $(pwd) would only work if a pwd environment variable exists, which is rare. My preferred way to write this would be REGRESSTMP = $(CURDIR)/regress (without the extraneous double-quotes, which are going to behave confusingly when substituted into a double-quoted string further down). -- Colin Watson [cjwatson at debian.org]