All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eryu Guan <eguan@redhat.com>
Cc: Artem Savkov <asavkov@redhat.com>,
	fstests@vger.kernel.org, Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH] generic/337: add checks for listxattr call fails.
Date: Thu, 25 Aug 2016 15:57:13 +1000	[thread overview]
Message-ID: <20160825055713.GN22388@dastard> (raw)
In-Reply-To: <20160825040944.GV27776@eguan.usersys.redhat.com>

On Thu, Aug 25, 2016 at 12:09:44PM +0800, Eryu Guan wrote:
> On Wed, Aug 24, 2016 at 01:55:53PM +0200, Artem Savkov wrote:
> > Add simple checks for failed calls to listxattr syscall. So far ERANGE, ENOENT
> > and EFAULT are checked.
> > 
> > Test is based on llistxattr02 test from LTP.
> 
> Any reason porting this from LTP? I think LTP is the right place for
> such syscall level tests, this test should stay there, or extend
> llistxattr02 test if you want to test new errnos.

It's pretty clear that nobody is actually using LTP in their
day-to-day development work-flow. It's a pain to build and
configure and it wants to write to places it shouldn't.

I asked that this test be added to xfstests, and that's especially
important because I can't reproduce the reported problem with LTP.
Hence we need to work out a reliable reproducer, and really that
belongs in xfstests along with all the other xattr tests we run.

> > Signed-off-by: Artem Savkov <asavkov@redhat.com>
> > ---
> >  .gitignore            |  1 +
> >  src/Makefile          |  2 +-
> >  src/listxattr_fails.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/generic/337     |  4 ++++
> >  tests/generic/337.out |  3 +++
> >  5 files changed, 60 insertions(+), 1 deletion(-)
> >  create mode 100644 src/listxattr_fails.c
> > 
> > diff --git a/.gitignore b/.gitignore
> > index d84f385..613d245 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -66,6 +66,7 @@
> >  /src/holes
> >  /src/holetest
> >  /src/itrash
> > +/src/listxattr_fails

Not the best name for a test program. Better is to write a simple
tool that runs listxattr with a buffer size specified on the command
line. That way it canbe used for more than just the specific test
case. e.g. we can test corner cases rather than jsut "is the buffer
too small?" by creating specific combinations of extended attributes
and then calling the listxattr tool with different buffer sizes...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2016-08-25  5:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 11:55 [PATCH] generic/337: add checks for listxattr call fails Artem Savkov
2016-08-25  4:09 ` Eryu Guan
2016-08-25  5:57   ` Dave Chinner [this message]
2016-08-25 11:01     ` [PATCH v2] Add a test for listxattr syscall with different buffer sizes Artem Savkov
2016-08-26  5:18       ` Dave Chinner
2016-08-26 11:31         ` [PATCH v3] " Artem Savkov
2016-08-30  4:35           ` Eryu Guan
2016-08-30  7:39             ` [PATCH v4] " Artem Savkov
2016-08-30  6:06           ` [PATCH v3] " Dave Chinner

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=20160825055713.GN22388@dastard \
    --to=david@fromorbit.com \
    --cc=asavkov@redhat.com \
    --cc=eguan@redhat.com \
    --cc=fdmanana@suse.com \
    --cc=fstests@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 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.