From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 18 03:56:56 2011 Received: (at submit) by debbugs.gnu.org; 18 Feb 2011 08:56:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqM92-0005Tf-6z for submit@debbugs.gnu.org; Fri, 18 Feb 2011 03:56:56 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqM90-0005TU-MV for submit@debbugs.gnu.org; Fri, 18 Feb 2011 03:56:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqM8s-0007Ds-49 for submit@debbugs.gnu.org; Fri, 18 Feb 2011 03:56:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:57154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqM8r-0007DZ-Te for submit@debbugs.gnu.org; Fri, 18 Feb 2011 03:56:46 -0500 Received: from [140.186.70.92] (port=55020 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqM5U-0002yZ-A3 for bug-coreutils@gnu.org; Fri, 18 Feb 2011 03:56:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqM5E-0005yr-K5 for bug-coreutils@gnu.org; Fri, 18 Feb 2011 03:53:01 -0500 Received: from smtp3-g21.free.fr ([212.27.42.3]:43214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqM5E-0005yg-1T for bug-coreutils@gnu.org; Fri, 18 Feb 2011 03:53:00 -0500 Received: from pii350 (unknown [82.236.101.3]) by smtp3-g21.free.fr (Postfix) with SMTP id 44701A6226; Fri, 18 Feb 2011 09:52:52 +0100 (CET) Message-ID: <012a01cbcf48$abee0990$f9b5a8c0@pii350> From: "Gilles Espinasse" To: Subject: Fix sparse-pipe test on 2.6.26 kernel Date: Fri, 18 Feb 2011 09:48:52 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0127_01CBCF51.0CA56E60" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.2001 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.2001 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, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -4.5 (----) X-Debbugs-Envelope-To: submit Cc: Jim Meyering X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) This is a multi-part message in MIME format. ------=_NextPart_000_0127_01CBCF51.0CA56E60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I send 2 messages to bug-coreutils@gnu.org in last 2 weeks but that never reach the list. I don't know why as this had work in the past and I receive message from that same address and was able to reply. Isn't the antispam too good? So I am a bit forced to try with a direct coreutils message. Anyway, here is the issue. I compile the same code on different machines and that's made in a chroot a la LFS. With sparse-fiemap-test.patch, all tests are ok on three machines but randomly fail on the fourth (all x86 32-bits). The only difference at this stage between the different machines should be the running kernel (same glibc-2.11.3 is compiled before coreutils). This work on ubuntu 2.6.32-26-generic, 2.6.27.57 vanilia kernel, Centos-5.5 2.6.18-194.32.1.el5 but fail in debian v5 2.6.26-2-686 Tested as root with for i in {1..20}; do make -s check -C tests TESTS=cp/sparse-to-pipe 2>/dev/null;done | grep '1 test' show this result on the debian machine 1 of 1 test failed 1 of 1 test failed 1 test passed 1 test passed 1 of 1 test failed 1 of 1 test failed 1 of 1 test failed 1 of 1 test failed 1 test passed 1 test passed 1 of 1 test failed 1 test passed 1 test passed 1 of 1 test failed 1 of 1 test failed 1 of 1 test failed 1 test passed 1 test passed 1 of 1 test failed 1 of 1 test failed FS is ext3 failure is + require_sparse_support_ + test 0 = 0 + t=sparse.17085 + dd bs=1 seek=128K of=sparse.17085 ++ du -sk sparse.17085 + set x 0 sparse.17085 + kb_size=0 + rm -f sparse.17085 + test 0 -ge 128 + mkfifo_or_skip_ pipe + test 1 = 1 + mkfifo pipe + timeout 10 cat pipe + truncate -s1M sparse + cp sparse pipe + cmp sparse copy cmp: EOF on copy + fail=1 + Exit 1 The fun is that if I try to strace the cmp, this change the cmp test to reliabily work If I add a dd if=/dev/null of=pipe conv=notrunc,fdatasync, test reliabily work too. So I added that in attached patch. Gilles ------=_NextPart_000_0127_01CBCF51.0CA56E60 Content-Type: application/octet-stream; name="Fix-unreliable-sparse-to-pipe-test-on-cmp-on-debian-2.6.26.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Fix-unreliable-sparse-to-pipe-test-on-cmp-on-debian-2.6.26.patch" >From 345160f76145ccef51a82f483313dfbe0899a18b Mon Sep 17 00:00:00 2001=0A= From: Gilles Espinasse =0A= Date: Fri, 18 Feb 2011 09:31:11 +0100=0A= Subject: [PATCH] Fix unreliable sparse-to-pipe test on cmp on debian = 2.6.26 kernel=0A= =0A= Signed-off-by: Gilles Espinasse =0A= ---=0A= tests/cp/sparse-to-pipe | 2 ++=0A= 1 files changed, 2 insertions(+), 0 deletions(-)=0A= =0A= diff --git a/tests/cp/sparse-to-pipe b/tests/cp/sparse-to-pipe=0A= index 4d39458..b862593 100755=0A= --- a/tests/cp/sparse-to-pipe=0A= +++ b/tests/cp/sparse-to-pipe=0A= @@ -26,6 +26,8 @@ timeout 10 cat pipe > copy &=0A= =0A= truncate -s1M sparse || framework_failure_=0A= cp sparse pipe || fail=3D1=0A= +# Explicit fdatasync is needed on debian 2.6.26-2-686=0A= +dd if=3D/dev/null of=3Dpipe conv=3Dnotrunc,fdatasync=0A= cmp sparse copy || fail=3D1=0A= =0A= Exit $fail=0A= -- =0A= 1.7.3.4=0A= =0A= ------=_NextPart_000_0127_01CBCF51.0CA56E60-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 18 05:58:14 2011 Received: (at 8074) by debbugs.gnu.org; 18 Feb 2011 10:58:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqO2Q-0008Fo-Fk for submit@debbugs.gnu.org; Fri, 18 Feb 2011 05:58:14 -0500 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PqO2N-0008Fa-Qs for 8074@debbugs.gnu.org; Fri, 18 Feb 2011 05:58:12 -0500 Received: (qmail 5112 invoked from network); 18 Feb 2011 10:58:05 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 18 Feb 2011 10:58:05 -0000 Message-ID: <4D5E4FEC.5070705@draigBrady.com> Date: Fri, 18 Feb 2011 10:54:36 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Gilles Espinasse Subject: Re: bug#8074: Fix sparse-pipe test on 2.6.26 kernel References: <012a01cbcf48$abee0990$f9b5a8c0@pii350> In-Reply-To: <012a01cbcf48$abee0990$f9b5a8c0@pii350> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 8074 Cc: Jim Meyering , 8074@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) On 18/02/11 08:48, Gilles Espinasse wrote: > I compile the same code on different machines and > that's made in a chroot a la LFS. With sparse-fiemap-test.patch, all tests > are ok on three machines but randomly fail on the fourth (all x86 32-bits). > The only difference at this stage between the different machines should be > the running kernel (same glibc-2.11.3 is compiled before coreutils). > This work on ubuntu 2.6.32-26-generic, 2.6.27.57 vanilia kernel, Centos-5.5 > 2.6.18-194.32.1.el5 but fail in debian v5 2.6.26-2-686 > > Tested as root with > for i in {1..20}; do make -s check -C tests TESTS=cp/sparse-to-pipe > 2>/dev/null;done | grep '1 test' > show this result on the debian machine > 1 of 1 test failed > 1 of 1 test failed > 1 test passed > 1 test passed > 1 of 1 test failed > 1 of 1 test failed > 1 of 1 test failed > 1 of 1 test failed > 1 test passed > 1 test passed > 1 of 1 test failed > 1 test passed > 1 test passed > 1 of 1 test failed > 1 of 1 test failed > 1 of 1 test failed > 1 test passed > 1 test passed > 1 of 1 test failed > 1 of 1 test failed > > FS is ext3 > failure is > + require_sparse_support_ > + test 0 = 0 > + t=sparse.17085 > + dd bs=1 seek=128K of=sparse.17085 > ++ du -sk sparse.17085 > + set x 0 sparse.17085 > + kb_size=0 > + rm -f sparse.17085 > + test 0 -ge 128 > + mkfifo_or_skip_ pipe > + test 1 = 1 > + mkfifo pipe > + timeout 10 cat pipe > + truncate -s1M sparse > + cp sparse pipe > + cmp sparse copy > cmp: EOF on copy > + fail=1 > + Exit 1 > > The fun is that if I try to strace the cmp, this change the cmp test to > reliabily work > > If I add a dd if=/dev/null of=pipe conv=notrunc,fdatasync, test reliabily > work too. > So I added that in attached patch. Good testing! Interesting to see that fdatasync flushes the pipe to disk. However it might be more portable/robust to use `wait` rather than that dd command? cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 18 07:45:05 2011 Received: (at 8074) by debbugs.gnu.org; 18 Feb 2011 12:45:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqPhp-0002yr-BV for submit@debbugs.gnu.org; Fri, 18 Feb 2011 07:45:05 -0500 Received: from smtp3-g21.free.fr ([212.27.42.3]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqPhm-0002y8-Cj for 8074@debbugs.gnu.org; Fri, 18 Feb 2011 07:45:03 -0500 Received: from pii350 (unknown [82.236.101.3]) by smtp3-g21.free.fr (Postfix) with SMTP id 41748A6241; Fri, 18 Feb 2011 13:44:50 +0100 (CET) Message-ID: <01ca01cbcf69$133c0f50$f9b5a8c0@pii350> From: "Gilles Espinasse" To: =?iso-8859-1?Q?P=E1draig_Brady?= References: <012a01cbcf48$abee0990$f9b5a8c0@pii350> <4D5E4FEC.5070705@draigBrady.com> Subject: Re: bug#8074: Fix sparse-pipe test on 2.6.26 kernel Date: Fri, 18 Feb 2011 13:40:49 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_01C7_01CBCF71.73BF92E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.2001 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.2001 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 8074 Cc: Jim Meyering , 8074@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) This is a multi-part message in MIME format. ------=_NextPart_000_01C7_01CBCF71.73BF92E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ----- Original Message -----=20 From: "P=E1draig Brady" To: "Gilles Espinasse" Cc: "Jim Meyering" ; <8074@debbugs.gnu.org> Sent: Friday, February 18, 2011 11:54 AM Subject: bug#8074: Fix sparse-pipe test on 2.6.26 kernel ... > > > > If I add a dd if=3D/dev/null of=3Dpipe conv=3Dnotrunc,fdatasync, test reliabily > > work too. > > So I added that in attached patch. > > Good testing! > Interesting to see that fdatasync flushes the pipe to disk. > However it might be more portable/robust to use `wait` > rather than that dd command? > > cheers, > P=E1draig. > wait work fine Find v2 attached Gilles ------=_NextPart_000_01C7_01CBCF71.73BF92E0 Content-Type: application/octet-stream; name="v2-Fix-unreliable-sparse-to-pipe-test-on-cmp-on-debian-2.6.26.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="v2-Fix-unreliable-sparse-to-pipe-test-on-cmp-on-debian-2.6.26.patch" >From 950e84c182979aa9f5a6f101ba96800fe3651fdf Mon Sep 17 00:00:00 2001=0A= From: Gilles Espinasse =0A= Date: Fri, 18 Feb 2011 13:25:56 +0100=0A= Subject: [PATCH] Fix unreliable sparse-to-pipe test on cmp on debian = 2.6.26 kernel=0A= MIME-Version: 1.0=0A= Content-Type: text/plain; charset=3DUTF-8=0A= Content-Transfer-Encoding: 8bit=0A= =0A= As recommended by P=E1draig Brady, tested to work with wait instead of = dd fdatasync.=0A= =0A= Signed-off-by: Gilles Espinasse =0A= ---=0A= tests/cp/sparse-to-pipe | 1 +=0A= 1 files changed, 1 insertions(+), 0 deletions(-)=0A= =0A= diff --git a/tests/cp/sparse-to-pipe b/tests/cp/sparse-to-pipe=0A= index 4d39458..0d5e27c 100755=0A= --- a/tests/cp/sparse-to-pipe=0A= +++ b/tests/cp/sparse-to-pipe=0A= @@ -26,6 +26,7 @@ timeout 10 cat pipe > copy &=0A= =0A= truncate -s1M sparse || framework_failure_=0A= cp sparse pipe || fail=3D1=0A= +wait # needed on debian 2.6.26-2-686=0A= cmp sparse copy || fail=3D1=0A= =0A= Exit $fail=0A= -- =0A= 1.7.3.4=0A= =0A= ------=_NextPart_000_01C7_01CBCF71.73BF92E0-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 18 07:54:32 2011 Received: (at 8074-done) by debbugs.gnu.org; 18 Feb 2011 12:54:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqPqx-0003BM-Ve for submit@debbugs.gnu.org; Fri, 18 Feb 2011 07:54:32 -0500 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqPqu-0003B7-Uo for 8074-done@debbugs.gnu.org; Fri, 18 Feb 2011 07:54:29 -0500 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 715AA600C0; Fri, 18 Feb 2011 13:54:22 +0100 (CET) From: Jim Meyering To: "Gilles Espinasse" Subject: Re: bug#8074: Fix sparse-pipe test on 2.6.26 kernel In-Reply-To: <01ca01cbcf69$133c0f50$f9b5a8c0@pii350> (Gilles Espinasse's message of "Fri, 18 Feb 2011 13:40:49 +0100") References: <012a01cbcf48$abee0990$f9b5a8c0@pii350> <4D5E4FEC.5070705@draigBrady.com> <01ca01cbcf69$133c0f50$f9b5a8c0@pii350> Date: Fri, 18 Feb 2011 13:54:22 +0100 Message-ID: <87ipwho64h.fsf@rho.meyering.net> Lines: 61 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.8 (-----) X-Debbugs-Envelope-To: 8074-done Cc: =?iso-8859-1?Q?P=E1draig?= Brady , 8074-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) Gilles Espinasse wrote: > ----- Original Message ----- > From: "P=E1draig Brady" > To: "Gilles Espinasse" > Cc: "Jim Meyering" ; <8074@debbugs.gnu.org> > Sent: Friday, February 18, 2011 11:54 AM > Subject: bug#8074: Fix sparse-pipe test on 2.6.26 kernel > > > ... >> > >> > If I add a dd if=3D/dev/null of=3Dpipe conv=3Dnotrunc,fdatasync, test > reliabily >> > work too. >> > So I added that in attached patch. >> >> Good testing! >> Interesting to see that fdatasync flushes the pipe to disk. >> However it might be more portable/robust to use `wait` >> rather than that dd command? >> >> cheers, >> P=E1draig. >> > wait work fine > Find v2 attached Thanks to both of you. That was just a buggy (racy) test, independent of kernel or distro, so I've adjusted comments accordingly: >From e6067bcb040f110238bd7cbf9f3781f2e149e0c0 Mon Sep 17 00:00:00 2001 From: Gilles Espinasse Date: Fri, 18 Feb 2011 13:52:21 +0100 Subject: [PATCH] tests: correct racy sparse-to-pipe test * tests/cp/sparse-to-pipe: Wait for backgrounded "cat" to complete before comparing the results. --- tests/cp/sparse-to-pipe | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tests/cp/sparse-to-pipe b/tests/cp/sparse-to-pipe index 4d39458..9bbaafa 100755 --- a/tests/cp/sparse-to-pipe +++ b/tests/cp/sparse-to-pipe @@ -25,7 +25,11 @@ mkfifo_or_skip_ pipe timeout 10 cat pipe > copy & truncate -s1M sparse || framework_failure_ cp sparse pipe || fail=3D1 + +# Ensure that the cat has completed before comparing. +wait + cmp sparse copy || fail=3D1 Exit $fail -- 1.7.4.1.16.g759e8 From unknown Sun Jun 22 03:54:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 19 Mar 2011 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator