[openssh-commits] [openssh] 01/05: upstream: Unnest rekey param parsing test and use ssh not sshd.

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Aug 20 23:02:37 AEST 2024


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

dtucker pushed a commit to branch master
in repository openssh.

commit 749896b874928c2785256cae4d75161dc3bfcc7d
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Tue Aug 20 07:27:25 2024 +0000

    upstream: Unnest rekey param parsing test and use ssh not sshd.
    
    ssh uses the same parsing code, now has "-G" to dump its config and is
    slightly faster to start up.  This speeds up the test slightly (~5%) in the
    common case but should help more during instrumented tests, eg under
    valgrind, where startup costs are magnified.
    
    OpenBSD-Regress-ID: 07c3acaf4c728e641033071f4441afc88141b0d0
---
 regress/rekey.sh | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/regress/rekey.sh b/regress/rekey.sh
index 8005a86a..4b37ec3f 100644
--- a/regress/rekey.sh
+++ b/regress/rekey.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: rekey.sh,v 1.20 2024/05/22 04:20:00 djm Exp $
+#	$OpenBSD: rekey.sh,v 1.21 2024/08/20 07:27:25 dtucker Exp $
 #	Placed in the Public Domain.
 
 tid="rekey"
@@ -136,9 +136,8 @@ for s in 5 10; do
 	fi
 done
 
-verbose "rekeylimit parsing"
+verbose "rekeylimit parsing: bytes"
 for size in 16 1k 1K 1m 1M 1g 1G 4G 8G; do
-    for time in 1 1m 1M 1h 1H 1d 1D 1w 1W; do
 	case $size in
 		16)	bytes=16 ;;
 		1k|1K)	bytes=1024 ;;
@@ -147,6 +146,15 @@ for size in 16 1k 1K 1m 1M 1g 1G 4G 8G; do
 		4g|4G)	bytes=4294967296 ;;
 		8g|8G)	bytes=8589934592 ;;
 	esac
+	b=`${SSH} -G -o "rekeylimit $size" -f $OBJ/ssh_proxy host | \
+	    awk '/rekeylimit/{print $2}'`
+	if [ "$bytes" != "$b" ]; then
+		fatal "rekeylimit size: expected $bytes bytes got $b"
+	fi
+done
+
+verbose "rekeylimit parsing: time"
+for time in 1 1m 1M 1h 1H 1d 1D 1w 1W; do
 	case $time in
 		1)	seconds=1 ;;
 		1m|1M)	seconds=60 ;;
@@ -154,19 +162,11 @@ for size in 16 1k 1K 1m 1M 1g 1G 4G 8G; do
 		1d|1D)	seconds=86400 ;;
 		1w|1W)	seconds=604800 ;;
 	esac
-
-	b=`$SUDO ${SSHD} -T -o "rekeylimit $size $time" -f $OBJ/sshd_proxy | \
-	    awk '/rekeylimit/{print $2}'`
-	s=`$SUDO ${SSHD} -T -o "rekeylimit $size $time" -f $OBJ/sshd_proxy | \
+	s=`${SSH} -G -o "rekeylimit default $time" -f $OBJ/ssh_proxy host | \
 	    awk '/rekeylimit/{print $3}'`
-
-	if [ "$bytes" != "$b" ]; then
-		fatal "rekeylimit size: expected $bytes bytes got $b"
-	fi
 	if [ "$seconds" != "$s" ]; then
 		fatal "rekeylimit time: expected $time seconds got $s"
 	fi
-    done
 done
 
 rm -f ${COPY} ${DATA}

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


More information about the openssh-commits mailing list