summaryrefslogtreecommitdiff
path: root/skip-scp-test-if-there-is-no-scp-on-remote-path-as-s.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-02 04:02:17 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-02 04:02:17 +0000
commit24b6ed9bc1ef1538b8f3e254b30b1006f5e4d78f (patch)
treee2725d205951345a1c853965086be06d6a6cbf59 /skip-scp-test-if-there-is-no-scp-on-remote-path-as-s.patch
parentc7ba49a1e66ed27d507eafa4da2b81838a2afa64 (diff)
automatic import of openssh
Diffstat (limited to 'skip-scp-test-if-there-is-no-scp-on-remote-path-as-s.patch')
-rw-r--r--skip-scp-test-if-there-is-no-scp-on-remote-path-as-s.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/skip-scp-test-if-there-is-no-scp-on-remote-path-as-s.patch b/skip-scp-test-if-there-is-no-scp-on-remote-path-as-s.patch
new file mode 100644
index 0000000..ebb9a53
--- /dev/null
+++ b/skip-scp-test-if-there-is-no-scp-on-remote-path-as-s.patch
@@ -0,0 +1,38 @@
+From e32af8efd8d36f8349761615b73cb3174e52134a Mon Sep 17 00:00:00 2001
+From: chengyechun <chengyechun1@huawei.com>
+Date: Thu, 5 Jan 2023 22:45:10 +0800
+Subject: [PATCH] skip scp test if there is no scp on remote path as scp3.sh
+ did
+
+---
+ regress/multiplex.sh | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/regress/multiplex.sh b/regress/multiplex.sh
+index 4744fa3..8ab0f59 100644
+--- a/regress/multiplex.sh
++++ b/regress/multiplex.sh
+@@ -67,11 +67,15 @@ echo "get ${DATA} ${COPY}" | \
+ test -f ${COPY} || fail "sftp: failed copy ${DATA}"
+ cmp ${DATA} ${COPY} || fail "sftp: corrupted copy of ${DATA}"
+
+-rm -f ${COPY}
+-trace "scp transfer over multiplexed connection and check result"
+-${SCP} -S ${SSH} -F $OBJ/ssh_config -oControlPath=$CTL otherhost:${DATA} ${COPY} >>$TEST_REGRESS_LOGFILE 2>&1
+-test -f ${COPY} || fail "scp: failed copy ${DATA}"
+-cmp ${DATA} ${COPY} || fail "scp: corrupted copy of ${DATA}"
++$SSH -F $OBJ/ssh_proxy somehost \
++ 'IFS=":"; for i in $PATH;do [ -x "$i/scp" ] && exit 0; done; exit 1'
++if [ $? -eq 0 ]; then
++ rm -f ${COPY}
++ trace "scp transfer over multiplexed connection and check result"
++ ${SCP} -S ${SSH} -F $OBJ/ssh_config -oControlPath=$CTL otherhost:${DATA} ${COPY} >>$TEST_REGRESS_LOGFILE 2>&1
++ test -f ${COPY} || fail "scp: failed copy ${DATA}"
++ cmp ${DATA} ${COPY} || fail "scp: corrupted copy of ${DATA}"
++fi
+
+ rm -f ${COPY}
+ verbose "test $tid: forward"
+--
+2.23.0
+