]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Avoid "if ! thing || ! otherthing; then" constructs since
authordtucker@openbsd.org <dtucker@openbsd.org>
Sun, 7 Dec 2025 02:59:53 +0000 (02:59 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Sun, 7 Dec 2025 03:01:59 +0000 (14:01 +1100)
they seem to cause portability problems.

OpenBSD-Regress-ID: ff001be683de43bf396cd5f9f6a54e0c7a99c3cf

regress/multiplex.sh

index f68af935e456b9617fe390a99386f6725891ecad..584bbbe226192fbc3625bbaf28e93873647fa3bf 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: multiplex.sh,v 1.40 2025/12/06 03:23:27 dtucker Exp $
+#      $OpenBSD: multiplex.sh,v 1.41 2025/12/07 02:59:53 dtucker Exp $
 #      Placed in the Public Domain.
 
 tid="connection multiplexing"
@@ -214,14 +214,18 @@ start_mux_master
 verbose "test $tid: cmd conninfo algos"
 conninfo=`${SSH} -F $OBJ/ssh_config -S $CTL -Oconninfo otherhost` \
      || fail "request remote forward failed"
-if ! echo "$conninfo" | grep "kexalgorithm curve25519-sha256" >/dev/null ||
-    ! echo "$conninfo" | grep "cipher aes128-ctr" >/dev/null; then
+if echo "$conninfo" | grep "kexalgorithm curve25519-sha256" >/dev/null &&
+    echo "$conninfo" | grep "cipher aes128-ctr" >/dev/null; then
+       trace "ok conninfo algos"
+else
        fail "conninfo algos"
 fi
 if [ "$compression" = "yes" ]; then
        verbose "test $tid: cmd conninfo compression"
-       if ! echo "$conninfo" | grep "compression zlib" >/dev/null ||
-           ! echo "$conninfo" | grep "compressed" >/dev/null; then
+       if echo "$conninfo" | grep "compression zlib" >/dev/null &&
+           echo "$conninfo" | grep "compressed" >/dev/null; then
+               trace "ok conninfo compression"
+       else
                fail "conninfo compression"
        fi
 fi