Received: (at 12322) by debbugs.gnu.org; 30 Sep 2012 08:30:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 30 04:30:03 2012
Received: from localhost ([127.0.0.1]:34049 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.72)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1TIEuZ-0005U3-9W
for submit <at> debbugs.gnu.org; Sun, 30 Sep 2012 04:30:03 -0400
Received: from smtp6-g21.free.fr ([212.27.42.6]:48812)
by debbugs.gnu.org with esmtp (Exim 4.72)
(envelope-from <g.esp@HIDDEN>) id 1TIEuW-0005T9-6O
for 12322 <at> debbugs.gnu.org; Sun, 30 Sep 2012 04:30:02 -0400
Received: from zimbra33-e6.priv.proxad.net (unknown [172.20.243.183])
by smtp6-g21.free.fr (Postfix) with ESMTP id 805018226E;
Sun, 30 Sep 2012 10:29:34 +0200 (CEST)
Date: Sun, 30 Sep 2012 10:29:33 +0200 (CEST)
From: g.esp@HIDDEN
To: Bernhard Voelker <mail@HIDDEN>
Message-ID: <1611364781.249836930.1348993773316.JavaMail.root@HIDDEN>
In-Reply-To: <1519897062.165370049.1346623646505.JavaMail.root@HIDDEN>
Subject: Re: bug#12322: coreutils-8.1{8, 9} with /etc/mtab as real file,
df/total-unprocessed fail, df/no-mtab-status is skipped
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Originating-IP: [82.236.101.3]
X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - FF3.0 (Win)/7.2.0-GA2598)
X-Authenticated-User: g.esp@HIDDEN
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 12322
Cc: 12322 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)
----- Mail original -----
De: "g esp" <g.esp@HIDDEN>
=C3=80: "Bernhard Voelker" <mail@HIDDEN>
Cc: 12322 <at> debbugs.gnu.org
Envoy=C3=A9: Lundi 3 Septembre 2012 00:07:26
Objet: bug#12322: coreutils-8.1{8, 9} with /etc/mtab as real file,=09df/tot=
al-unprocessed fail, df/no-mtab-status is skipped
----- Mail original -----
> De: "Bernhard Voelker" <mail@HIDDEN>
> =C3=80: "g esp" <g.esp@HIDDEN>
> Cc: 12322 <at> debbugs.gnu.org
> Envoy=C3=A9: Dimanche 2 Septembre 2012 11:05:28
> Objet: bug#12322: coreutils-8.1{8, 9} with /etc/mtab as real file,=09df/t=
otal-unprocessed fail, df/no-mtab-status is
> skipped
>=20
I fixed how /etc/mtab is filled inside my chroot using
=09# Use mtab as regular file. This allow 'df' not to fail during coreutils=
test with mount points out
=09# of the chroot that didn't exist inside (like debian /lib/init/rw)
=09rm -f /etc/mtab=09=09# In case you experiment with symlink to /proc/moun=
ts
=09# rootfs need to be on top of file or df -T -t <yourfstype> / will fail =
with df: no file systems processed
=09grep ' / ' /proc/mounts >/etc/mtab
=09# Remove the duplicate due to the mount --bind
=09grep -E '/sys sysfs|/proc proc|/dev/pts|/dev/shm' /proc/mounts | sort -u=
>>/etc/mtab
So without changing coreutils test suite (except separate issue with test-g=
etlogin.c isatty), tests look better
Using a correct /etc/mtab, that changed unobviously those results (as they =
bot use df)
-skip-seek-past-dev: skipped test: failed to determine size of -
-SKIP: dd/skip-seek-past-dev
+PASS: dd/skip-seek-past-dev
-slink: skipped test: '.' is on an XFS file system
-SKIP: du/slink
+PASS: du/slink
I was always suspicious about '.' is on an XFS file system as / is ext3 on =
this machine.
cp/fiemap-perf is the test that fail when on /etc/mtab, rootfs is after the=
/dev with / partition.
[chroot-i486] root:/$ grep ' / ' /proc/mounts | sort >/etc/mtab
[chroot-i486] root:/$ cat /etc/mtab
/dev/disk/by-uuid/7a235d64-5d04-41ac-a959-70465eb74fc8 / ext3 rw,relatime,e=
rrors=3Dremount-ro,data=3Dordered 0 0
rootfs / rootfs rw 0 0
[chroot-i486] root:/$ df -T -t ext2 -t ext3 . && echo should skip with ext3
df: no file systems processed
[chroot-i486] root:/$ df -T && echo done
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda3 ext3 19228308 14717448 3534108 81% /
rootfs rootfs 19228308 14717448 3534108 81% /
done
Should not some df tests be added that warn on malformed /etc/mtab?
As a notice, util-linux-2.22 libmount code may let some stray loops after c=
oreutils tests have run with regular /etc/mtab and a running kernel before =
2.6.37, git version of util-linux is fixed.
Gilles
bug-coreutils@HIDDEN:bug#12322; Package coreutils.
Full text available.
Received: (at 12322) by debbugs.gnu.org; 2 Sep 2012 22:09:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 02 18:09:07 2012
Received: from localhost ([127.0.0.1]:35048 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.72)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1T8ILq-0008Nk-Ho
for submit <at> debbugs.gnu.org; Sun, 02 Sep 2012 18:09:07 -0400
Received: from smtp6-g21.free.fr ([212.27.42.6]:33861)
by debbugs.gnu.org with esmtp (Exim 4.72)
(envelope-from <g.esp@HIDDEN>) id 1T8ILm-0008NI-A6
for 12322 <at> debbugs.gnu.org; Sun, 02 Sep 2012 18:09:04 -0400
Received: from zimbra33-e6.priv.proxad.net (unknown [172.20.243.183])
by smtp6-g21.free.fr (Postfix) with ESMTP id 9B4D28224B;
Mon, 3 Sep 2012 00:07:27 +0200 (CEST)
Date: Mon, 3 Sep 2012 00:07:26 +0200 (CEST)
From: g.esp@HIDDEN
To: Bernhard Voelker <mail@HIDDEN>
Message-ID: <1519897062.165370049.1346623646505.JavaMail.root@HIDDEN>
In-Reply-To: <50432158.8080803@HIDDEN>
Subject: Re: bug#12322: coreutils-8.1{8, 9} with /etc/mtab as real file,
df/total-unprocessed fail, df/no-mtab-status is skipped
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Originating-IP: [82.236.101.3]
X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - FF3.0 (Win)/7.2.0-GA2598)
X-Authenticated-User: g.esp@HIDDEN
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 12322
Cc: 12322 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)
----- Mail original -----
> De: "Bernhard Voelker" <mail@HIDDEN>
> =C3=80: "g esp" <g.esp@HIDDEN>
> Cc: 12322 <at> debbugs.gnu.org
> Envoy=C3=A9: Dimanche 2 Septembre 2012 11:05:28
> Objet: bug#12322: coreutils-8.1{8, 9} with /etc/mtab as real file,=09df/t=
otal-unprocessed fail, df/no-mtab-status is
> skipped
>=20
> On 09/01/2012 05:49 PM, g.esp@HIDDEN wrote:
> > Maybe both tests could check if /etc/mtab is a symlink and adjust
> > df parameter to not fail?
> >=20
> > I made this change on the tests to see if that work
> > =09cd $(DIR_APP) && sed -i "s/ '\.' / /" tests/df/total-unprocessed
> > =09cd $(DIR_APP) && sed -i "s/df ||/df '.' ||/"
> > =09tests/df/no-mtab-status
> >=20
> > With /etc/mtab as a real file, both tests passed
>=20
> Thank you for the report.
>=20
> To make it clear, your change suggests this:
>=20
> diff --git a/tests/df/no-mtab-status.sh b/tests/df/no-mtab-status.sh
> index e434f5f..6d19f8b 100755
> --- a/tests/df/no-mtab-status.sh
> +++ b/tests/df/no-mtab-status.sh
> @@ -20,7 +20,7 @@
> . "${srcdir=3D.}/init.sh"; path_prepend_ ../src
> print_ver_ df
>=20
> -df || skip_ "df fails"
> +df '.' || skip_ "df fails"
>=20
> # Simulate "mtab" failure.
> cat > k.c <<'EOF' || framework_failure_
> diff --git a/tests/df/total-unprocessed.sh
> b/tests/df/total-unprocessed.sh
> index aa49836..dbe552e5 100755
> --- a/tests/df/total-unprocessed.sh
> +++ b/tests/df/total-unprocessed.sh
> @@ -28,7 +28,7 @@ EOF
> # The following simply finds no match for the combination
> # of the options --local and FS-type nfs together with the
> # argument ".". It must exit non-Zero nonetheless.
> -df --local -t nfs --total '.' 2>out && fail=3D1
> +df --local -t nfs --total 2>out && fail=3D1
> compare exp out || fail=3D1
>=20
> cat <<\EOF > exp || framework_failure_
>=20
>=20
Yes that should fix df/total-unprocessed.sh and df/total-unprocessed.sh in =
both /etc/mtab cases.
> Additionally to a missing mtab, there is another reason which
> can make df fail: an inaccessible mount point, e.g. when there's
> a file system mounted on /root/backup which is not accessible
> by a normal user.
>=20
> The above tests provoke certain error conditions:
> no-mtab-status tests df's behaviour when the mtab cannot be read;
> total-unprocessed tests that df exits non-Zero and writes an error
> message when --total is used but no file system has been processed.
>=20
> While your change doesn't make the tests skip under certain
> conditions, it well may trigger a different than the intended
> failure. E.g. in no-mtab-status, there's a test which is supposed
> to fail because we simulated the mtab failure:
>=20
> # These tests are supposed to fail:
> LD_PRELOAD=3D./k.so df && fail=3D1
>=20
> That command - a simple df without arguments - could also fail due
> to another reason (see above), so the failure may shadow the expected
> failure from (simulated) missing mtab.
>=20
> That said, I'd rather skip a test that cannot otherwise guarantee
> why it fails/succeeds.
>=20
> Have a nice day,
> Berny
>=20
Yes here df command fail in real /etc/mtab case, so even if this test will =
not trigger for the intented reason, test will not fail.
Similary total-verify.sh may be fixed to pass in /etc/mtab real file case w=
ith this patch (hope nothing will be wrapped)
diff --git a/tests/df/total-verify.sh b/tests/df/total-verify.sh
index 948b002..317cb75 100755
--- a/tests/df/total-verify.sh
+++ b/tests/df/total-verify.sh
@@ -20,7 +20,7 @@
print_ver_ df
require_perl_
-df || skip_ "df fails"
+df '.' || skip_ "df fails"
cat <<\EOF > check-df || framework_failure_
my ($total, $used, $avail) =3D (0, 0, 0);
@@ -53,9 +53,9 @@ EOF
# Use --block-size=3D512 to keep df from printing rounded-to-kilobyte
# numbers which wouldn't necessarily add up to the displayed total.
-df --total -P --block-size=3D512 > space || framework_failure_
+df --total -P --block-size=3D512 '.' > space || framework_failure_
cat space # this helps when debugging any test failure
-df --total -i -P > inode || framework_failure_
+df --total -i -P '.' > inode || framework_failure_
cat inode
$PERL check-df space || fail=3D1
Gilles
bug-coreutils@HIDDEN:bug#12322; Package coreutils.
Full text available.
Received: (at 12322) by debbugs.gnu.org; 2 Sep 2012 09:07:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 02 05:07:02 2012
Received: from localhost ([127.0.0.1]:33859 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.72)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1T868z-0003ub-WF
for submit <at> debbugs.gnu.org; Sun, 02 Sep 2012 05:07:02 -0400
Received: from moutng.kundenserver.de ([212.227.17.9]:57484)
by debbugs.gnu.org with esmtp (Exim 4.72)
(envelope-from <mail@HIDDEN>) id 1T868u-0003uN-Tn
for 12322 <at> debbugs.gnu.org; Sun, 02 Sep 2012 05:06:59 -0400
Received: from [192.168.2.108] (p4FF74526.dip.t-dialin.net [79.247.69.38])
by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis)
id 0MJZaJ-1T9Txi1VEp-0032gT; Sun, 02 Sep 2012 11:05:29 +0200
Message-ID: <50432158.8080803@HIDDEN>
Date: Sun, 02 Sep 2012 11:05:28 +0200
From: Bernhard Voelker <mail@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:15.0) Gecko/20120825 Thunderbird/15.0
MIME-Version: 1.0
To: g.esp@HIDDEN
Subject: Re: bug#12322: coreutils-8.1{8, 9} with /etc/mtab as real file,
df/total-unprocessed fail, df/no-mtab-status is skipped
References: <537328621.162714309.1346514562747.JavaMail.root@HIDDEN>
In-Reply-To: <537328621.162714309.1346514562747.JavaMail.root@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:vSYNeSrhEume+pEfvb/QfkygV9aISgW5FrSp7J4KXqD
NjievR/E/gI9B6/tXPtVp2i8nVep6fOg0vNCAYb5ZfrOWUx57g
i8J7FrNSnyxuciWlKHkfZ1wTlUCbV5v/wjXH6vm82uZdVjC01W
u9DOUOAvCjYLu9VVrscryZdJT5akie5M3PRLY6L5Go35Ty54Hw
EBmt38Jfs+RsEY5OcJaUMv82vB9FWkOt9zy/OoOl7yPHH3l2pN
ePA7KQjwiRTp8vp62QyBNl7bc/2gpBiD7bdBQprZdDzQ53HqYT
45QqAWkUSnC5ZgPWfZaPHkDwIEbVu7ovN7aSL6/V84VxkgC5dD
Jk2gkHiJiri9bhIwJ7iV/Ff6y0VMciMucb/bwhnT2
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 12322
Cc: 12322 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)
On 09/01/2012 05:49 PM, g.esp@HIDDEN wrote:
> Maybe both tests could check if /etc/mtab is a symlink and adjust df parameter to not fail?
>
> I made this change on the tests to see if that work
> cd $(DIR_APP) && sed -i "s/ '\.' / /" tests/df/total-unprocessed
> cd $(DIR_APP) && sed -i "s/df ||/df '.' ||/" tests/df/no-mtab-status
>
> With /etc/mtab as a real file, both tests passed
Thank you for the report.
To make it clear, your change suggests this:
diff --git a/tests/df/no-mtab-status.sh b/tests/df/no-mtab-status.sh
index e434f5f..6d19f8b 100755
--- a/tests/df/no-mtab-status.sh
+++ b/tests/df/no-mtab-status.sh
@@ -20,7 +20,7 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
print_ver_ df
-df || skip_ "df fails"
+df '.' || skip_ "df fails"
# Simulate "mtab" failure.
cat > k.c <<'EOF' || framework_failure_
diff --git a/tests/df/total-unprocessed.sh b/tests/df/total-unprocessed.sh
index aa49836..dbe552e5 100755
--- a/tests/df/total-unprocessed.sh
+++ b/tests/df/total-unprocessed.sh
@@ -28,7 +28,7 @@ EOF
# The following simply finds no match for the combination
# of the options --local and FS-type nfs together with the
# argument ".". It must exit non-Zero nonetheless.
-df --local -t nfs --total '.' 2>out && fail=1
+df --local -t nfs --total 2>out && fail=1
compare exp out || fail=1
cat <<\EOF > exp || framework_failure_
Additionally to a missing mtab, there is another reason which
can make df fail: an inaccessible mount point, e.g. when there's
a file system mounted on /root/backup which is not accessible
by a normal user.
The above tests provoke certain error conditions:
no-mtab-status tests df's behaviour when the mtab cannot be read;
total-unprocessed tests that df exits non-Zero and writes an error
message when --total is used but no file system has been processed.
While your change doesn't make the tests skip under certain
conditions, it well may trigger a different than the intended
failure. E.g. in no-mtab-status, there's a test which is supposed
to fail because we simulated the mtab failure:
# These tests are supposed to fail:
LD_PRELOAD=./k.so df && fail=1
That command - a simple df without arguments - could also fail due
to another reason (see above), so the failure may shadow the expected
failure from (simulated) missing mtab.
That said, I'd rather skip a test that cannot otherwise guarantee
why it fails/succeeds.
Have a nice day,
Berny
bug-coreutils@HIDDEN:bug#12322; Package coreutils.
Full text available.
Received: (at submit) by debbugs.gnu.org; 1 Sep 2012 15:51:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 01 11:51:00 2012
Received: from localhost ([127.0.0.1]:33015 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.72)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1T7pyN-00075I-Gt
for submit <at> debbugs.gnu.org; Sat, 01 Sep 2012 11:51:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52951)
by debbugs.gnu.org with esmtp (Exim 4.72)
(envelope-from <g.esp@HIDDEN>) id 1T7pyK-000754-Gc
for submit <at> debbugs.gnu.org; Sat, 01 Sep 2012 11:50:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from <g.esp@HIDDEN>) id 1T7pwz-0007KM-5N
for submit <at> debbugs.gnu.org; Sat, 01 Sep 2012 11:49:34 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level:
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:35106)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from <g.esp@HIDDEN>) id 1T7pwz-0007KI-1y
for submit <at> debbugs.gnu.org; Sat, 01 Sep 2012 11:49:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59562)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from <g.esp@HIDDEN>) id 1T7pwx-000316-OF
for bug-coreutils@HIDDEN; Sat, 01 Sep 2012 11:49:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from <g.esp@HIDDEN>) id 1T7pww-0007K0-AI
for bug-coreutils@HIDDEN; Sat, 01 Sep 2012 11:49:31 -0400
Received: from smtp3-g21.free.fr ([212.27.42.3]:48683)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from <g.esp@HIDDEN>) id 1T7pwv-0007Fq-O9
for bug-coreutils@HIDDEN; Sat, 01 Sep 2012 11:49:30 -0400
Received: from zimbra33-e6.priv.proxad.net (unknown [172.20.243.183])
by smtp3-g21.free.fr (Postfix) with ESMTP id E7AFFA624F
for <bug-coreutils@HIDDEN>; Sat, 1 Sep 2012 17:49:23 +0200 (CEST)
Date: Sat, 1 Sep 2012 17:49:22 +0200 (CEST)
From: g.esp@HIDDEN
To: bug-coreutils@HIDDEN
Message-ID: <537328621.162714309.1346514562747.JavaMail.root@HIDDEN>
In-Reply-To: <383906067.161588556.1346482050688.JavaMail.root@HIDDEN>
Subject: coreutils-8.1{8,9} with /etc/mtab as real file,
df/total-unprocessed fail, df/no-mtab-status is skipped
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Originating-IP: [82.236.101.3]
X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - FF3.0 (Win)/7.2.0-GA2598)
X-Authenticated-User: g.esp@HIDDEN
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 208.118.235.17
X-Spam-Score: -6.9 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)
On the 8.0 era, I had to switch from /etc/mtab symlinked to /proc/mounts to a real /etc/mtab or one cu test fail to umount
Now depending of /etc/mtab nature, I see 2 df tests behaving differently on my linux chroot used to build
When not using /etc/mtab as symlink
df '.' does not report the intended 'no file systems processed' for total-unprocessed test and that test fail
but df with no parameter report 'no file systems processed' and an error, so df/no-mtab-status is skipped
When using /etc/mtab as symlink to /proc/mounts
df '.' report the intended 'no file systems processed' for total-unprocessed script and test pass
but df with no parameter can't read mount point existing out of chroot and df/no-mtab-status is skipped again
The log that FAIL with real /etc/mtab is as follow
FAIL: df/total-unprocessed
==========================
++ initial_cwd_=/usr/src/coreutils-8.19/tests
++ fail=0
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /usr/src/coreutils-8.19/tests gt-total-unprocessed.XXXX
+++ case $# in
+++ destdir_=/usr/src/coreutils-8.19/tests
+++ template_=gt-total-unprocessed.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ case $template_ in
++++ unset TMPDIR
+++ d=/usr/src/coreutils-8.19/tests/gt-total-unprocessed.CId2
+++ case $d in
+++ test -d /usr/src/coreutils-8.19/tests/gt-total-unprocessed.CId2
++++ tr S -
++++ ls -dgo /usr/src/coreutils-8.19/tests/gt-total-unprocessed.CId2
+++ perms='drwx------ 2 4096 Aug 29 00:17 /usr/src/coreutils-8.19/tests/gt-total-unprocessed.CId2'
+++ case $perms in
+++ test 0 = 0
+++ echo /usr/src/coreutils-8.19/tests/gt-total-unprocessed.CId2
+++ return
++ test_dir_=/usr/src/coreutils-8.19/tests/gt-total-unprocessed.CId2
++ cd /usr/src/coreutils-8.19/tests/gt-total-unprocessed.CId2
++ gl_init_sh_nl_='
'
++ IFS='
'
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ trap remove_tmp_ 0
+ path_prepend_ ../src
+ test 1 '!=' 0
+ path_dir_=../src
+ case $path_dir_ in
+ abs_path_dir_=/usr/src/coreutils-8.19/tests/../src
+ case $abs_path_dir_ in
+ PATH=/usr/src/coreutils-8.19/tests/../src:/usr/src/coreutils-8.19/src:/bin:/usr/bin:/sbin:/usr/sbin
+ create_exe_shims_ /usr/src/coreutils-8.19/tests/../src
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ df
+ test yes = yes
+ local i
+ for i in '$*'
+ env df --version
df (GNU coreutils) 8.19
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Torbjorn Granlund, David MacKenzie, and Paul Eggert.
+ require_mount_list_
+ local 'mount_list_fail=cannot read table of mounted file systems'
+ grep -F 'cannot read table of mounted file systems'
+ df
+ cat
+ df --local -t nfs --total .
Filesystem 1K-blocks Used Available Use% Mounted on
- 19228308 16776508 1475048 92% /
total 19228308 16776508 1475048 92%
+ fail=1
+ compare exp out
+ compare_dev_null_ exp out
+ test 2 = 2
+ test xexp = x/dev/null
+ test xout = x/dev/null
+ return 2
+ case $? in
+ compare_ exp out
+ diff -u exp out
--- exp 2012-08-29 00:17:31.000000000 +0200
+++ out 2012-08-29 00:17:31.000000000 +0200
@@ -1 +0,0 @@
-df: no file systems processed
+ fail=1
+ cat
+ df --total _does_not_exist_
+ compare exp out
+ compare_dev_null_ exp out
+ test 2 = 2
+ test xexp = x/dev/null
+ test xout = x/dev/null
+ return 2
+ case $? in
+ compare_ exp out
+ diff -u exp out
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ cd /usr/src/coreutils-8.19/tests
+ chmod -R u+rwx /usr/src/coreutils-8.19/tests/gt-total-unprocessed.CId2
+ rm -rf /usr/src/coreutils-8.19/tests/gt-total-unprocessed.CId2
+ exit 1
With real /etc/mtab, (on my chroot, there is many mount --bind before to enter the chroot)
[chroot-i486] root:/$ mount
/dev on /dev type none (rw)
[chroot-i486] root:/$ df
df: no file systems processed
[chroot-i486] root:/$ ln -sf /proc/mounts /etc/mtab
[chroot-i486] root:/$ mount
rootfs on / type rootfs (rw)
none on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
none on /proc type proc (rw,nosuid,nodev,noexec,relatime)
none on /dev type devtmpfs (rw,relatime,size=512760k,nr_inodes=128190,mode=755)
none on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/disk/by-uuid/7a235d64-5d04-41ac-a959-70465eb74fc8 on / type ext3 (rw,relatime,errors=remount-ro,data=ordered)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,relatime,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
...
[chroot-i486] root:/$ df
df: '/lib/init/rw': No such file or directory
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 19228308 15796388 2455168 87% /
none 512760 156 512604 1% /dev
/dev/sda3 19228308 15796388 2455168 87% /
tmpfs 517208 0 517208 0% /dev/shm
/dev/sda1 19228308 15796388 2455168 87% /boot
none 512760 156 512604 1% /dev
tmpfs 517208 0 517208 0% /dev/shm
...
So df/no-mtab-status is skipped in both case because df returned an error while reading /lib/init/rw that is out of chroot.
Maybe both tests could check if /etc/mtab is a symlink and adjust df parameter to not fail?
I made this change on the tests to see if that work
cd $(DIR_APP) && sed -i "s/ '\.' / /" tests/df/total-unprocessed
cd $(DIR_APP) && sed -i "s/df ||/df '.' ||/" tests/df/no-mtab-status
With /etc/mtab as a real file, both tests passed
Gilles
g.esp@HIDDEN:bug-coreutils@HIDDEN.
Full text available.bug-coreutils@HIDDEN:bug#12322; Package coreutils.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.