All of lore.kernel.org
 help / color / mirror / Atom feed
From: tristan <tristan.ye@ORACLE.COM>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] tailtest: Add a test for the tail zeroing bug
Date: Wed, 07 Jul 2010 09:16:44 +0800	[thread overview]
Message-ID: <4C33D57C.8060607@oracle.com> (raw)
In-Reply-To: <20100706120254.GH13023@mail.oracle.com>

Signed-off-by: Tristan Ye <tristan.ye@oracle.com>

Joel Becker wrote:
> On Tue, Jul 06, 2010 at 03:45:50PM +0800, tristan wrote:
>> Hi Joel,
>>
>> I'm totally trusting the logic of your testcase to test tail zeroing.
>>
>> Just two concerns as follows:
>>
>> 1. It should be better to make the script runnable for none-privilege 
>> users for the sake of security concerns.
>
> 	Can't mount without root privileges, and the test requires
> umount/mount cycles to expose the problem.  I wish I had a better
> answer too.
>
>> 2. Why not make variations with different bs and cs combinations
>
> 	This is a good idea for completeness, but I don't want to spend
> the time on that right now.  I picked a bs/cs combination that was sure
> to expose the bug as we know it.
>
>>> +cleanup()
>>> +{
>>> +    [ -d "$_MOUNTPOINT" ] && umount "$_MOUNTPOINT"
>>> +    [ -d "$_MOUNTPOINT" ] && rmdir "$_MOUNTPOINT"
>>> +    [ -n "$_LOOP" ] && losetup -d "$_LOOP"
>>> +    [ -n "$_IMAGE" ] && rm -f "$_IMAGE"
>> You may also need to cleanup expected template files for comparison? if 
>> the test aborts abnormally.
>
> 	The template files are on the test filesystem.  They go away
> when we remove the image.
>
>> or rmdir never succeeds. I guess using "rm -rf $MOUNTPOINT" here will be 
>> more aggressive to handle this.
>
> 	There's nothing under the mountpoint after we've unmounted.
> that's why I use rmdir and not rm -rf.
>
> Joel
>

  reply	other threads:[~2010-07-07  1:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-02 22:39 [Ocfs2-devel] [PATCH] tailtest: Add a test for the tail zeroing bug Joel Becker
2010-07-06  7:45 ` tristan
2010-07-06 12:02   ` Joel Becker
2010-07-07  1:16     ` tristan [this message]
2010-07-07  1:59       ` Joel Becker

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=4C33D57C.8060607@oracle.com \
    --to=tristan.ye@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.