GNU bug report logs - #8091
fiemap_capable_ misbehaves in a chroot

Previous Next

Package: coreutils;

Reported by: Adam Sampson <ats <at> offog.org>

Date: Mon, 21 Feb 2011 14:35:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Adam Sampson <ats <at> offog.org>
To: 8091 <at> debbugs.gnu.org
Subject: bug#8091: fiemap_capable_ misbehaves in a chroot
Date: Mon, 21 Feb 2011 13:04:57 +0000
Hi,

A minor bug in the testsuite in coreutils 8.10...

I package software in a chroot. At the moment, my chroot doesn't contain
an mtab file, which means df can't tell what type the filesystem is:

$ df -T /
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
-                -   288370908  90872412 194568804  32% /

The fiemap_capable_ function in tests/init.cfg uses df to tell whether
the filesystem it's running on supports fiemap, by asking it to only
list filesystems that it knows are fiemap-capable using -t. However, the
selected_fstype function in df.c will always include filesystems that it
doesn't know the type of, even when -t is specified:

$ df -T -t blahfs /
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
-                -   288370908  90872400 194568816  32% /

The result is that fiemap_capable_ assumes my chrooted filesystem
supports fiemap when it doesn't, so the tests that use it fail.

I'm not sure at this point whether df -t is doing the wrong thing or
fiemap_capable_ is using it incorrectly. Any thoughts?

Thanks very much,

-- 
Adam Sampson <ats <at> offog.org>                         <http://offog.org/>




This bug report was last modified 14 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.