Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758266AbaKUOUc (ORCPT ); Fri, 21 Nov 2014 09:20:32 -0500 Received: from mail-qc0-f176.google.com ([209.85.216.176]:46209 "EHLO mail-qc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758277AbaKUOUD (ORCPT ); Fri, 21 Nov 2014 09:20:03 -0500 MIME-Version: 1.0 In-Reply-To: <20141111053641.GR23575@dastard> References: <1415094884-18349-1-git-send-email-drysdale@google.com> <1415094884-18349-3-git-send-email-drysdale@google.com> <20141111053641.GR23575@dastard> From: David Drysdale Date: Fri, 21 Nov 2014 14:19:41 +0000 Message-ID: Subject: Re: [PATCHv2 2/3] selftests: Add test of O_BENEATH & openat(2) To: Dave Chinner Cc: "linux-kernel@vger.kernel.org" , Alexander Viro , Kees Cook , "Eric W. Biederman" , Greg Kroah-Hartman , Meredydd Luff , Will Drewry , Jorge Lucangeli Obes , Ricky Zhou , Lee Campbell , Julien Tinnes , Mike Depinet , James Morris , Andy Lutomirski , Paolo Bonzini , Paul Moore , Christoph Hellwig , Linux API , LSM List , fstests@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 11, 2014 at 5:36 AM, Dave Chinner wrote: > [cc fstests@vger.kernel.org] > > On Tue, Nov 04, 2014 at 09:54:43AM +0000, David Drysdale wrote: >> Add simple tests of openat(2) variations, including examples that >> check the new O_BENEATH flag. >> >> Signed-off-by: David Drysdale > > Wouldn't this be better added to fstests? That's the regression > test suite used by filesystem developers and most distro QA > organisations and where the fs developers aggregate all their new > regression tests. > > IMO, the fewer places we aggregate VFS/filesystem tests the better. > I really don't think the kernel tree is the best place for adding > VFS behavioural tests because it has none of the infrastructure > around it to test arbitrary filesystems and configurations and hence > is not particularly useful to the people whoa re likely to notice > and care about fs regression tests suddenly breaking. > > As an example, the recent renameat() syscall additions (e.g. > RENAME_EXCHANGE, RENAME_NOREPLACE) have unit tests in fstests, so > these new O_BENEATH tests should really follow the same model... > > Cheers, > > Dave. Fair enough, that makes sense -- I've now got a version of the selftest running within xfstests (git://oss.sgi.com/xfs/cmds/xfstests.git is the master repo, right?). Given that xfstests is independent of the kernel, what's the expected way to deal with flags (or syscalls) that are only in specific kernel versions? At the moment I've just got a primitive override at compile time (#ifndef O_BENEATH #define O_BENEATH ...), and then the test will fail at run-time against an older kernel -- is there a need for anything more sophisticated? (And if so, are there any examples I can crib from?) Also, is there an archive of the fstests@ mailing list somewhere? Thanks, David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/