From unknown Fri Aug 15 18:09:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16588: TAP driver fails with DOS line endings Resent-From: Nick Bowler Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 29 Jan 2014 16:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16588 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 16588@debbugs.gnu.org X-Debbugs-Original-To: Received: via spool by submit@debbugs.gnu.org id=B.139101373612549 (code B ref -1); Wed, 29 Jan 2014 16:43:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Jan 2014 16:42:16 +0000 Received: from localhost ([127.0.0.1]:40476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8YDP-0003GK-QL for submit@debbugs.gnu.org; Wed, 29 Jan 2014 11:42:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38214) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8YDM-0003GB-Us for submit@debbugs.gnu.org; Wed, 29 Jan 2014 11:42:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8YDG-0007Fx-Lw for submit@debbugs.gnu.org; Wed, 29 Jan 2014 11:42:12 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8YDG-0007Ft-J3 for submit@debbugs.gnu.org; Wed, 29 Jan 2014 11:42:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8YDB-0003Pn-5G for bug-automake@gnu.org; Wed, 29 Jan 2014 11:42:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8YD4-00079e-Tn for bug-automake@gnu.org; Wed, 29 Jan 2014 11:42:01 -0500 Received: from mx4.gridway.net ([72.1.205.246]:46752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8YD4-00078q-Nn for bug-automake@gnu.org; Wed, 29 Jan 2014 11:41:54 -0500 Received: from delivery.mygridway.net (delivery.mygridway.net [72.1.205.180]) by mx4.gridway.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s0TGfran022607 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Wed, 29 Jan 2014 11:41:53 -0500 Received: from mail.ellipticsemi.com (209.217.122.41) by delivery.mygridway.net (172.17.12.4) with Microsoft SMTP Server (TLS) id 14.2.347.0; Wed, 29 Jan 2014 11:41:53 -0500 Date: Wed, 29 Jan 2014 11:41:52 -0500 From: Nick Bowler Message-ID: <20140129164152.GA10268@elliptictech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Organization: Elliptic Technologies Inc. User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [209.217.122.41] X-CanIt-Geo: ip=72.1.205.180; country=CA; region=ON; city=Ottawa; latitude=45.4167; longitude=-75.7000; http://maps.google.com/maps?q=45.4167,-75.7000&z=6 X-CanItPRO-Stream: base:outbound (inherits from base:default) X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 72.1.205.246 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.9 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi, I'm using Automake's TAP support for one of my test suites. One of my test cases is a TAP producer written in C. This is causing me troubles because, when building for a DOS-based system such as w32, the test case produces ASCII CR+LF line endings. Automake's TAP driver complains that there is no plan, even though there is one on the first line -- curiously, it does print the PASS results. In case it matters, I am cross-building the test case from a GNU system using i486-pc-mingw32-gcc and the test suite runs the resulting program in wine. So in this case Automake's TAP driver is running on the build (GNU) system. I have not been able to find a formal specification[1] of TAP, so I'm unsure how line endings are supposed to be treated. Nevertheless, the "prove" utility included with perl works fine with DOS line endings. So it would be nice if the tests passed when TAP producers emit DOS line endings. Here's an example which can be run on a POSIX-ey system: % cat >test.tap <<'EOF' printf '1..1\xd\xaok 1\xd\xa' EOF % prove --exec /bin/sh test.tap test.tap .. ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.03 usr + 0.00 sys = 0.03 CPU) Result: PASS % automake/lib/tap-driver.sh --test-name test.tap --log-file test.log --trs-file test.trs -- /bin/sh test.tap PASS: test.tap 1 ERROR: test.tap - missing test plan [1] There's a section[2] in the Automake manual "Links and external resources on TAP" but most of the relevant-looking links don't appear to work anymore. In particular http://testanything.org has been down for maintenance until "tomorrow" for some time now. [2] https://gnu.org/software/automake/manual/automake.html#Links-and-external-resources-on-TAP Cheers, -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)