linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 01/12] xfstests: use mount point instead of device name
@ 2013-12-17 22:18 Junho Ryu
  2013-12-17 22:18 ` [PATCH v2 02/12] xfstests: _scratch_mkfs_sized() for tmpfs Junho Ryu
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Junho Ryu @ 2013-12-17 22:18 UTC (permalink / raw)
  To: xfs; +Cc: tytso, hughd, branto, Junho Ryu

From: Hugh Dickins <hughd@google.com>

A tmpfs mount does not involve any block device, its $SCRATCH_DEV is
nothing but a place-holder, so apply 'df' or 'stat' to its mount point
$SCRATCH_MNT instead of to $SCRATCH_DEV.

It also fixes a bug in generic/256: "stat -f $SCRATCH_DEV" returning the
block size of the root file system, but not the test file system.

$ df | grep sda
/dev/sda1    233191    62959    157791    29%    /boot

$ sudo dumpe2fs -h /dev/sda1 | grep "Block size"
Block size:               1024

$ stat -f /dev/sda1 | grep "Block size"
Block size: 4096       Fundamental block size: 4096

$ stat -f /boot | grep "Block size"
Block size: 1024       Fundamental block size: 1024

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Junho Ryu <jayr@google.com>
---

v2: same as v1

 tests/generic/256 | 2 +-
 tests/generic/273 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/generic/256 b/tests/generic/256
index cfe7237..c6c8f2f 100755
--- a/tests/generic/256
+++ b/tests/generic/256
@@ -170,7 +170,7 @@ _scratch_mount
 # Test must be able to write files with non-root permissions
 chmod 777 $SCRATCH_MNT
 
-block_size=`stat -f $SCRATCH_DEV | grep "Block size" | cut -d " " -f3`
+block_size=`stat -f $SCRATCH_MNT | grep "Block size" | cut -d " " -f3`
 _test_full_fs_punch $(( $block_size * 2 )) $block_size 500 $SCRATCH_MNT/252.$$ $block_size
 
 status=0 ; exit
diff --git a/tests/generic/273 b/tests/generic/273
index 8e121a2..dc87a92 100755
--- a/tests/generic/273
+++ b/tests/generic/273
@@ -68,7 +68,7 @@ _file_create()
 
 	cd $SCRATCH_MNT/origin
 
-	_disksize=`$DF_PROG --block-size=1 $SCRATCH_DEV | tail -1 | awk '{ print $5 }'`
+	_disksize=`$DF_PROG --block-size=1 $SCRATCH_MNT | tail -1 | awk '{ print $5 }'`
 	_disksize=$(($_disksize / 3))
 	_num=$(($_disksize / $count / $threads / 4096))
 	_count=$count
-- 
1.8.5.1

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-12-18  5:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-17 22:18 [PATCH v2 01/12] xfstests: use mount point instead of device name Junho Ryu
2013-12-17 22:18 ` [PATCH v2 02/12] xfstests: _scratch_mkfs_sized() for tmpfs Junho Ryu
2013-12-18  5:33   ` Boris Ranto
2013-12-17 22:18 ` [PATCH v2 03/12] xfstests: increase tmpfs memory size Junho Ryu
2013-12-17 22:21   ` Junho Ryu
2013-12-17 22:18 ` [PATCH v2 04/12] xfstests: rename _require_xfs_io_fiemap to _require_fiemap Junho Ryu
2013-12-17 22:18 ` [PATCH v2 05/12] xfstests: fix generic/225 to check fiemap support Junho Ryu
2013-12-17 22:18 ` [PATCH v2 06/12] xfstests: fix generic/127 to call _cleanup() only once Junho Ryu
2013-12-17 22:18 ` [PATCH v2 07/12] xfstests: check O_DIRECT support before testing direct I/O Junho Ryu
2013-12-17 22:18 ` [PATCH v2 08/12] xfstests: add executable permission to tests Junho Ryu
2013-12-17 22:18 ` [PATCH v2 09/12] xfstests: skip generic/076 which cannot work on tmpfs Junho Ryu
2013-12-18  5:20   ` Boris Ranto
2013-12-17 22:18 ` [PATCH v2 10/12] xfstests: do not unmount tmpfs during remount Junho Ryu
2013-12-17 22:18 ` [PATCH v2 11/12] xfstests: do not unmount before calling _check_scratch_fs() Junho Ryu
2013-12-17 22:18 ` [PATCH v2 12/12] xfstests: check if filesystem supports chattr Junho Ryu
2013-12-17 22:23   ` Junho Ryu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).