[openssh-commits] [openssh] 01/01: upstream: Instead of running sed over the whole log to remove CRs,

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Oct 7 13:09:14 AEDT 2019


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit b1e79ea8fae9c252399677a28707661d85c7d00c
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Sun Oct 6 11:49:50 2019 +0000

    upstream: Instead of running sed over the whole log to remove CRs,
    
    remove them only where it's needed (and confuses test(1) on at least OS X in
    portable).
    
    OpenBSD-Regress-ID: a6ab9b4bd1d33770feaf01b2dfb96f9e4189d2d0
---
 regress/dhgex.sh | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/regress/dhgex.sh b/regress/dhgex.sh
index ceb3b5d2..ae64a9fb 100644
--- a/regress/dhgex.sh
+++ b/regress/dhgex.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: dhgex.sh,v 1.5 2019/09/27 05:25:12 dtucker Exp $
+#	$OpenBSD: dhgex.sh,v 1.6 2019/10/06 11:49:50 dtucker Exp $
 #	Placed in the Public Domain.
 
 tid="dhgex"
@@ -28,9 +28,6 @@ ssh_test_dhgex()
 	if [ $? -ne 0 ]; then
 		fail "ssh failed ($@)"
 	fi
-	# Remove CRs.
-	sed 's/\r//' ${LOG} >${LOG}.new
-	mv ${LOG}.new ${LOG}
 	# check what we request
 	grep "SSH2_MSG_KEX_DH_GEX_REQUEST($groupsz) sent" ${LOG} >/dev/null
 	if [ $? != 0 ]; then
@@ -38,7 +35,8 @@ ssh_test_dhgex()
 		fail "$tid unexpected GEX sizes, expected $groupsz, got $got"
 	fi
 	# check what we got.
-	gotbits="`awk '/bits set:/{print $4}' ${LOG} | head -1 | cut -f2 -d/`"
+	gotbits="`awk 'BEGIN{FS="/"}/bits set:/{print $2}' ${LOG} |
+	    head -1 | tr -d '\r\n'`"
 	trace "expected '$bits' got '$gotbits'"
 	if [ -z "$gotbits" ] || [ "$gotbits" -lt "$bits" ]; then
 		fatal "$tid expected $bits bit group, got $gotbits"

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list