From unknown Sun Aug 10 16:45:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14493: MSYS line ending problem in t/cxx-demo.sh Resent-From: Peter Rosin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Tue, 28 May 2013 23:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14493 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 14493@debbugs.gnu.org X-Debbugs-Original-To: bug-automake@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.136978471113338 (code B ref -1); Tue, 28 May 2013 23:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 May 2013 23:45:11 +0000 Received: from localhost ([127.0.0.1]:38257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhTZn-0003T4-Kc for submit@debbugs.gnu.org; Tue, 28 May 2013 19:45:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37251) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhTZl-0003Sq-IE for submit@debbugs.gnu.org; Tue, 28 May 2013 19:45:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhTYJ-0000ur-9w for submit@debbugs.gnu.org; Tue, 28 May 2013 19:43:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.3 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:43014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhTYJ-0000un-6w for submit@debbugs.gnu.org; Tue, 28 May 2013 19:43:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhTYD-0004Di-Qw for bug-automake@gnu.org; Tue, 28 May 2013 19:43:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhTY9-0000tK-4I for bug-automake@gnu.org; Tue, 28 May 2013 19:43:33 -0400 Received: from mail.lysator.liu.se ([2001:6b0:17:f0a0::3]:36199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhTY8-0000t8-Th for bug-automake@gnu.org; Tue, 28 May 2013 19:43:29 -0400 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id D730440003 for ; Wed, 29 May 2013 01:43:26 +0200 (CEST) Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com [90.227.119.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id BA77240002 for ; Wed, 29 May 2013 01:43:26 +0200 (CEST) Message-ID: <51A5411D.20208@lysator.liu.se> Date: Wed, 29 May 2013 01:43:25 +0200 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -6.1 (------) Hi! I have this interesting log snippet from a failed run of t/cxx-demo.sh on the master branch (commit baf8a1c22acce0908): + for p in play work + ./play + cat exp.play We are playing :-) Howdy, play! + cat got.play We are playing :-) Howdy, play! + diff exp.play got.play 1,2c1,2 < We are playing :-) < Howdy, play! --- > We are playing :-) > Howdy, play! + am_exit_trap 1 + exit_status=1 This is on MSYS, and I strongly suspect a line ending discrepancy. The output from ./play is likely to have CRNL line endings, while exp.play is likely to have NL line endings. diff then barfs. Cheers, Peter From unknown Sun Aug 10 16:45:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14493: MSYS line ending problem in t/cxx-demo.sh Resent-From: Peter Rosin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 29 May 2013 08:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14493 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 14493@debbugs.gnu.org Received: via spool by 14493-submit@debbugs.gnu.org id=B14493.136981670421254 (code B ref 14493); Wed, 29 May 2013 08:39:02 +0000 Received: (at 14493) by debbugs.gnu.org; 29 May 2013 08:38:24 +0000 Received: from localhost ([127.0.0.1]:38856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uhbtn-0005Wj-VD for submit@debbugs.gnu.org; Wed, 29 May 2013 04:38:24 -0400 Received: from mail.lysator.liu.se ([130.236.254.3]:51427) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uhbtl-0005WW-2e for 14493@debbugs.gnu.org; Wed, 29 May 2013 04:38:22 -0400 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 3C89540003 for <14493@debbugs.gnu.org>; Wed, 29 May 2013 10:36:57 +0200 (CEST) Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com [90.227.119.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 1EE5F40002 for <14493@debbugs.gnu.org>; Wed, 29 May 2013 10:36:56 +0200 (CEST) Message-ID: <51A5BE27.20500@lysator.liu.se> Date: Wed, 29 May 2013 10:36:55 +0200 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 References: <51A5411D.20208@lysator.liu.se> In-Reply-To: <51A5411D.20208@lysator.liu.se> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -3.0 (---) On 2013-05-29 01:43, Peter Rosin wrote: > This is on MSYS, and I strongly suspect a line ending discrepancy. > The output from ./play is likely to have CRNL line endings, while > exp.play is likely to have NL line endings. diff then barfs. The problem is the same on the micro branch (87e49f4f040c8ab). Cheers, Peter From unknown Sun Aug 10 16:45:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14493: MSYS line ending problem in t/cxx-demo.sh Resent-From: Stefano Lattarini Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 29 May 2013 08:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14493 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: Peter Rosin Cc: 14493@debbugs.gnu.org Received: via spool by 14493-submit@debbugs.gnu.org id=B14493.136981792024187 (code B ref 14493); Wed, 29 May 2013 08:59:01 +0000 Received: (at 14493) by debbugs.gnu.org; 29 May 2013 08:58:40 +0000 Received: from localhost ([127.0.0.1]:38895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhcDP-0006I4-NT for submit@debbugs.gnu.org; Wed, 29 May 2013 04:58:40 -0400 Received: from mail-bk0-f50.google.com ([209.85.214.50]:41240) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhcDN-0006Hp-Ps for 14493@debbugs.gnu.org; Wed, 29 May 2013 04:58:38 -0400 Received: by mail-bk0-f50.google.com with SMTP id ik8so3702384bkc.23 for <14493@debbugs.gnu.org>; Wed, 29 May 2013 01:57:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=z4k/plecAnnkVg28xKdx5tAkklsO1lGPU0G/AOngDLI=; b=FfCUu0b3d/Ncux2SmuTr8iUsDKIDybBBskXBoBpMq1PdXDfP24s+yHCDTnJqe97ssl E3ksEC2i29E1IMRJ8qCtlhrDg/eE9jrA2YNksXCiMZN6EMQ49ewNBw0jxy88ER4DWS2B w99WzKo3WUViuu811YRt4VfAj1sXTIEjViEdLFakhHJ0ZA08W5J6BsIhrLDQF4UOd7Yj g3Ho/3kvSVHqW7iX7KQad7xOMfM0/ypJgjtDyeL7An4PULykQbtNI9u6Xj1TTVRqZS8Y RqODXFwksNLeyFV/bxOmBvG0f+0WNIvZrek0SMkiMIwtGuk2mILowaB14hLITdDkrHgI eH1A== X-Received: by 10.205.43.4 with SMTP id ua4mr495431bkb.161.1369817829350; Wed, 29 May 2013 01:57:09 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id i15sm11468198bkz.12.2013.05.29.01.57.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 May 2013 01:57:08 -0700 (PDT) Message-ID: <51A5C2E2.4010900@gmail.com> Date: Wed, 29 May 2013 10:57:06 +0200 From: Stefano Lattarini MIME-Version: 1.0 References: <51A5411D.20208@lysator.liu.se> In-Reply-To: <51A5411D.20208@lysator.liu.se> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.6 (--) On 05/29/2013 01:43 AM, Peter Rosin wrote: > Hi! > > I have this interesting log snippet from a failed run of t/cxx-demo.sh > on the master branch (commit baf8a1c22acce0908): > And as you noted in your follow-up message, the problem is the same on the micro branch (87e49f4f040c8ab)) > > + for p in play work > + ./play > + cat exp.play > We are playing :-) > Howdy, play! > + cat got.play > We are playing :-) > Howdy, play! > + diff exp.play got.play > 1,2c1,2 > < We are playing :-) > < Howdy, play! > --- >> We are playing :-) >> Howdy, play! > + am_exit_trap 1 > + exit_status=1 > > > This is on MSYS, and I strongly suspect a line ending discrepancy. > The output from ./play is likely to have CRNL line endings, while > exp.play is likely to have NL line endings. diff then barfs. > Any suggestion on how to easily fix this? If not, I have a utterly untested idea: - Add a new helper function to t/ax/am-test-lib.sh that tells whether we are running on MinGW or no (you can steal existing code from the 'require_tool()' function). - Use it in cxx-demo.sh to determine whether we are running under MinGW. - If that's the case, use perl to normalize the line endings (turning all CR-LF into simple LF). Is this doable? Thanks, Stefano From unknown Sun Aug 10 16:45:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14493: MSYS line ending problem in t/cxx-demo.sh Resent-From: Peter Rosin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 29 May 2013 13:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14493 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: Stefano Lattarini Cc: 14493@debbugs.gnu.org Received: via spool by 14493-submit@debbugs.gnu.org id=B14493.13698348731362 (code B ref 14493); Wed, 29 May 2013 13:42:01 +0000 Received: (at 14493) by debbugs.gnu.org; 29 May 2013 13:41:13 +0000 Received: from localhost ([127.0.0.1]:39441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhgcO-0000L0-7K for submit@debbugs.gnu.org; Wed, 29 May 2013 09:40:47 -0400 Received: from mail.lysator.liu.se ([130.236.254.3]:52197) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhgcJ-0000Km-Ld for 14493@debbugs.gnu.org; Wed, 29 May 2013 09:40:41 -0400 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 1288740003; Wed, 29 May 2013 15:39:15 +0200 (CEST) Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com [90.227.119.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id C244940002; Wed, 29 May 2013 15:39:14 +0200 (CEST) Message-ID: <51A60502.5000803@lysator.liu.se> Date: Wed, 29 May 2013 15:39:14 +0200 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 References: <51A5411D.20208@lysator.liu.se> <51A5C2E2.4010900@gmail.com> In-Reply-To: <51A5C2E2.4010900@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -3.0 (---) On 2013-05-29 10:57, Stefano Lattarini wrote: > On 05/29/2013 01:43 AM, Peter Rosin wrote: >> Hi! >> >> I have this interesting log snippet from a failed run of t/cxx-demo.sh >> on the master branch (commit baf8a1c22acce0908): >> > And as you noted in your follow-up message, the problem is the same on > the micro branch (87e49f4f040c8ab)) > >> >> + for p in play work >> + ./play >> + cat exp.play >> We are playing :-) >> Howdy, play! >> + cat got.play >> We are playing :-) >> Howdy, play! >> + diff exp.play got.play >> 1,2c1,2 >> < We are playing :-) >> < Howdy, play! >> --- >>> We are playing :-) >>> Howdy, play! >> + am_exit_trap 1 >> + exit_status=1 >> >> >> This is on MSYS, and I strongly suspect a line ending discrepancy. >> The output from ./play is likely to have CRNL line endings, while >> exp.play is likely to have NL line endings. diff then barfs. >> > Any suggestion on how to easily fix this? > > If not, I have a utterly untested idea: > > - Add a new helper function to t/ax/am-test-lib.sh that tells whether > we are running on MinGW or no (you can steal existing code from the > 'require_tool()' function). > > - Use it in cxx-demo.sh to determine whether we are running under > MinGW. > > - If that's the case, use perl to normalize the line endings (turning > all CR-LF into simple LF). > > Is this doable? Yes, but why not always zap all CR characters? Shouldn't weaken the test by much... Something like the below change perhaps? (perl seemed a bit heavy) Cheers, Peter diff --git a/t/cxx-demo.sh b/t/cxx-demo.sh index f6d568d..27d18e1 100644 --- a/t/cxx-demo.sh +++ b/t/cxx-demo.sh @@ -165,7 +165,7 @@ END Good morning, work. END for p in play work; do - ./$p > got.$p || { cat got.$p; exit 1; } + ./$p | tr -d '\015' > got.$p || { cat got.$p; exit 1; } cat exp.$p cat got.$p diff exp.$p got.$p From unknown Sun Aug 10 16:45:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14493: MSYS line ending problem in t/cxx-demo.sh Resent-From: Stefano Lattarini Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 29 May 2013 14:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14493 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: Peter Rosin Cc: 14493@debbugs.gnu.org Received: via spool by 14493-submit@debbugs.gnu.org id=B14493.13698372386527 (code B ref 14493); Wed, 29 May 2013 14:21:02 +0000 Received: (at 14493) by debbugs.gnu.org; 29 May 2013 14:20:38 +0000 Received: from localhost ([127.0.0.1]:39968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhhEz-0001hE-Ln for submit@debbugs.gnu.org; Wed, 29 May 2013 10:20:38 -0400 Received: from mail-bk0-f42.google.com ([209.85.214.42]:39627) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhhEv-0001gx-D6 for 14493@debbugs.gnu.org; Wed, 29 May 2013 10:20:34 -0400 Received: by mail-bk0-f42.google.com with SMTP id jk13so4984331bkc.15 for <14493@debbugs.gnu.org>; Wed, 29 May 2013 07:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=PQEYbt21qpgRnNX8FP4FOHGUDOAF/yr1EsNny90vPzc=; b=yF+VtbFIxvSb8EeL64GjpFC/YEWo+4R0e0LF9yBbEm4jP//UaUdGHK9QYdD1+msadH LdAQ3UxBk2+MwEolGnuBFVI7ZefTgwnktAT27EuqnpBcTpIr076HOJQHDhlM+GNE+O8P 0WZ0YTpz4epk7JfABmG7D1NJeHiHoEGJbEP/UF72V7vtx7nqh2T1w8K3dSSwenPsegG7 xGxv+xhxHPx3x8xpMxcrMqBLRrr0wShU9/MDN/fnPKjw/mr/p2tfENMNc6dXVneODnMF DjGqd8FxO+PKaiaAyNC/Rp2vv1/pJMQco17/6VrnWs74gkpraZuiVq557mc+M+LqMMdB IQgg== X-Received: by 10.205.75.74 with SMTP id yz10mr732761bkb.179.1369837143352; Wed, 29 May 2013 07:19:03 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id v6sm12090950bko.3.2013.05.29.07.19.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 May 2013 07:19:02 -0700 (PDT) Message-ID: <51A60E4D.6030401@gmail.com> Date: Wed, 29 May 2013 16:18:53 +0200 From: Stefano Lattarini MIME-Version: 1.0 References: <51A5411D.20208@lysator.liu.se> <51A5C2E2.4010900@gmail.com> <51A60502.5000803@lysator.liu.se> In-Reply-To: <51A60502.5000803@lysator.liu.se> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.6 (--) On 05/29/2013 03:39 PM, Peter Rosin wrote: > On 2013-05-29 10:57, Stefano Lattarini wrote: >> On 05/29/2013 01:43 AM, Peter Rosin wrote: >>> Hi! >>> >>> I have this interesting log snippet from a failed run of t/cxx-demo.sh >>> on the master branch (commit baf8a1c22acce0908): >>> >> And as you noted in your follow-up message, the problem is the same on >> the micro branch (87e49f4f040c8ab)) >> >>> >>> + for p in play work >>> + ./play >>> + cat exp.play >>> We are playing :-) >>> Howdy, play! >>> + cat got.play >>> We are playing :-) >>> Howdy, play! >>> + diff exp.play got.play >>> 1,2c1,2 >>> < We are playing :-) >>> < Howdy, play! >>> --- >>>> We are playing :-) >>>> Howdy, play! >>> + am_exit_trap 1 >>> + exit_status=1 >>> >>> >>> This is on MSYS, and I strongly suspect a line ending discrepancy. >>> The output from ./play is likely to have CRNL line endings, while >>> exp.play is likely to have NL line endings. diff then barfs. >>> >> Any suggestion on how to easily fix this? >> >> If not, I have a utterly untested idea: >> >> - Add a new helper function to t/ax/am-test-lib.sh that tells whether >> we are running on MinGW or no (you can steal existing code from the >> 'require_tool()' function). >> >> - Use it in cxx-demo.sh to determine whether we are running under >> MinGW. >> >> - If that's the case, use perl to normalize the line endings (turning >> all CR-LF into simple LF). >> >> Is this doable? > > Yes, but why not always zap all CR characters? Shouldn't weaken the test > by much... > > Something like the below change perhaps? (perl seemed a bit heavy) > > Cheers, > Peter > > > diff --git a/t/cxx-demo.sh b/t/cxx-demo.sh > index f6d568d..27d18e1 100644 > --- a/t/cxx-demo.sh > +++ b/t/cxx-demo.sh > @@ -165,7 +165,7 @@ END > Good morning, work. > END > for p in play work; do > - ./$p > got.$p || { cat got.$p; exit 1; } > + ./$p | tr -d '\015' > got.$p || { cat got.$p; exit 1; } > Yeah, let's got for this (with a comment like "zap carriage-return characters, for MinGW/MSYS" ;-). No need to over-complicate stuff. If in a few days I'll still be convinced that it's worth making this conditional to MinGW, I'll do that myself. > cat exp.$p > cat got.$p > diff exp.$p got.$p > > Thanks, Stefano From unknown Sun Aug 10 16:45:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14493: MSYS line ending problem in t/cxx-demo.sh Resent-From: Peter Rosin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 29 May 2013 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14493 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: "automake-patches@gnu.org" Cc: 14493@debbugs.gnu.org Received: via spool by 14493-submit@debbugs.gnu.org id=B14493.136983948016530 (code B ref 14493); Wed, 29 May 2013 14:58:02 +0000 Received: (at 14493) by debbugs.gnu.org; 29 May 2013 14:58:00 +0000 Received: from localhost ([127.0.0.1]:40088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uhhp8-0004IK-4h for submit@debbugs.gnu.org; Wed, 29 May 2013 10:58:00 -0400 Received: from mail.lysator.liu.se ([130.236.254.3]:44007) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uhhp4-0004I3-Jc for 14493@debbugs.gnu.org; Wed, 29 May 2013 10:57:55 -0400 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id CEFC940003; Wed, 29 May 2013 16:56:29 +0200 (CEST) Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com [90.227.119.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 7F52840002; Wed, 29 May 2013 16:56:29 +0200 (CEST) Message-ID: <51A6171C.9060704@lysator.liu.se> Date: Wed, 29 May 2013 16:56:28 +0200 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 References: <51A5411D.20208@lysator.liu.se> <51A5C2E2.4010900@gmail.com> <51A60502.5000803@lysator.liu.se> <51A60E4D.6030401@gmail.com> In-Reply-To: <51A60E4D.6030401@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -3.0 (---) On 2013-05-29 16:18, Stefano Lattarini wrote: > Yeah, let's got for this (with a comment like "zap carriage-return characters, > for MinGW/MSYS" ;-). No need to over-complicate stuff. If in a few days I'll > still be convinced that it's worth making this conditional to MinGW, I'll do > that myself. I'm pushing the below patch. Cheers, Peter >From 625678d54b616bf5c2db6c803f4b0746f70e3e53 Mon Sep 17 00:00:00 2001 From: Peter Rosin Date: Wed, 29 May 2013 16:53:55 +0200 Subject: [PATCH] tests: avoid a spurious failure on MSYS Fixes automake bug#14493. * t/cxx-demo.sh: Strip CR characters from the program output. Signed-off-by: Peter Rosin --- t/cxx-demo.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/t/cxx-demo.sh b/t/cxx-demo.sh index f6d568d..f872c43 100644 --- a/t/cxx-demo.sh +++ b/t/cxx-demo.sh @@ -165,7 +165,8 @@ END Good morning, work. END for p in play work; do - ./$p > got.$p || { cat got.$p; exit 1; } + # Strip CR characters catering to MinGW programs on MSYS. + ./$p | tr -d '\015' > got.$p || { cat got.$p; exit 1; } cat exp.$p cat got.$p diff exp.$p got.$p -- 1.7.9 From unknown Sun Aug 10 16:45:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14493: [FYI] {micro} tests: slightly stricter checks in t/cxx-demo.sh References: <51A5411D.20208@lysator.liu.se> In-Reply-To: <51A5411D.20208@lysator.liu.se> Resent-From: Stefano Lattarini Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Mon, 03 Jun 2013 10:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14493 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: automake-patches@gnu.org Cc: Peter Rosin , 14493@debbugs.gnu.org Received: via spool by 14493-submit@debbugs.gnu.org id=B14493.1370253865620 (code B ref 14493); Mon, 03 Jun 2013 10:05:01 +0000 Received: (at 14493) by debbugs.gnu.org; 3 Jun 2013 10:04:25 +0000 Received: from localhost ([127.0.0.1]:48551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjRcm-00009t-HH for submit@debbugs.gnu.org; Mon, 03 Jun 2013 06:04:25 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:58559) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjRck-00009O-Fx for 14493@debbugs.gnu.org; Mon, 03 Jun 2013 06:04:23 -0400 Received: by mail-wg0-f53.google.com with SMTP id m15so3106277wgh.32 for <14493@debbugs.gnu.org>; Mon, 03 Jun 2013 03:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=hoZEgKrtC+kB3INsCHl0fin2zHnAY0acrFJa2d0spkM=; b=TdITyKhOKWDvPOjSdYXiFnJFfansc+qGy52fvVdYTc4GKRF5TMe4vGVWv36vZ6zJ6e aZNhLhEbQ//2KyC7eKVhf2uIMUe92+gGTGbDAi3cuhSBTOR/qcavrXUG2Op5YFyCgvXF 3vobs+e+KkWYosksBj4H83YT9SoB2tx1+1J/befbDyKY7Ez2YyYGIb+h6C4eh7O7PO5G hqvMip+mXDQe6R4MOlKmrAbDspqfBb3R+X8d4f05XSWFHwvIpElZ1tYLtmfhm2TjUnWP 13J8r9uRnyRgmC+/pMExBegnmCDOASs9VeBUOU9BaOEmTUARIs8X0N+suR5PpY3yrPZK KA9Q== X-Received: by 10.180.212.74 with SMTP id ni10mr11593400wic.41.1370253745276; Mon, 03 Jun 2013 03:02:25 -0700 (PDT) Received: from localhost.localdomain (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id en3sm22307735wid.1.2013.06.03.03.02.23 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Jun 2013 03:02:24 -0700 (PDT) From: Stefano Lattarini Date: Mon, 3 Jun 2013 12:02:12 +0200 Message-Id: X-Mailer: git-send-email 1.8.3.rc3.8.g5e49f30 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.6 (--) This is a follow-up to the commit fixing automake bug#14493. * t/cxx-demo.sh: Also check that the built program returns the correct (i.e., zero) exit status when run. And improve comments a little while at it. Signed-off-by: Stefano Lattarini --- t/cxx-demo.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/cxx-demo.sh b/t/cxx-demo.sh index f872c43..97a46ce 100644 --- a/t/cxx-demo.sh +++ b/t/cxx-demo.sh @@ -165,7 +165,11 @@ END Good morning, work. END for p in play work; do - # Strip CR characters catering to MinGW programs on MSYS. + # The program must run correctly (exit status = 0). + ./$p + # And it must have the expected output. Note that we strip extra + # CR characters (if any), to cater to MinGW programs on MSYS. + # See automake bug#14493. ./$p | tr -d '\015' > got.$p || { cat got.$p; exit 1; } cat exp.$p cat got.$p -- 1.8.3.rc3.8.g5e49f30 From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 03 06:07:51 2013 Received: (at control) by debbugs.gnu.org; 3 Jun 2013 10:07:51 +0000 Received: from localhost ([127.0.0.1]:48558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjRg6-0000Md-U3 for submit@debbugs.gnu.org; Mon, 03 Jun 2013 06:07:51 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:43325) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjRg5-0000Lu-KM for control@debbugs.gnu.org; Mon, 03 Jun 2013 06:07:50 -0400 Received: by mail-bk0-f44.google.com with SMTP id r7so161619bkg.31 for ; Mon, 03 Jun 2013 03:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; bh=rjITTz46oE+JecOLsx2IyEXMSags6puhN3Qd9NCFUyA=; b=EZ2hMRV4iwIaP1wydpdY9SFaoeMBemXLcuvLPyfO+NvSslAAcAxOo/04/TDd5ORfZf 4CT4xaAGB47k48KGjC5CC2tZEYzeuD2+zCthCIRYaGq1/15WlKmruPswZIHEjBIjxCaK Gc51gfG56SDH0xdmWow5Kt2x2arz/fzZUVtiaY0dXJseZuFUkeNFX2XdHWZxAQdIUml3 f9f9zDT+tDW98dEaXD8+Rd6fY+EctWdj7izcrg8cOdEtphGSG0rTRKknSVnDQOTM67/Y yla7J+fuI3cfRnXmFaJRB/A0RRgzTsMFsvFUVPhYTDgPkJqya/F+eJuE7ZUSYfTax8Mc TgfA== X-Received: by 10.205.33.205 with SMTP id sp13mr6181542bkb.117.1370253952350; Mon, 03 Jun 2013 03:05:52 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id iy11sm19693122bkb.11.2013.06.03.03.05.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Jun 2013 03:05:51 -0700 (PDT) Message-ID: <51AC6A7D.7050805@gmail.com> Date: Mon, 03 Jun 2013 12:05:49 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: GNU bug tracker automated control server Subject: x Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.6 (--) tags 14493 + patch severity 14493 minor close 14493 thanks From unknown Sun Aug 10 16:45:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#14493: [FYI] {micro} tests: slightly stricter checks in t/cxx-demo.sh Resent-From: Peter Rosin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Mon, 03 Jun 2013 13:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14493 X-GNU-PR-Package: automake X-GNU-PR-Keywords: patch To: Stefano Lattarini Cc: 14493@debbugs.gnu.org, automake-patches@gnu.org Received: via spool by 14493-submit@debbugs.gnu.org id=B14493.137026722227493 (code B ref 14493); Mon, 03 Jun 2013 13:47:02 +0000 Received: (at 14493) by debbugs.gnu.org; 3 Jun 2013 13:47:02 +0000 Received: from localhost ([127.0.0.1]:48878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjV6A-000795-C1 for submit@debbugs.gnu.org; Mon, 03 Jun 2013 09:47:01 -0400 Received: from mail.lysator.liu.se ([130.236.254.3]:39981) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjV67-00078s-KQ for 14493@debbugs.gnu.org; Mon, 03 Jun 2013 09:46:56 -0400 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id C82934000B; Mon, 3 Jun 2013 15:45:02 +0200 (CEST) Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com [90.227.119.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 92E4040005; Mon, 3 Jun 2013 15:45:02 +0200 (CEST) Message-ID: <51AC9DDE.1080902@lysator.liu.se> Date: Mon, 03 Jun 2013 15:45:02 +0200 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 References: <51A5411D.20208@lysator.liu.se> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: -1.0 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.4 (--) On 2013-06-03 12:02, Stefano Lattarini wrote: > This is a follow-up to the commit fixing automake bug#14493. > > * t/cxx-demo.sh: Also check that the built program returns the > correct (i.e., zero) exit status when run. And improve comments > a little while at it. Good catch! Cheers, Peter