linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sunil Mushran <sunil.mushran@oracle.com>
To: Josef Bacik <josef@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org,
	viro@ZenIV.linux.org.uk, Sunil Mushran <sunil.mushran@oracle.com>
Subject: Re: [TEST] test the seek_hole/seek_data functionality
Date: Fri, 13 May 2011 16:46:57 -0700	[thread overview]
Message-ID: <4DCDC2F1.1060507@oracle.com> (raw)
In-Reply-To: <1304626619-1588-4-git-send-email-josef@redhat.com>

On 05/05/2011 01:16 PM, Josef Bacik wrote:
> This is my very rough tester for testing seek_hole/seek_data.  Please look over
> it and make sure we all agree that the semantics are correct.  My btrfs patch
> passes with this and ext3 passes as well.  I still have to added fallocate() to
> it, but for now this seems to cover most of the corner cases.  Thanks,

I am assuming that our aim is to be fully compatible with zfs.

I tried running the test on it and it failed. One reason was
that the default allocation size on zfs is 128K. The test assumes
4K. The other was our understanding of the various corner cases.
And lastly, the values for SEEK_DATA and SEEK_HOLE are 3 and 4
respectively. Not vice-versa.

So I enhanced the test a bit and have it running on zfs. If someone
else can, please do verify my results.

BTW, This test also does not touch fallocate.

http://oss.oracle.com/~smushran/seek_data/seek_test.c

On zfs:
# ./seek_test
Allocation size: 131072
01. Test basic support                                  SUCC
02. Test an empty file                                  SUCC
03. Test a full file                                    SUCC
04. Test file hole at beg, data at end                  SUCC
05. Test file data at beg, hole at end                  SUCC
06. Test file hole data hole data                       SUCC


On ext4:
# ./seek_test
Allocation size: 4096
01. Test basic support                                	SUCC
02. Test an empty file                                	SUCC
   ERROR in Test 3.4: POS expected 1, got -1
   ERROR in Test 3.6: POS expected 4195, got -1
03. Test a full file                                  	FAIL
   ERROR in Test 4.1: POS expected 0, got 8196
   ERROR in Test 4.2: POS expected 1, got 8196
   ERROR in Test 4.3: POS expected 8192, got 0
   ERROR in Test 4.4: POS expected 8192, got -1
   ERROR in Test 4.5: POS expected 8191, got 8196
   ERROR in Test 4.6: POS expected 8192, got -1
   ERROR in Test 4.8: POS expected 8192, got -1
   ERROR in Test 4.10: POS expected 8193, got -1
   ERROR in Test 4.12: POS expected 8195, got -1
04. Test file hole at beg, data at end                	FAIL
   ERROR in Test 5.1: POS expected 4096, got 16384
   ERROR in Test 5.2: POS expected 4096, got 16384
   ERROR in Test 5.4: POS expected 1, got -1
   ERROR in Test 5.5: POS expected 4096, got 16384
   ERROR in Test 5.6: POS expected 4095, got -1
   ERROR in Test 5.7: POS expected 4096, got 16384
   ERROR in Test 5.9: POS expected 4097, got 16384
   ERROR in Test 5.11: POS expected 16383, got 16384
05. Test file data at beg, hole at end                	FAIL
   ERROR in Test 6.1: POS expected 0, got 16384
   ERROR in Test 6.2: POS expected 1, got 16384
   ERROR in Test 6.3: POS expected 4096, got 0
   ERROR in Test 6.4: POS expected 4096, got -1
   ERROR in Test 6.5: POS expected 4095, got 16384
   ERROR in Test 6.6: POS expected 4096, got -1
   ERROR in Test 6.7: POS expected 8192, got 16384
   ERROR in Test 6.8: POS expected 4096, got -1
   ERROR in Test 6.9: POS expected 8192, got 16384
   ERROR in Test 6.10: POS expected 4097, got -1
   ERROR in Test 6.11: POS expected 8192, got 16384
   ERROR in Test 6.12: POS expected 8191, got -1
   ERROR in Test 6.13: POS expected 8192, got 16384
   ERROR in Test 6.14: POS expected 12288, got -1
   ERROR in Test 6.15: POS expected 8193, got 16384
   ERROR in Test 6.16: POS expected 12288, got -1
   ERROR in Test 6.17: POS expected 12287, got 16384
   ERROR in Test 6.18: POS expected 12288, got -1
   ERROR in Test 6.20: POS expected 12288, got -1
   ERROR in Test 6.22: POS expected 12289, got -1
   ERROR in Test 6.24: POS expected 16383, got -1
06. Test file hole data hole data                     	FAIL



      reply	other threads:[~2011-05-13 23:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05 20:16 [PATCH 1/3 v3] fs: add SEEK_HOLE and SEEK_DATA flags Josef Bacik
2011-05-05 20:16 ` [PATCH 2/3 v3] Btrfs: implement our own ->llseek Josef Bacik
2011-05-05 20:16 ` [PATCH 3/3 v3] Ext4: handle SEEK_HOLE/SEEK_DATA generically Josef Bacik
2011-05-05 20:16 ` [TEST] test the seek_hole/seek_data functionality Josef Bacik
2011-05-13 23:46   ` Sunil Mushran [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DCDC2F1.1060507@oracle.com \
    --to=sunil.mushran@oracle.com \
    --cc=josef@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).