[openssh-commits] [openssh] 01/01: upstream: for the pty control tests, just check that the PTY path

git+noreply at mindrot.org git+noreply at mindrot.org
Sun Mar 4 12:47:51 AEDT 2018


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

djm pushed a commit to branch master
in repository openssh.

commit 7e4fadd3248d6bb7d39d6688c76a613d35d2efc1
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Sun Mar 4 01:46:48 2018 +0000

    upstream: for the pty control tests, just check that the PTY path
    
    points to something in /dev (rather than checking the device node itself);
    makes life easier for portable, where systems with dynamic ptys can delete
    nodes before we get around to testing their existence.
    
    OpenBSD-Regress-ID: b1e455b821e62572bccd98102f8dd9d09bb94994
---
 regress/key-options.sh | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/regress/key-options.sh b/regress/key-options.sh
index aa5f8bf9..5e3a4f66 100644
--- a/regress/key-options.sh
+++ b/regress/key-options.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: key-options.sh,v 1.5 2018/03/02 02:53:27 djm Exp $
+#	$OpenBSD: key-options.sh,v 1.6 2018/03/04 01:46:48 djm Exp $
 #	Placed in the Public Domain.
 
 tid="key options"
@@ -32,9 +32,10 @@ expect_pty_succeed() {
 		fail "key option failed $which"
 	else
 		r=`cat $OBJ/data`
-		if [ ! -e "$r" ]; then
-			fail "key option failed $which (pty $r)"
-		fi
+		case "$r" in
+		/dev/*) ;;
+		*)	fail "key option failed $which (pty $r)" ;;
+		esac
 	fi
 }
 expect_pty_fail() {
@@ -49,6 +50,10 @@ expect_pty_fail() {
 		if [ -e "$r" ]; then
 			fail "key option failed $which (pty $r)"
 		fi
+		case "$r" in
+		/dev/*)	fail "key option failed $which (pty $r)" ;;
+		*)	;;
+		esac
 	fi
 }
 # First ensure that we can allocate a pty by default.

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


More information about the openssh-commits mailing list