tests: Use stat -c

Change all occurrences of stat --format and stat --printf to stat -c
so that the tests work correctly on BusyBox systems.

Signed-off-by: Ari Sundholm <ari@tuxera.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Ari Sundholm
2014-09-29 13:07:26 +10:00
committed by Dave Chinner
parent 0e01e7f639
commit ea002f7e4e
5 changed files with 11 additions and 11 deletions
+4 -4
View File
@@ -53,8 +53,8 @@ echo
echo "creating test file"
dd if=/dev/zero of=$testfile count=4096
mtime1=`stat --printf="%Y" $testfile`
ctime1=`stat --printf="%Z" $testfile`
mtime1=`stat -c "%Y" $testfile`
ctime1=`stat -c "%Z" $testfile`
sleep 2
@@ -65,8 +65,8 @@ $XFS_IO_PROG -f \
-c 'mwrite 0 4096' \
$testfile | _filter_xfs_io_unique
mtime2=`stat --printf="%Y" $testfile`
ctime2=`stat --printf="%Z" $testfile`
mtime2=`stat -c "%Y" $testfile`
ctime2=`stat -c "%Z" $testfile`
let mtime_diff=$mtime2-$mtime1
let ctime_diff=$ctime2-$ctime1