lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160221062356.GA14668@dastard>
Date:	Sun, 21 Feb 2016 17:23:56 +1100
From:	Dave Chinner <david@...morbit.com>
To:	Theodore Ts'o <tytso@....edu>
Cc:	Eric Whitney <enwlinux@...il.com>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] xfstests-bld: add exclude file for ext3 tests

On Sat, Feb 20, 2016 at 09:57:54PM -0500, Theodore Ts'o wrote:
> On Sun, Feb 21, 2016 at 11:34:11AM +1100, Dave Chinner wrote:
> > On Sat, Feb 20, 2016 at 10:51:57AM -0500, Eric Whitney wrote:
> > > Add an exclude file for the ext3 test case to prevent failure reports
> > > from tests that exercise unsupported online defrag functionality.
> > 
> > ext3 should not run these tests because of the _requires_defrag
> > check in these tests results in a _notrun command being run
> > when FSTYP=ext3.
> 
> In this particular case, the test is being run with
> 
> FSTYP=ext4
> MKFS_OPTIONS="-q -O ^extents,^flex_bg,^uninit_bg,^64bit,^metadata_csum,^huge_file,^dir_nlink,^extra_isize"
> EXT_MOUNT_OPTIONS="nodelalloc"
> 
> This is why _requires_defrag is passing and so ext4/307 and ext4/308
> is allowed to run.

Ok, I suspected that this was the reason for it occurring, but
that's not really testing "ext3" in the true sense - it's a modified
ext4 on-disk variant that happens to match the ext3 configuration.

> > > Two online defrag tests - ext4/307 and /308 - are not included because
> > > they contain explicit requirements for fallocate support that prevents
> > > them from running on an emulated ext3 file system.
> > 
> > Same here.
> 
> So probably the right answer here is to change _require_defrag so that
> for EXT4, to also add the assertion:
> 
> _require_xfs_io_command "falloc"
> 
> I'll note this is a not quite guaranteed to be correct because
> _require_xfs_io_command tests to see whether or not falloc works on
> TEST_DEV, and these tests are actually create a test file system on
> SCRATCH_DEV, and in theory TEST_DEV and SCRATCH_DEV could have
> different file system features.  That's because xfstests never runs
> mkfs on TEST_DEV, but SCRATCH_DEV does get mkfs'ed and in theory the
> file system features set by MKFS_OPTIONS could be different from what
> exists on TEST_DEV.

Right - that's normally why we have "_require_scratch_foo" so that
it's specific which device requires that functionality. Seems easy
enough to fix that problem.

back to the ext4-as-ext3, defrag requires extents to be enabled in
the ext4 filesystem, right?  So you could check whether than flag is
set easily enough with something like this:

dumpe2fs -h $dev |grep features |grep -q extent
if [ $? -ne 0 ]; then
	_notrun "Filesystem does not support defrag operations"
fi

That would work for everything with a fstyp of ext4, wouldn't it?

Cheers,

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ