diff options
| author | Emmanuel Dreyfus <manu@netbsd.org> | 2014-08-07 17:01:18 +0200 |
|---|---|---|
| committer | Harshavardhana <harsha@harshavardhana.net> | 2014-08-18 01:09:39 -0700 |
| commit | ba0f31b2a5c8bd35f99b1ba2a74c81a2c2ded200 (patch) | |
| tree | 572eb19fb9cba596469fc529556c4708d1e0788c /tests/bugs/bug-963678.t | |
| parent | c80b5b915a6bf2c6506d789f8ab6f0dcbf3dc617 (diff) | |
Regression test portability: stat
Linux uses stat -c, stat --printf= or stat --printf
NetBSD uses stat -f with different format strings. This change set
changes all stat usage to stat -c and introduce a shell stat()
fonction to perform the format string translation.
BUG: 764655
Change-Id: I024fca7c1b736b053f5888cbf21da0a72489ef63
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8424
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Diffstat (limited to 'tests/bugs/bug-963678.t')
| -rw-r--r-- | tests/bugs/bug-963678.t | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/bugs/bug-963678.t b/tests/bugs/bug-963678.t index ba3d3ae0549..9431010d60d 100644 --- a/tests/bugs/bug-963678.t +++ b/tests/bugs/bug-963678.t @@ -31,12 +31,12 @@ require_fallocate -p -l 512k $M0/file && rm -f $M0/file # allocate some blocks, punch a hole and verify block allocation TEST fallocate -l 1m $M0/file -blksz=`stat --printf=%B $M0/file` -nblks=`stat --printf=%b $M0/file` +blksz=`stat -c %B $M0/file` +nblks=`stat -c %b $M0/file` TEST [ $(($blksz * $nblks)) -ge 1048576 ] TEST fallocate -p -o 512k -l 128k $M0/file -nblks=`stat --printf=%b $M0/file` +nblks=`stat -c %b $M0/file` # allow some room for xattr blocks TEST [ $(($blksz * $nblks)) -lt $((917504 + 16384)) ] TEST unlink $M0/file |
