Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1753?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+2 by plaisthos
Change subject: t_client.sh.in: Use printf instead of echo -e
......................................................................
t_client.sh.in: Use printf instead of echo -e
In some shells the echo builtin doesn't interpret -e as
an argument, it just outputs it as a string.
Examples for shells I have observed this with are dash on
Ubuntu and /bin/sh on macOS.
Use printf instead which should have better consistency
across shells and operating systems.
Change-Id: I746bd8c0fa3496d23569cde496438fc4189600fe
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M tests/t_client.sh.in
1 file changed, 11 insertions(+), 12 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/53/1753/2
diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in
index 48e2446..c3e98a8 100755
--- a/tests/t_client.sh.in
+++ b/tests/t_client.sh.in
@@ -132,21 +132,20 @@
{
case $V in
0) outbuf="" ;; # no per-test output at all
- 1) echo -e "$@" # compact, details only on failure
+ 1) printf "$@\n" # compact, details only on
failure
outbuf="\n" ;;
- *) echo -e "\n$@\n" ;; # print all, with a bit formatting
+ *) printf "\n$@\n" ;; # print all, with a bit formatting
esac
}
output()
{
- NO_NL=''; if [ "X$1" = "X-n" ] ; then NO_NL=$1 ; shift ; fi
+ END_NL="\n"; if [ "X$1" = "X-n" ] ; then END_NL="" ; shift ; fi
case $V in
0) ;; # no per-test output at all
- 1) outbuf="$outbuf$@" # print details only on failure
- test -z "$NO_NL" && outbuf="$outbuf\n"
+ 1) outbuf="$outbuf$@${END_NL}" # print details only on failure
;;
- *) echo -e $NO_NL "$@" ;; # print everything
+ *) printf "$@${END_NL}" ;; # print everything
esac
}
@@ -340,7 +339,7 @@
else
output "skip check failed, SKIP test $SUF."
SUMMARY_SKIP="$SUMMARY_SKIP $SUF"
- echo -e "$outbuf" ; continue
+ printf "$outbuf" ; continue
fi
fi
@@ -361,7 +360,7 @@
fail "make sure that ping hosts are ONLY reachable via VPN, SKIP test
$SUF."
SUMMARY_FAIL="$SUMMARY_FAIL $SUF"
exit_code=31
- echo -e "$outbuf" ; continue
+ printf "$outbuf" ; continue
fi
pidfile="${top_builddir}/tests/$LOGDIR/openvpn-$SUF.pid"
@@ -407,7 +406,7 @@
trap - 0 1 2 3 15
SUMMARY_FAIL="$SUMMARY_FAIL $SUF"
exit_code=30
- echo -e "$outbuf" ; continue
+ printf "$outbuf" ; continue
fi
# make sure openvpn client is terminated in case shell exits
@@ -470,15 +469,15 @@
SUMMARY_OK="$SUMMARY_OK $SUF"
else
if [ "$V" -gt 0 ] ; then
- echo -e -n "$outbuf"
- echo -e "test run $SUF: $fail_count test failures. FAIL.\n"
+ printf "$outbuf"
+ echo "test run $SUF: $fail_count test failures. FAIL."
fi
SUMMARY_FAIL="$SUMMARY_FAIL $SUF"
exit_code=30
fi
if [ -n "$test_cleanup" ]; then
- echo -e "cleaning up: '$test_cleanup'"
+ echo "cleaning up: '$test_cleanup'"
eval $test_cleanup
fi
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1753?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I746bd8c0fa3496d23569cde496438fc4189600fe
Gerrit-Change-Number: 1753
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel