Ticket #1217 (closed patch: fixed)

Opened 5 years ago

Last modified 3 years ago

[PATCH] t/dynpmc/foo.t converted to PIR

Reported by: bubaflub Owned by: Util
Priority: trivial Milestone:
Component: testing Version: 1.7.0
Severity: low Keywords:
Cc: Language:
Patch status: Platform:

Description

Attached is a patch to convert the test t/dynpmc/foo.t to PIR.

Attachments

dynpmc_foo.patch Download (5.4 KB) - added by bubaflub 5 years ago.
(v2) forgot to indent a label

Change History

Changed 5 years ago by bubaflub

(v2) forgot to indent a label

  Changed 5 years ago by Util

  • owner set to Util

  Changed 5 years ago by Util

  • status changed from new to assigned

follow-up: ↓ 4   Changed 4 years ago by jkeenan

Util,

Can you provide an update on the status of this ticket?

Thank you very much.

kid51

in reply to: ↑ 3   Changed 3 years ago by jkeenan

Replying to jkeenan:

Util, Can you provide an update on the status of this ticket?

Same question: Can you provide update?

  Changed 3 years ago by Util

  • status changed from assigned to closed
  • resolution set to fixed

History

 http://irclog.perlgeek.de/parrot/2009-11-07#i_1699644
<@Util> Does Parrot provide any way to undo a loadlib op in a running PIR program?
<@Coke> Util: I don't think so.
<@Coke> it's basically a dynamic load, yes? (is there a way to do that unload from C?)
<@Util> Coke: Ah, I see. I had not thought it through to the dyld/dlopen calls.
<@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.
<@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
<@dukeleto> msg Util are you working on TT 1217/1218? you assigned them to yourself, but made no comments on the ticket
<@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 loadlibs 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:
- Merge branch 'Util/TT1217' [bbd5de8]
- Split t/dynpmc/foo.t into multiple files, to stop false positives mentioned in TT#1217 comments. [422eb53]
- Apply patch from TT#1217, to change t/dynpmc/foo.t from Perl/PIR to pure PIR. [15f3332]

Note: See TracTickets for help on using tickets.