[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161124232629.GW31101@dastard>
Date: Fri, 25 Nov 2016 10:26:29 +1100
From: Dave Chinner <david@...morbit.com>
To: Eric Biggers <ebiggers@...gle.com>
Cc: fstests@...r.kernel.org, linux-ext4@...r.kernel.org,
"Theodore Y . Ts'o" <tytso@....edu>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Richard Weinberger <richard@....at>,
David Gstir <david@...ma-star.at>
Subject: Re: [PATCH 4/4] generic: test locking when setting encryption policy
On Mon, Nov 21, 2016 at 03:41:06PM -0800, Eric Biggers wrote:
> On Tue, Nov 22, 2016 at 08:32:51AM +1100, Dave Chinner wrote:
> >
> > This means that reproducing the race condition is going to be
> > machine dependent regardless of how the test is written.
> >
> > In cases like this for XFS, we tend towards adding a debug sysfs
> > file to introduce a delay into the code that allows the race to be
> > triggered reliably. The delay is only included in CONFIG_XFS_DEBUG=y
> > builds, and the test is conditional on the sysfs file being present.
> >
> > e.g. xfs/051 uses a log recovery delay to allow us to reliably
> > trigger IO errors in the middle of log recovery and hence exercise
> > the IO error failure paths in the middle of recovery. This made an
> > extremely unreliable reproducer into a test case that triggered
> > reliably on every machine the test is run on....
> >
> > Can something like this be done in this case?
> >
>
> I'd really rather not do something like that just for this test, which is really
> just testing that the kernel does inode_lock()/inode_unlock() in
> fscrypt_process_policy(). It would be more worthwhile if the testing-only
> kernel code would help expose many race conditions, not just this one particular
> race in this particular ioctl.
OK.
> So if you don't want to have the C version of this test in
> xfstests, I think it should just be dropped from the series.
If there's no other alternative, a test written in C is better than
nothing.
Thanks!
-Dave.
--
Dave Chinner
david@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists