#1217: [PATCH] t/dynpmc/foo.t converted to PIR
----------------------+-----------------------------------------------------
 Reporter:  bubaflub  |        Owner:  Util  
     Type:  patch     |       Status:  closed
 Priority:  trivial   |    Milestone:        
Component:  testing   |      Version:  1.7.0 
 Severity:  low       |   Resolution:  fixed 
 Keywords:            |         Lang:        
    Patch:            |     Platform:        
----------------------+-----------------------------------------------------
Changes (by Util):

  * status:  assigned => closed
  * resolution:  => fixed


Comment:

 = History =
 http://irclog.perlgeek.de/parrot/2009-11-07#i_1699644 [[BR]]
 <@Util> Does Parrot provide any way to undo a `loadlib` op in a running
 PIR program?[[BR]]
 <@Coke> Util: I don't think so.[[BR]]
 <@Coke> it's basically a dynamic load, yes? (is there a way to do that
 unload from C?)[[BR]]
 <@Util> Coke: Ah, I see. I had not thought it through to the dyld/dlopen
 calls.[[BR]]
 <@Util> So, anything that tests different ways of loading a lib (like
 t/dynpmc/foo.t does) will need a fresh Parrot instance for each
 `loadlib`.[[BR]]
 <@Util> bubaflub++ did nice work in TT #1217 converting foo.t from Perl to
 PIR. However, it is now full of false negatives, since the first
 successful `loadlib` masks any later failures.

 http://irclog.perlgeek.de/parrot/2009-11-12#i_1719435 [[BR]]
 <@dukeleto> msg Util are you working on TT 1217/1218? you assigned them to
 yourself, but made no comments on the ticket[[BR]]
 <@Util> msg dukeleto I am working on TT#1217 & TT#1218. Summary: When
 testing DynPMCs via `loadlib`, each test must run as a separate instance
 of Parrot. The first patch, while otherwise perfect, causes false
 negatives; every test after the first successful test will pass, even if
 the PMC cannot be loaded, because it was *already* loaded by the prior
 test.


 = Resolution =
 The patch should not be applied as-is. Pre-patch, each `loadlib` occurs in
 a separate process. Post-patch, all of the `loadlib`s happen in the same
 process. Since the first successful `loadlib` masks any later failures,
 all the subsequent tests succeed without actually testing anything.

 I have re-worked the patch to produce separate test files. foo-01.t
 contains documentation, with a cautionary notice about this issue, and a
 pointer back to this ticket. The foo-*.t files contain the remaining
 separated tests.

 Committed: [[BR]]
 - Merge branch 'Util/TT1217' [bbd5de8] [[BR]]
 - Split t/dynpmc/foo.t into multiple files, to stop false positives
 mentioned in TT#1217 comments. [422eb53] [[BR]]
 - Apply patch from TT#1217, to change t/dynpmc/foo.t from Perl/PIR to pure
 PIR. [15f3332]

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1217#comment:5>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to