develooper Front page | perl.perl5.porters | Postings from September 2005

Re: Pls. Review patch@25626 - VMS::Filespec update.

Thread Previous | Thread Next
John E. Malmberg
September 28, 2005 09:37
Re: Pls. Review patch@25626 - VMS::Filespec update.
Message ID:
John E. Malmberg wrote:
> Michael G Schwern wrote:
>> On Wed, Sep 28, 2005 at 12:55:47AM -0400, John E. Malmberg wrote:
>>> From my tests on Perl 5.8.7, the modules that need to be changed to test
>>> for the existence of these new methods and if they are defined to act 
>>> on the results are:
>> Just looking at that list of modules that need VMS-specific code, without
>> even knowing what has to be changed, leaves me feeling its untenable.  
>> Folks
>> can't be expected to put in that much platform specific code, 
>> particularly
>> a platform most people don't have access to and cannot test against.  
>> If this is just for the core, I'd hate to see what would be necessary 
>> for CPAN.
>> There's got to be a better way.

To follow up again on this, a real example is the current VMS issues 
with the thread about lib/test/simple/t/create.t.

There is no way that test as it was in blead when I last ran it will 
ever pass completely on VMS when VMS is in a traditional mode unless I 
change the traditional VMS behavior on a way that could silently 
introduce data corruption into VMS specific scripts.

Now by using the DECC features, after I fix the issue where the I/O 
flush routine is a NOOP on VMS when it needs to call fsync(), it will pass.

The I/O flush routine being a NOOP is clearly different than what a VMS 
specific Perl Script would expect, but probably has not been noticed. 
So when I get a chance, I will look at providing a VMS specific patch.

And it also may be affecting other platforms, as with out the fsync() 
call, it is not guaranteed by X/Open that the I/O is actually flushed to 
the disk.  It just may make it there most of the time because of system 

So then the VMS related choices for the lib/test/simple/t/create.t would be:

A. Re-write it to avoid the VMS specific issue, like the patch that you 
posted earlier does.

B. Accept the occasional failure and mark it a # TODO.

C. Skip the failed test when the script detects that it is running on

D. Same as C, but have it check if VMS is in the wrong mode before the skip.

E. Try to change VMS to be in the correct mode and fall back to C if it 
can not.

After these new modes are available, such examination will be needed for 
all tests that are currently skipped or marked # TODO when run on OpenVMS.

The way I implemented these modes in the mutant Perl 5.8.6/Perl 5.8.7 
was in such a way that option E was not available.

So my plan is to activate the methods in vms.c that VMS::Filespec will 
expose, and then run the Perl tests to see what breaks when the modes 
are changed.

Personal Opinion Only

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About