Browse code

Replace 'echo -n' with 'printf' in tests/t_lpback.sh

"echo -n" is inherently less portable than printf, so the tests look
ugly on (at least) OpenSolaris/Illumos on AIX.

Add a blank at the end of the tls-crypt-v2 messages, so it has the
same look as the cipher messages ("... OK").

Reported-by: mnowak on Trac
Trac: #1196

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Antonio Quartulli <a@unstable.cc>
Message-Id: <20200909130024.24264-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20930.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Gert Doering authored on 2020/09/09 22:00:24
Showing 1 changed files
... ...
@@ -44,7 +44,7 @@ set +e
44 44
 e=0
45 45
 for cipher in ${CIPHERS}
46 46
 do
47
-    echo -n "Testing cipher ${cipher}... "
47
+    printf "Testing cipher ${cipher}... "
48 48
     ( "${top_builddir}/src/openvpn/openvpn" --test-crypto --secret key.$$ --cipher ${cipher} ) >log.$$ 2>&1
49 49
     if [ $? != 0 ] ; then
50 50
         echo "FAILED"
... ...
@@ -55,7 +55,7 @@ do
55 55
     fi
56 56
 done
57 57
 
58
-echo -n "Testing tls-crypt-v2 server key generation..."
58
+printf "Testing tls-crypt-v2 server key generation... "
59 59
 "${top_builddir}/src/openvpn/openvpn" \
60 60
     --genkey tls-crypt-v2-server tc-server-key.$$ >log.$$ 2>&1
61 61
 if [ $? != 0 ] ; then
... ...
@@ -66,7 +66,7 @@ else
66 66
     echo "OK"
67 67
 fi
68 68
 
69
-echo -n "Testing tls-crypt-v2 key generation (no metadata)..."
69
+printf "Testing tls-crypt-v2 key generation (no metadata)... "
70 70
 "${top_builddir}/src/openvpn/openvpn" --tls-crypt-v2 tc-server-key.$$ \
71 71
     --genkey tls-crypt-v2-client tc-client-key.$$ >log.$$ 2>&1
72 72
 if [ $? != 0 ] ; then
... ...
@@ -84,7 +84,7 @@ while [ $i -lt 732 ]; do
84 84
     METADATA="${METADATA}A"
85 85
     i=$(expr $i + 1)
86 86
 done
87
-echo -n "Testing tls-crypt-v2 key generation (max length metadata)..."
87
+printf "Testing tls-crypt-v2 key generation (max length metadata)... "
88 88
 "${top_builddir}/src/openvpn/openvpn" --tls-crypt-v2 tc-server-key.$$ \
89 89
     --genkey tls-crypt-v2-client tc-client-key.$$ "${METADATA}" \
90 90
     >log.$$ 2>&1