All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Greco <cristian@regolo.cc>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH] Make fs_inod script shell agnostic
Date: Sun, 27 Feb 2011 00:30:34 +0100	[thread overview]
Message-ID: <20110227003034.16263db3@regolo> (raw)
In-Reply-To: <AANLkTi=iT+dYAW4K9JGW9BD1vau0s6e8d+QOgvzrryS4@mail.gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 295 bytes --]

Hi Garrett,

find attached the modified patch.


Signed-off-by: Cristian Greco <cristian@regolo.cc>
---
 testcases/kernel/fs/fs_inod/fs_inod |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)


Thanks,
--
Cristian Greco
GPG key ID: 0xCF4D32E4

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-Make-fs_inod-script-shell-agnostic.patch --]
[-- Type: text/x-patch, Size: 2731 bytes --]

diff --git a/testcases/kernel/fs/fs_inod/fs_inod b/testcases/kernel/fs/fs_inod/fs_inod
index 39d7302..b962dad 100755
--- a/testcases/kernel/fs/fs_inod/fs_inod
+++ b/testcases/kernel/fs/fs_inod/fs_inod
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 #
@@ -51,9 +51,9 @@
 #
 # RETURNS:              None.
 #=============================================================================
-function err_log
+err_log()
 {
-    let step_errors=$step_errors+1
+    : $((step_errors += 1))
 }
 
 
@@ -66,7 +66,7 @@ function err_log
 #
 # RETURNS: 		None.
 #=============================================================================
-function make_subdirs 
+make_subdirs ()
 {
     i=0;
     while [ "$i" -lt "$numsubdirs" ]; do
@@ -74,7 +74,7 @@ function make_subdirs
             echo "$0: mkdir dir$i"
             mkdir -p dir$i || echo "mkdir dir$i FAILED"
         }
-	let i="$i + 1"
+	: $((i += 1))
     done;
 } 
 
@@ -88,7 +88,7 @@ function make_subdirs
 #
 # RETURNS: 		None.
 #=============================================================================
-function touch_files 
+touch_files()
 {
     echo "$0: touch files [0-$numsubdirs]/file$numsubdirs[0-$numfiles]"
     j=0;
@@ -99,10 +99,10 @@ function touch_files
 
 	while [ "$k" -lt "$numfiles" ]; do  
 	    >file$j$k || err_log ">file$j$k FAILED"
-	    let k="$k + 1"
+	    : $((k += 1))
 	done
 
-	let j="$j + 1"
+	: $((j += 1))
 	cd ..
     done
 }
@@ -117,7 +117,7 @@ function touch_files
 #
 # RETURNS: 	None.
 #=============================================================================
-function rm_files 
+rm_files()
 {
     echo "$0: rm files [0-$numsubdirs]/file$numsubdirs[0-$numfiles]"
     j=0;
@@ -128,10 +128,10 @@ function rm_files
 
 	while [ "$k" -lt "$numfiles" ]; do  
 	    rm -f file$j$k || err_log "rm -f file$j$k FAILED"
-	    let k="$k + 1"
+	    : $((k += 1))
 	done
 
-	let j="$j + 1"
+	: $((j += 1))
 	cd ..
     done
 }
@@ -146,7 +146,7 @@ function rm_files
 #
 # RETURNS: 		None.
 #=============================================================================
-function step1 
+step1 ()
 { 
     echo "=============================================="
     echo "MULTIPLE PROCESSES CREATING AND DELETING FILES"
@@ -199,7 +199,7 @@ function step1
 	rm_files &
 	pid1=$!
 
-	let i="$i + 1"
+	: $((i += 1))
     done
 
     # wait for all background processes to complete execution
@@ -244,7 +244,7 @@ function step1
          step$I
          if [ $? != 0 ]; then
             echo "step$I failed - see above errors"
-            let ERRORS=$ERRORS+$step_errors
+            : $((ERRORS += step_errors))
          fi
     done   
 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 429 bytes --]

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2011-02-26 23:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-26 16:05 [LTP] [PATCH] Make fs_inod script shell agnostic Cristian Greco
2011-02-26 21:59 ` Garrett Cooper
2011-02-26 23:30   ` Cristian Greco [this message]
2011-02-27  1:09     ` Garrett Cooper

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=20110227003034.16263db3@regolo \
    --to=cristian@regolo.cc \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=yanegomi@gmail.com \
    /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 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.