Skip to contentSkip to conversation

fix test when white space is present

PATCH In review Antonio Quartulli 2 participants 3 messages Jul 16, 2017 – Jul 17, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix test when white space is present

For some CHOST ret_want and ret_got may contain a whitespace. Add double quotes around ret_want to avoid messing up the test.

---
 generic/gentoo.config-0.9.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
generic/gentoo.config-0.9.8 +1 -1
index 2361ae6..7051886 100755
@@ -45,7 +45,7 @@ if [ "$1" = "test" ] ; then
 		ret_want=${c/*|}
 		ret_got=$(CHOST=${CHOST} "$0")
 
-		if [ ${ret_want} = "${ret_got}" ] ; then
+		if [ "${ret_want}" = "${ret_got}" ] ; then
 			echo "PASS: ${CHOST}"
 		else
 			echo "FAIL: ${CHOST}"
Signature · 1 line
2.13.3
#1 lore raw
Quoted 14 lines · Antonio Quartulli

For some CHOST ret_want and ret_got may contain a whitespace. Add double quotes around ret_want to avoid messing up the test.

---
 generic/gentoo.config-0.9.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
generic/gentoo.config-0.9.8 +0 -0
index 2361ae6..7051886 100755

generic/gentoo.config-0.9.8 if [ "$1" = "test" ] ; then · line 51

Quoted 8 lines
generic/gentoo.config-0.9.8 +1 -1
@@ -45,7 +45,7 @@ if [ "$1" = "test" ] ; then
 		ret_want=${c/*|}
 		ret_got=$(CHOST=${CHOST} "$0")
 
-		if [ ${ret_want} = "${ret_got}" ] ; then
+		if [ "${ret_want}" = "${ret_got}" ] ; then
 			echo "PASS: ${CHOST}"
 		else
 			echo "FAIL: ${CHOST}"

Hi Antonio,

Would you mind sending this and the "add support for aarch64" patch as GitHub pull requests here:

<https://github.com/OpenVPN/openvpn-build>

Best regards,

Signature · 5 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock
#2 lore raw
Quoted 26 lines · Samuli Seppänen
Quoted 14 lines · Antonio Quartulli

For some CHOST ret_want and ret_got may contain a whitespace. Add double quotes around ret_want to avoid messing up the test.

---
 generic/gentoo.config-0.9.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
generic/gentoo.config-0.9.8 +0 -0
index 2361ae6..7051886 100755

generic/gentoo.config-0.9.8 if [ "$1" = "test" ] ; then · line 51

Quoted 8 lines
generic/gentoo.config-0.9.8 +1 -1
@@ -45,7 +45,7 @@ if [ "$1" = "test" ] ; then
 		ret_want=${c/*|}
 		ret_got=$(CHOST=${CHOST} "$0")
 
-		if [ ${ret_want} = "${ret_got}" ] ; then
+		if [ "${ret_want}" = "${ret_got}" ] ; then
 			echo "PASS: ${CHOST}"
 		else
 			echo "FAIL: ${CHOST}"

Hi Antonio,

Quoted 4 lines

Would you mind sending this and the "add support for aarch64" patch as GitHub pull requests here:

<https://github.com/OpenVPN/openvpn-build>

Sure, will do!

Cheers,

Signature · 1 line
Antonio Quartulli