mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: "Myklebust\, Trond" <Trond.Myklebust@netapp.com>
Cc: "bfields\@fieldses.org" <bfields@fieldses.org>,
	"linux-nfs\@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"linux-fsdevel\@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [REGRESSION] NFSv4: open(O_TRUNC) hangs
Date: Thu, 19 Apr 2012 13:27:19 +0200	[thread overview]
Message-ID: <87aa287yi0.fsf@tucsk.pomaz.szeredi.hu> (raw)
In-Reply-To: <1334786606.12880.14.camel@lade.trondhjem.org> (Trond Myklebust's message of "Wed, 18 Apr 2012 22:03:26 +0000")

"Myklebust, Trond" <Trond.Myklebust@netapp.com> writes:

> Hi Miklos
>
> On Fri, 2012-04-06 at 11:43 +0200, Miklos Szeredi wrote:
>> "Myklebust, Trond" <Trond.Myklebust@netapp.com> writes:
>> 
>> > The following client patch fixes the regression for me.
>> 
>> It fixes the hang, but it still doesn't work 100% correctly.  Try the
>> following test program.
>> 
>> BTW, do you run any fs test suits?  All these were caught with one I use
>> to quick test fuse (it's in the fuse git tree(*) under the "test"
>> directory).  But I guess others like LTP would catch these as well.
>
> Thanks! I'll look into that. Bryan has been helping me to set up a test
> rig for the NFS client, but for now we don't have much coverage of basic
> POSIX tests.
>
>> Thanks,
>> Miklos
>> 
>> (*)  git://fuse.git.sourceforge.net/gitroot/fuse/fuse
>> ---
>> 
>> #include <stdio.h>
>> #include <unistd.h>
>> #include <fcntl.h>
>> #include <errno.h>
>> 
>> int main(int argc, char *argv[])
>> {
>> 	int res;
>> 	char *name = argv[1];
>> 
>> 	unlink(name);
>> 	close(creat(name, 0400));
>> 	res = open(name, O_RDONLY | O_TRUNC);
>> 	if (res != -1 && errno != EPERM)
>> 		fprintf(stderr, "should have failed!\n");
>
> Shouldn't that be EACCES? As far as I know, POSIX doesn't list EPERM as
> an allowed return value for open().

Yes it should be EACCESS.  That test is broken, it should be:

	if (res != -1 || errno != EACCES)

The one in the fuse tree is correct though...

Thanks,
Miklos

      reply	other threads:[~2012-04-19 11:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 16:26 Miklos Szeredi
2012-04-05 17:31 ` Myklebust, Trond
2012-04-06  9:43   ` Miklos Szeredi
2012-04-18 22:03     ` Myklebust, Trond
2012-04-19 11:27       ` Miklos Szeredi [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=87aa287yi0.fsf@tucsk.pomaz.szeredi.hu \
    --to=miklos@szeredi.hu \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®