Ticket #1235 (closed patch: fixed)

Opened 12 years ago

Last modified 12 years ago

t/op/sysinfo.t: Improper dependence on Perl 5 %Config

Reported by: jkeenan Owned by: jkeenan
Priority: normal Milestone:
Component: testing Version: 1.7.0
Severity: medium Keywords:
Cc: barney NotFound particle Language:
Patch status: applied Platform:

Description

In the course of working on TT #1189, I have had occasion to search for files, in the configuration system or elsewhere, which depend unnecessarily on the Perl 5 %Config found on the system where Parrot is being built. I will be opening additional tickets for cases where I find such dependencies in files outside the configuration step tests.

t/op/sysinfo.t has these tests in an else block (where the reason for being in the else block is that you're not on Win32):

else {
    # Other 5 & 6

    # XXX I know this is wrong on Win32 but is it correct on any others?
    # XXX also should it be %Config or %PConfig
    TODO:
    {
        local $TODO = "Not Currently Implemented";

        pasm_output_is( <<'CODE', $Config{osvers}, "sysinfo OS version string" );
    sysinfo_s_ic S1, 5
    print S1
end
CODE

        pasm_output_is( <<'CODE', $Config{osvers}, "sysinfo OS version number string" );
    sysinfo_s_ic S1, 6
    print S1
end
CODE
    }
}

With the possible exception of pre-configuration tests, no tests in Parrot should reference the Perl 5 %Config. If there is some reason why a test of an opcode would need to reference that hash -- and I can't think of one -- then the value found in the Perl 5 %Config should be translated into a value in Parrot's %PConfig.

As the TODO message indicates, these tests are not currently being run. If at some point in the future we want to test what Parrot claims is the operating system's string for OS version, then we should do so by checking the values in %PConfig. In the meantime, I propose to cut these tests out.

Please see attached patch, which I will apply in 3-4 days unless there is serious objection. Thank you very much.

kid51

Attachments

t.op.sysinfo.diff Download (1.5 KB) - added by jkeenan 12 years ago.

Change History

Changed 12 years ago by jkeenan

Changed 12 years ago by jkeenan

  • status changed from new to assigned

Changed 12 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to fixed
  • patch changed from new to applied

Patch applied to trunk in r42409. Closing ticket.

Note: See TracTickets for help on using tickets.