From: JiříPaleček <jpalecek@web.de>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] Fix some bashisms
Date: Thu, 29 Oct 2009 18:12:13 +0000 (UTC) [thread overview]
Message-ID: <loom.20091029T190532-79@post.gmane.org> (raw)
In-Reply-To: 1256576544.4929.54.camel@subratamodak.linux.ibm.com
Hello,
Subrata Modak <subrata@...> writes:
>
> On Wed, 2009-10-21 at 02:19 +0200, Jiri Palecek wrote:
> > Hello,
> >
> > this is another patch fixing bashisms in LTP tests (the fixes are more or
less the same as in the previous
> patches, except for a few exceptions). Note that the patch is not complete,
in the sense that there may
> remain further bashisms in the source even after applying the patch (like use
of arrays, which is visible
> even from this patch).
> >
> > Regards
> > Jiri Palecek
> >
> > Signed-off-by: Jiri Palecek <jpalecek@...>
>
> Hmm,. Some of them failed to apply. Can you please resend only the error
> part(s):
>
according to my git repository. these are the missing parts:
Signed-off-by: Jiri Palecek <jpalecek@web.de>
---
testcases/kernel/fs/fs-bench/modaltr.sh | 2 +-
testcases/kernel/fs/mongo/test.sh | 8 +++-----
testcases/network/tcp_cmds/netstat/netstat01 | 2 +-
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/testcases/kernel/fs/fs-bench/modaltr.sh b/testcases/kernel/fs/fs-
bench/modaltr.sh
index 85d2c30..36e6f0c 100755
--- a/testcases/kernel/fs/fs-bench/modaltr.sh
+++ b/testcases/kernel/fs/fs-bench/modaltr.sh
@@ -43,7 +43,7 @@ LOG_DIR1=/tmp/log1
HOME_DIR=/home
BLOCK_DIR=/dev/mtdblock
export PATH=$PATH:/sbin
- if [ $UID -ne 0 ];
+ if [ $(id -ru) -ne 0 ];
then
echo "must be root to run this"
exit
diff --git a/testcases/kernel/fs/mongo/test.sh b/testcases/kernel/fs/mongo/
test.sh
index fe75664..eccb079 100755
--- a/testcases/kernel/fs/mongo/test.sh
+++ b/testcases/kernel/fs/mongo/test.sh
@@ -26,7 +26,7 @@ TEST_DIR=testdir
#should be root to execute this script .
- if [ $UID -ne 0 ]; then
+ if [ $(id -ru) -ne 0 ]; then
echo "This script must be run as root"
exit
fi
@@ -52,8 +52,7 @@ modprobe loop
fi
#run the mongo test on reiserfs file system type
-function reiserfs
-
+reiserfs()
{
cat > fs.sh <<EOF
echo "performing mongo on reiserfs"
@@ -71,8 +70,7 @@ EOF
#To run on jfs file system type
-function JFS
-
+JFS()
{
cat >> fs.sh <<EOF
echo "performing mongo on jfs file system"
diff --git a/testcases/network/tcp_cmds/netstat/netstat01 b/testcases/network/
tcp_cmds/netstat/netstat01
index 6a197de..365c142 100755
--- a/testcases/network/tcp_cmds/netstat/netstat01
+++ b/testcases/network/tcp_cmds/netstat/netstat01
@@ -58,7 +58,7 @@ do_test() {
while [ $TST_COUNT -le $NUMLOOPS ]; do
for flag in "-s" "-rn" "-i" "-gn" "-apn"; do
- if ! netstat $flag 2>&1 1>/dev/null; then
+ if ! netstat $flag 1>/dev/null 2>&1; then
end_testcase "$COMMAND failed"
fi
done
--
1.6.4.3
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2009-10-29 18:35 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200910211528.n9LFST8q028289@e35.co.us.ibm.com>
2009-10-26 17:02 ` [LTP] [PATCH] Fix some bashisms Subrata Modak
2009-10-26 19:37 ` Garrett Cooper
2009-10-29 18:12 ` JiříPaleček [this message]
2009-10-30 11:37 ` Subrata Modak
2009-10-30 12:53 ` Jiří Paleček
2009-10-30 12:19 ` Subrata Modak
2009-10-31 6:39 ` Garrett Cooper
2009-10-31 11:42 ` Jiří Paleček
2009-11-01 0:15 ` Garrett Cooper
[not found] <4adf2acd.8b13f30a.0849.7847SMTPIN_ADDED@mx.google.com>
2009-10-21 19:38 ` Mike Frysinger
2009-10-21 0:19 Jiri Palecek
-- strict thread matches above, loose matches on Subject: below --
2009-07-07 8:35 Jiri Palecek
2009-07-07 15:32 ` Subrata Modak
2009-07-07 16:26 ` Garrett Cooper
2009-07-08 19:05 ` Mike Frysinger
2009-07-08 18:13 ` Subrata Modak
[not found] <4a413e9b.160bca0a.2226.fffff184SMTPIN_ADDED@mx.google.com>
2009-07-06 17:45 ` Garrett Cooper
2009-07-06 22:02 ` Mike Frysinger
2009-07-06 22:47 ` Jiri Palecek
2009-07-06 23:33 ` Garrett Cooper
2009-07-07 0:16 ` Jiří Paleček
2009-07-07 0:31 ` Garrett Cooper
2009-07-07 10:29 ` Jiří Paleček
[not found] <4a413e95.8d13f30a.1199.ffffdccbSMTPIN_ADDED@mx.google.com>
2009-06-23 21:21 ` Mike Frysinger
2009-06-25 9:09 ` Subrata Modak
2009-06-30 7:41 ` Subrata Modak
2009-07-06 23:12 ` Jiri Palecek
2009-05-31 21:27 Jiri Palecek >
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20091029T190532-79@post.gmane.org \
--to=jpalecek@web.de \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox