xfs
[Top] [All Lists]

Re: [PATCH 2/2 V3] xfstests: test EROFS vs. EEXIST when creating on an R

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH 2/2 V3] xfstests: test EROFS vs. EEXIST when creating on an RO filesystem
From: Ben Myers <bpm@xxxxxxx>
Date: Mon, 21 Jan 2013 16:52:53 -0600
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <50ED9837.8040301@xxxxxxxxxxx>
References: <50B52DB7.3030506@xxxxxxxxxx> <50ED9726.4030008@xxxxxxxxxxx> <50ED9837.8040301@xxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
Hey Eric,

On Wed, Jan 09, 2013 at 10:17:59AM -0600, Eric Sandeen wrote:
> TBH, I don't know if this is posix-specified, but I found out the
> hard way that when trying to re-create existing files on a readonly 
> filesystem, some apps expect/handle EEXIST, but fail on EROFS.
> 
> This will test mkdir, mknod, and symlinks for that behavior.
> 
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---
> 
> V2: Change test dir var name, do scratch mkfs, drop _fail
> V3: Use common _filter_ln

...

> diff --git a/293 b/293
> new file mode 100755
> index 0000000..9013f9a
> --- /dev/null
> +++ b/293
> @@ -0,0 +1,73 @@

...

> +_create_files()
> +{
> +     mknod $THIS_TEST_DIR/testnode c 1 3
> +     mkdir $THIS_TEST_DIR/testdir
> +     touch $THIS_TEST_DIR/testtarget
> +     ln -s $THIS_TEST_DIR/testtarget $THIS_TEST_DIR/testlink | _filter_ln
                                                               ^ Added 2>&1

Applied this as test 294 and the ln filter patch, with one minor change as 
above.

Thanks,
        Ben

<Prev in Thread] Current Thread [Next in Thread>