| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] xfstests: made test 215 backwards compatible with older version of bash. |
| From: | Akshay Lal <akshaylal@xxxxxxxxxx> |
| Date: | Wed, 31 Mar 2010 12:06:33 -0700 |
| Cc: | Akshay Lal <akshaylal@xxxxxxxxxx> |
| Dkim-signature: | v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1270062420; bh=ghaY0seeJnyz+9hZgyiCPCszgqU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=hLbz9bgkBwbx+n1rT4CEHirA27tj57gnF7eV6dgqIjHM0eB2uepBH/Q+NwwIhjgyT bQHDrDCAUpdYzzKEjePBg== |
| Domainkey-signature: | a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=Sj7wpwt6wkRYcYQ9AvEnNRxx6wyw9mH4W7ZJLSd+JAOGWqByD6D55fYjV7xQBRyzi +ZMXRr7qb6Q7pG1Y+L2AA== |
| In-reply-to: | <Fix for test 215> |
| References: | <Fix for test 215> |
Test 215 fails on older versions of bash (2.x), mainly due to the use of
'let' for arithemetic operations. Changed to 'expr'.
Signed-off-by: Akshay Lal <akshaylal@xxxxxxxxxx>
On branch fix-test-215
Changes to be committed:
diff --git a/215 b/215
index c61f7a5..08aa212 100644
--- a/215
+++ b/215
@@ -68,8 +68,9 @@ $XFS_IO_PROG -F -f \
mtime2=`stat --printf="%Y" $testfile`
ctime2=`stat --printf="%Z" $testfile`
-let mtime_diff=$mtime2-$mtime1
-let ctime_diff=$ctime2-$ctime1
+# Allow support for older bash versions.
+mtime_diff=`expr $mtime2 - $mtime1`
+ctime_diff=`expr $ctime2 - $ctime1`
if [ "$mtime_diff" -eq "0" ]; then
echo "FAIL: mtime not update after mapped write"
---
215 | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/215 b/215
index c61f7a5..24424c2 100644
--- a/215
+++ b/215
@@ -68,8 +68,9 @@ $XFS_IO_PROG -F -f \
mtime2=`stat --printf="%Y" $testfile`
ctime2=`stat --printf="%Z" $testfile`
-let mtime_diff=$mtime2-$mtime1
-let ctime_diff=$ctime2-$ctime1
+# Allow support for older bash versions.
+mtime_diff=`expr $mtime2 - $mtime1`
+ctime_diff=`expr $ctime2 - $ctime1`
if [ "$mtime_diff" -eq "0" ]; then
echo "FAIL: mtime not update after mapped write"
--
1.7.0.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [RFC] Delayed logging, Dave Chinner |
|---|---|
| Next by Date: | Re: [PATCH] xfstests: made test 215 backwards compatible with older version of bash., Dave Chinner |
| Previous by Thread: | Sensacja roku - szokujÄcy dokument, Piotr Nowak |
| Next by Thread: | Re: [PATCH] xfstests: made test 215 backwards compatible with older version of bash., Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |