Re: [PATCH 03/10] xfstests: _scratch_mkfs_sized() for tmpfs

Christoph Hellwig
2013-12-11T07:44:23Z

On Tue, Dec 10, 2013 at 12:11:54PM -0800, Junho Ryu wrote:
> From: Hugh Dickins <hughd@google.com>
>
> _scratch_mkfs_sized() avoid blockdev and update MOUNT_OPTIONS with
> required size on tmpfs, so those tests using it can now run.
>
> Signed-off-by: Hugh Dickins <hughd@google.com>
> Signed-off-by: Junho Ryu <jayr@google.com>

Ah, here we go.

> blocks=`expr $fssize / $blocksize`
>
> - if [ "$HOSTOS" == "Linux" ]; then
> + if [ "$HOSTOS" == "Linux" -a "$FSTYP" != "tmpfs" ]; then

Should just check if SCRATCH_DEV is a block devices instead of
hardcoding a filesystem.