All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH]  syslog-lib.sh bash posix compliance
@ 2013-10-09 14:11 Maxim Uvarov
  2013-10-10  1:16 ` Wanlong Gao
  2013-10-14  5:39 ` Mike Frysinger
  0 siblings, 2 replies; 4+ messages in thread
From: Maxim Uvarov @ 2013-10-09 14:11 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking, Maxim Uvarov

/opt/ltp/testcases/bin/syslog02: 69: [: syslog-ng: unexpected operator
+ [ syslog-ng == syslog-ng ]
Accoding to:
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html
[ STRING1 == STRING2 ]  True if the strings are equal. "=" may be
used instead of "==" for strict POSIX compliance.

Because of busybox and other bash like shells look for posix syntax
make it so.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.com>
---
 testcases/kernel/syscalls/syslog/syslog-lib.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/syslog/syslog-lib.sh b/testcases/kernel/syscalls/syslog/syslog-lib.sh
index 0885805..6b19b8d 100755
--- a/testcases/kernel/syscalls/syslog/syslog-lib.sh
+++ b/testcases/kernel/syscalls/syslog/syslog-lib.sh
@@ -65,11 +65,11 @@ setup()
 		tst_resm TBROK "Testing is terminating due to a signal"
 		cleanup 1' $TRAP_SIGS || exit 1
 
-	if [ "$SYSLOG_DAEMON" == "syslog" ]; then
+	if [ "$SYSLOG_DAEMON" = "syslog" ]; then
 		CONFIG_FILE="/etc/syslog.conf"
-	elif [ "$SYSLOG_DAEMON" == "syslog-ng" ]; then
+	elif [ "$SYSLOG_DAEMON" = "syslog-ng" ]; then
 		CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-	elif [ "$SYSLOG_DAEMON" == "rsyslog" ]; then
+	elif [ "$SYSLOG_DAEMON" = "rsyslog" ]; then
 		CONFIG_FILE="/etc/rsyslog.conf"
 		RSYSLOG_CONFIG='$ModLoad imuxsock.so'
 	else
-- 
1.7.9.5


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [LTP] [PATCH]  syslog-lib.sh bash posix compliance
@ 2013-10-09 14:13 Maxim Uvarov
  0 siblings, 0 replies; 4+ messages in thread
From: Maxim Uvarov @ 2013-10-09 14:13 UTC (permalink / raw)
  To: ltp-list; +Cc: linaro-networking, Maxim Uvarov

/opt/ltp/testcases/bin/syslog02: 69: [: syslog-ng: unexpected operator
+ [ syslog-ng == syslog-ng ]
Accoding to:
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html
[ STRING1 == STRING2 ]  True if the strings are equal. "=" may be
used instead of "==" for strict POSIX compliance.

Because of busybox and other bash like shells look for posix syntax
make it so.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.com>
---
 testcases/kernel/syscalls/syslog/syslog-lib.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/syslog/syslog-lib.sh b/testcases/kernel/syscalls/syslog/syslog-lib.sh
index 0885805..6b19b8d 100755
--- a/testcases/kernel/syscalls/syslog/syslog-lib.sh
+++ b/testcases/kernel/syscalls/syslog/syslog-lib.sh
@@ -65,11 +65,11 @@ setup()
 		tst_resm TBROK "Testing is terminating due to a signal"
 		cleanup 1' $TRAP_SIGS || exit 1
 
-	if [ "$SYSLOG_DAEMON" == "syslog" ]; then
+	if [ "$SYSLOG_DAEMON" = "syslog" ]; then
 		CONFIG_FILE="/etc/syslog.conf"
-	elif [ "$SYSLOG_DAEMON" == "syslog-ng" ]; then
+	elif [ "$SYSLOG_DAEMON" = "syslog-ng" ]; then
 		CONFIG_FILE="/etc/syslog-ng/syslog-ng.conf"
-	elif [ "$SYSLOG_DAEMON" == "rsyslog" ]; then
+	elif [ "$SYSLOG_DAEMON" = "rsyslog" ]; then
 		CONFIG_FILE="/etc/rsyslog.conf"
 		RSYSLOG_CONFIG='$ModLoad imuxsock.so'
 	else
-- 
1.7.9.5


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-14  5:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-09 14:11 [LTP] [PATCH] syslog-lib.sh bash posix compliance Maxim Uvarov
2013-10-10  1:16 ` Wanlong Gao
2013-10-14  5:39 ` Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2013-10-09 14:13 Maxim Uvarov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.