Re: [tap] RFC Status?

Ovid <curtis_ovid_poe@yahoo.com> Wed, 17 September 2014 19:53 UTC

Return-Path: <curtis_ovid_poe@yahoo.com>
X-Original-To: tap@ietfa.amsl.com
Delivered-To: tap@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 094B51A0AE5 for <tap@ietfa.amsl.com>; Wed, 17 Sep 2014 12:53:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.649
X-Spam-Level:
X-Spam-Status: No, score=-3.649 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-1.652, SPF_PASS=-0.001, URIBL_DBL_ABUSE_REDIR=0.001, URIBL_DBL_REDIR=0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SDc_pys5vFlo for <tap@ietfa.amsl.com>; Wed, 17 Sep 2014 12:53:01 -0700 (PDT)
Received: from nm7-vm3.bullet.mail.ne1.yahoo.com (nm7-vm3.bullet.mail.ne1.yahoo.com [98.138.91.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 207BC1A0B02 for <tap@ietf.org>; Wed, 17 Sep 2014 12:52:59 -0700 (PDT)
Received: from [98.138.226.179] by nm7.bullet.mail.ne1.yahoo.com with NNFMP; 17 Sep 2014 19:52:58 -0000
Received: from [98.138.226.163] by tm14.bullet.mail.ne1.yahoo.com with NNFMP; 17 Sep 2014 19:52:58 -0000
Received: from [127.0.0.1] by omp1064.mail.ne1.yahoo.com with NNFMP; 17 Sep 2014 19:52:58 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 397282.56206.bm@omp1064.mail.ne1.yahoo.com
Received: (qmail 99250 invoked by uid 60001); 17 Sep 2014 19:52:58 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1410983578; bh=uUUmFAKqP6iDTOQBvb6mrRqGMO4n50Ywxmvpeh5ZDEo=; h=References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=SLnM8W3MlgzXlTdjTF4e5I7LXyEeNpdpfY+uaZpcSC2chsC+Y2lAcotaelp4NhwUGsdjgGjHfwuxn/RRIrQTrJWiYrkTgC8fXLt2cYH+aWCqOt1zsFKIXAXQkrjbWDcx6xemfXkVvSC1GNm36yBRWC4KT/w/OCC0ILOI+Wre7S8=
X-YMail-OSG: WNbmx9EVM1nGecE8MikHlx7hXAZPW0qeKy1PbqA7pH6xzAn f7HWDIrTkRX6CwBMY8K8QwM8XYHVYY.86yRtanKbpXsIOG3KHYAmXEC.3687 elIPLB.EB9u2RweiBMtkRn3xkzK8mtcoo43JvjbUTW2urryXBQfdRVGCTXQr NF39TyUtE4QM5b0_ZXzAzRgCwYvSeXDYK0HWQ.73Jpn2XahKXmeDb9MSv9lS R7obEeRZd5rsY5dHZAZp_F2rSs1WF6AIE5PVi1RE9d_FFQl._uGAfIjFuvoq 8PAIpS3ih0U5TcNVBXEySvts9XORAGM3OVpX02uyBsGW5U2DUZg3lZdW2N3j F_1mIoXqC6pJxuw6rj5zDuk8W3NdBw9ZAnGc61C9mbjBIfrXQSICi2GOexT. RkwD3P5Ykgbs4fKMpHEeW_jhZxYI.9fxboLvkItwGOSdHTwNRclW.rwVp1Ls 7P3mMWw30MPRIZy_nn5hIuyqqUI4UlUTBd8mv8q4_l7ndcACf5pzN7GC.YuF eDSm44sVIyB19.YZW0CS_VFKeUjaM2ZLFcbaAeZUo2VM_alIJcyEYSV6Cff9 SxB_vCZ.R__Y1wRq16In1FcNwb8MdlvoadZlcG7NBZj2NE_YcmnEdzwebHMz Zwqk3D2Qj5lPKXCLahy1TOh1ioQv2pVrIxViGDxxJ4W4VqTULo2.27SwFdUy khlh32eDP2Vpyf3leYrmnyAjT7w5roL8ZZQ8QsZRdYcAheJamUiQ8MN3M6FF BYrB.L4UPHeQidSzQjDvEUZT4c75JTsL9HZK1fT3z5mO68a5X4pQGB7g3p64 t5.axlcmlvd2zWWm5hvkhkZa7RNJfUUjxhTyvZwUahsqtPwiehbMAENOJy3J 8uTV7XpVZVpZjd9cXfjtpASWp5.6octF3yU4GefdqRAOmBNKJ66iGSLpSQPj tzH_PZ.sQqqQXpvf2nuSHALzFeFkugUQ.wIpxsm8oxOTs
Received: from [2.6.227.184] by web126103.mail.ne1.yahoo.com via HTTP; Wed, 17 Sep 2014 12:52:58 PDT
X-Rocket-MIMEInfo: 002.001, TmF0dXJhbGx5LCBJIGZvcmdvdCB0aGUgcGxhbnMgaW4gbXkgZXhhbXBsZS4gTWF5IGFzIHdlbGwgbWFrZSBpdCB0aGUgZnVsbCBncmFtbWFyIG5vdyAod2l0aCBsaW5lcyByZWZlcnJpbmcgdG8gc3VidGVzdHMgYmVpbmcgYm9sZGVkIGFuZCBpbmRlbnRlZCwgd2l0aCBhcG9sb2dpZXMgdG8gdGhvc2Ugd2l0aCB0ZXh0LW9ubHkgZW1haWwgY2xpZW50cykuCgp0YXAgICAgICAgICAgICA6Oj0gdmVyc2lvbj8geyBjb21tZW50IHwgdW5rbm93biB9IGxlYWRpbmdfcGxhbiBsaW5lcwogICAgICAgICAgICAgICAgICABMAEBAQE-
X-Mailer: YahooMailWebService/0.8.203.696
References: <CAP4gcszybVr5Hw3mg=uTi8tqpA3wEVwo=zf2876RWhy_CmozZw@mail.gmail.com> <CAHhgV8jr6ZnsfUkpFC4OL0AwRX-aen7v-7KjcN3e0_19s7steg@mail.gmail.com> <1410980929.82809.YahooMailNeo@web126106.mail.ne1.yahoo.com>
Message-ID: <1410983578.9887.YahooMailNeo@web126103.mail.ne1.yahoo.com>
Date: Wed, 17 Sep 2014 12:52:58 -0700
From: Ovid <curtis_ovid_poe@yahoo.com>
To: Ovid <publiustemp-tapx@yahoo.com>, Leon Timmermans <fawaka@gmail.com>, Andrew de Andrade <andrew@deandrade.com.br>
In-Reply-To: <1410980929.82809.YahooMailNeo@web126106.mail.ne1.yahoo.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="1228296801-442906068-1410983578=:9887"
Archived-At: http://mailarchive.ietf.org/arch/msg/tap/eLYt9Sep5KfQRX-pLUCfW3WRiXM
Cc: "tap@ietf.org" <tap@ietf.org>
Subject: Re: [tap] RFC Status?
X-BeenThere: tap@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Ovid <curtis_ovid_poe@yahoo.com>
List-Id: Test Anything Protocol WG discussions <tap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tap>, <mailto:tap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tap/>
List-Post: <mailto:tap@ietf.org>
List-Help: <mailto:tap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tap>, <mailto:tap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 17 Sep 2014 19:53:08 -0000

Naturally, I forgot the plans in my example. May as well make it the full grammar now (with lines referring to subtests being bolded and indented, with apologies to those with text-only email clients).

tap            ::= version? { comment | unknown } leading_plan lines
                   |                                           lines trailing_plan {comment}
version        ::= 'TAP version ' positiveInteger {positiveInteger} "\n"

leading_plan   ::= plan skip_directive? "\n"

trailing_plan  ::= plan "\n"

plan           ::= '1..' nonNegativeInteger

line           ::= (comment | test | subtest | unknown | bailout ) "\n"
subtest        ::= ( '    ' version )? 
                   ( '    ' plan subtest_line { subtest_line }
                               | subtest_line { subtest_line } '    ' plan ) test
subtest_line   ::= '    ' line
test           ::= status positiveInteger? description? directive?
status         ::= 'not '? 'ok '

description    ::= (character - (digit | '#')) {character - '#'}

directive      ::= todo_directive | skip_directive

todo_directive ::= hash_mark 'TODO' ' ' {character}

skip_directive ::= hash_mark 'SKIP' ' ' {character}

comment        ::= hash_mark {character}

hash_mark      ::= '#' {' '}

bailout        ::= 'Bail out!' {character}

unknown        ::= { (character - "\n") }

(* POSIX character classes and other terminals *)

digit              ::= [:digit:]

character          ::= ([:print:] - "\n")
positiveInteger    ::= ( digit - '0' ) {digit}
nonNegativeInteger ::= digit {digit}
 
And the above says nothing about structured diagnostics. As I recall, we were going to punt on that until the next version. Any line not parseable by the above was to be considered an "unknown" line to allow for expanding the grammar with future versions. That may or may not have been a good idea, but in practice, I've never been bitten by it in many years of testing. This allows naughty code to spit out crap to STDOUT which gets ignored by the parser. By default, STDERR is always ignored, but diagnostics (comments, in the grammar) were always send to STDERR, meaning that even if we could parse them, the parser would never see them. That was problematic.


Best,
Ovid
--
IT consulting, training, international recruiting
       http://www.allaroundtheworld.fr/.
Buy my book! - http://bit.ly/beginning_perl
Live and work overseas - http://www.overseas-exile.com/


On Wednesday, 17 September 2014, 21:18, Ovid <publiustemp-tapx@yahoo.com> wrote:
 

>
>
>A few notes on this.
>
>
>For subtests, they are indented four spaces. Always four spaces. If they are indented eight spaces, you know they're a subtest of a subtest (assuming there's an intervening subtest. That means this is valid TAP, but there is no subtest because it's indented too far:
>ok 1 - foo
>>        ok 1 - bar indented too far
>>ok 2 - bar passed
>The "ok 1 - bar" line would be discarded as "unknown". 
>
>
>So if, in a stream of TAP, you find something which would be valid tap if it were unindented by four spaces, it's a subtest. The trailing, unindented summary line must mirror the status of the subtest. Thus, the following is invalid:
>
>
>ok 1 - foo
>>    not ok 1 - bar indented too far
>>ok 2 - bar passed
>>
>>Currently, Test::Harness treats the above as passing when it should not. I believe Schwern filed a bug for that. I know Andy Armstrong and I both took a quick swing at extending Test::Harness but discovered that it was more difficult than it appeared.
>
>
>The grammar would be modified to look sort of like this (modifying http://search.cpan.org/dist/Test-Harness/lib/TAP/Parser/Grammar.pm):
>
>line           ::= (comment | test | subtest | unknown | bailout ) "\n"
>>subtest        ::= subtest_line { subtest_line } test
>>subtest_line   ::= '    ' line
>That assumes we're OK with a recursive grammar. Also, the grammar doesn't really have a way of identifying the semantics of the trailing line on the subtest grammar line.
>
>
>If you have other questions about subtests, I think I can give definitive answers.
>
>
>As for the YAMLish structured diagnostics, those were never official, as far as I recall. There were several disputes, one of which was whether or not we should use YAML or JSON (I recall even XML being mentioned). Some argued that any structured diagnostic should be allowed, but I reject that firmly because that makes life hell for the parser. If you asked me what my stance is today, I would think that structured diagnostics should valid JSON, but that raises questions about whitespace issues, UTF-8, and so on. If we could agree on the format, then we'd need to agree on the keys in the structured diagnostic dictionary (and how to extend them).
>
>
>Best,
>Ovid
>--
>IT consulting, training, international recruiting
>       http://www.allaroundtheworld.fr/.
>Buy my book! - http://bit.ly/beginning_perl
>Live and work overseas - http://www.overseas-exile.com/
>
>
>
>On Wednesday, 17 September 2014, 20:07, Leon Timmermans <fawaka@gmail.com> wrote:
> 
>
>>
>>
>>On Mon, Aug 11, 2014 at 8:42 PM, Andrew de Andrade <andrew@deandrade.com.br> wrote:
>>
>>I'm working on some testing libraries for JavaScript based on TAP. Specifically, I'm trying to explore making it possible for library authors to not only check the results of their TAP tests, but also map-reduce the TAP results of the dependents of their library to see how changes to their library impact the correctness of their dependents. 
>>>
>>>
>>>e.g. I am the author of library A. I publish version 0.1.0. Another author includes my library as a dependency in library B and in library C and uses TAP to test those libraries. Given this scenario, it would be nice if I could, when modifying my library, run not only my tests, but also run the tests of all my dependents built with my previous version and my current version and compare how my changes impacted the "correctness" of their programs. 
>>>
>>>
>>>Beyond the benefits to a community, helping authors know when they can likely safely upgrade their deps, this type of runner would also help in an corporate environment with lots of code re-use between teams. 
>>>
>>>
>>>While thinking about this, I decided to go out and figure out if there is such a thing as nested TAP in the protocol specification. While searching for this, I came across this group, which is a great, but it appears there has been no activity here in a while and it looks like all the wiki pages with prior information about the state of the TAP protocol becoming an IETF RFC have disappeared. 
>>>
>>>
>>>What's the current state of TAP? Is there still interest in taking this to RFC status? I found some previous discussions on the list about nested TAP. Did those make it into the specification in any way? If so, where can I find examples of correct nested tap results?
>>>
>>>
>>>Furthermore, is there a standardized set of test fixtures for the current version that any implementation can be tested against for correctness and performance? Having worked a bit with JSON schema, I found that one of the most useful tools was a standardized set of tests to check if a particular implementation conforms to the protocol standard. (see: https://github.com/json-schema/JSON-Schema-Test-Suite )
>>>
>>>
>>I've been recently writing a TAP Harness, and for subtests I followed what Perl has been doing for years (just like TAP::Stream): have indented subtests follow by a non-indented summary line. None of this is described in detail anywhere though :-/, nor is the interaction with the barely defined YAMLish well-explored AFAIK.
>>
>>Leon
>>
>>
>>_______________________________________________
>>tap mailing list
>>tap@ietf.org
>>https://www.ietf.org/mailman/listinfo/tap
>>
>>
>>
>
>_______________________________________________
>tap mailing list
>tap@ietf.org
>https://www.ietf.org/mailman/listinfo/tap
>
>
>