Skip to content

Concurrency should be supported. #15

@exodist

Description

@exodist

The new TAP should have explicit concurrency support, that is where TAP can be generated via multiple threads.

Note: For most things there is no guarantee of atomic writes, but that is not TAP's problem, so lets skip over that and assume that the generator will only let 1 child write at a time, but allow children to write lines inter-weaved.

One simple thing to do is #14 which simply makes test order unimportant so long as no numbers are completely missing. This solves the problem for basic ok's. This can also solve the problem for #2 if we use the 1.2.3 syntax. However if we do not have numbers enabled we loose the gains as subtest results are no longer easily linked to their subtest in a concurrent producer.

In #2 I suggested the ability to prefix any line of output with a test number followed by a colon... but this fails to solve the concurrency problem when test numbers are turned off.

I got a suggestion from someone that we use thread/proc ids. So here is a proposal:

1..10
ok - first, in parent
ok - second in parent
t1001 ok - first in thread
t1001 s1..2
t1001 ok . - subtest result 1
t1001 ok . - subtest result 2
t1001 # This is a diag in the child thread
t1001 ok

Essentially the proposal is this: ANY line of output can be prefixed by a sequence starting with a single letter, followed by only digits then ended with whitespace. All lines with the same prefix are associated. No prefix is the default prefix, and all lines with no prefix are grouped.

Another thing I added here is the subtest plan prefixed with an 's'. I will mention this possibility in #2 shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions