[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140217180408.GB16660@thunk.org>
Date: Mon, 17 Feb 2014 13:04:08 -0500
From: Theodore Ts'o <tytso@....edu>
To: Dave Chinner <david@...morbit.com>
Cc: Miklos Szeredi <miklos@...redi.hu>, viro@...IV.linux.org.uk,
torvalds@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, bfields@...ldses.org,
hch@...radead.org, akpm@...ux-foundation.org, dhowells@...hat.com,
zab@...hat.com, jack@...e.cz, luto@...capital.net, mszeredi@...e.cz
Subject: Re: [PATCH 00/13] cross rename v4
On Mon, Feb 17, 2014 at 07:19:11PM +1100, Dave Chinner wrote:
> [ FWIW, the normal way to write an xfstest like this is to write a
> small helper program that just does the renameat2() syscall (we
> often use xfs_io to provide this) and everything is just shell
> scripts to drive the helper program in the necessary way. We don't
> directly check that mode, size, destination of a file is correct -
> just stat(1) on the expected destinations is sufficient to capture
> this information. stdout is captured by the test harness and used to match
> against a golden output. If the match fails, the test fails.
The other reason why it's really nice to use a small helper program is
that it becomes much easier for file system developers to debug kernel
problems without having to create their own single-shot C programs.
It also becomes easier to debug a test failure by looking at the shell
script and manually running the commands one at a time, perhaps
changing some of the arguments after getting an xfstest failure from
inside a VM running a test kernel, since the VM very often won't even
have a C compiler.
It also becomes easier to add new test just simply by updating the
shell script, which is another win.
> And finally, it needs comments to explain what the test is actually
> testing - if you don't document what the test is supposed to be
> checking, how do we know that it is testing is actually correct?
Yes, please!
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists