At 2:20 AM -0400 9/23/01, Michael G Schwern wrote:

>Ok, after applying 12124 (so everything's using File::Spec and not
>Cwd) I still have problems with case differences.
>
>not ok 2 -   abs_path() agrees
>#     Failed test (t/op/chdir.t at line 26)
>#          got: 'USER1:[SCHWERN.PERL.T]'
>#     expected: 'USER1:[SCHWERN.PERL.t]'
>
>What's the proper solution to this?

We need to do some case leveling somewhere.  Not sure where yet.

> > not ok 5 - mkmanifest() displayed it's additions
>> #     Failed test ([-.lib.extutils]manifest.t at line 58)
>> #          got: 'Added to MANIFEST: MANIFEST
>> Added to MANIFEST: foo
>> Added to MANIFEST: manifest
>> '
>> #     expected: 'Added to MANIFEST: MANIFEST
>> Added to MANIFEST: foo
>> '
>
>Ok, it would appear open() is being a smidge too helpful.
>ExtUtils::Manifest::mkmanifest() says
>
>    open M, ">MANIFEST";
>
>and it creates the file 'manifest.'  Faaaascinating.  Is this normal?
>VMS requires every filename to contain a dot?

I think strictly speaking the dot just makes explicit that there is a
zero-length extension to the file name.  Different native
applications have different default extensions that they will attach
to a bare filename: "cc foo" assumes the file is foo.c, "print foo"
assumes the file is foo.lis.  Specifying "foo." is how you tell it
you mean just plain "foo" with no extension.  Perl generally works
without the dot:

$ perl -e "print -f 'manifest';"
1

but I believe readdir() (upon which File::Find is based, upon which
manifind is based) gives you the trailing dot.  There may be an
appropriate place to simply lop it off.

>So open() seems to be handling the non-case-preserving parts ok.
>Should it also handle filehandles with no dot?

I think open() handles dots ok, but you may get a dot back that you
don't expect when you retrieve the file name via other methods.

> > ok 18 - created moretest directory
>> not ok 19 - manifind found [.moretest]quux
>> #     Failed test ([-.lib.extutils]manifest.t at line 109)
>
>Ok, this is failing because we use File::Spec there.  We're asking
>for:
>
>    [.moretest]quux
>
>but manifind() keeps it's keys as unix file paths.  That's a genuine
>problem.  manifind() documents itself as:
>
>    manifind() returns a hash reference. The keys of the hash are the
>    files found below the current directory.
>
>would it work best for it to store the keys as native file paths?

Worth a try.  Something like this ought to do it:

   $name = VMS::Filespec::vmsify($name) if $Is_VMS;

or alternately call unixify on anything we compare with the keys from manifind().

> > ok 20 - two files found
>> not ok 21 - both files found
>> #     Failed test ([-.lib.extutils]manifest.t at line 114)
>> #          got: 'foo manifest'
>> #     expected: 'MANIFEST foo'
>
>Another file casing problem.
>
>
> > not ok 22 - maniread found comment
> > #     Failed test ([-.lib.extutils]manifest.t at line 118)
> > #          got: 'none #none'
> > #     expected: '#none'
>
>This looks like a simple matter of the VMS special-case code falling
>out of date.  Genuine bug.  Ok, a little logic rejiggering, aaaannd,
>this should do it.  It should also make sure the special-cases don't
>drift away.
>
>--- lib/ExtUtils/Manifest.pm   2001/09/23 06:05:03     1.1
>+++ lib/ExtUtils/Manifest.pm   2001/09/23 06:07:46
>@@ -142,15 +142,14 @@
>     while (<M>){
>       chomp;
>       next if /^#/;
>+
>+        my($file, $comment) = /^(\S+)\s*(.*)/;
>+        next unless $file;
>       if ($Is_MacOS) {
>-          my($item,$text) = /^(\S+)\s*(.*)/;
>-          $item = _macify($item);
>-          $item =~ s/\\([0-3][0-7][0-7])/sprintf("%c", oct($1))/ge;
>-          $read->{$item}=$text;
>+          $file = _macify($file);
>+          $file =~ s/\\([0-3][0-7][0-7])/sprintf("%c", oct($1))/ge;
>       }
>       elsif ($Is_VMS) {
>-          my($file)= /^(\S+)/;
>-          next unless $file;
>           my($base,$dir) = File::Basename::fileparse($file);
>           # Resolve illegal file specifications in the same way as tar
>           $dir =~ tr/./_/;
>@@ -158,9 +157,10 @@
>           if (@pieces > 2) { $base = shift(@pieces) . '.' . join('_',@pieces); }
>           my $okfile = "$dir$base";
>           warn "Debug: Illegal name $file changed to $okfile\n" if $Debug;
>-          $read->{"\L$okfile"}=$_;
>+          $file = "\L$okfile";
>       }
>-      else { /^(\S+)\s*(.*)/ and $read->{$1}=$2; }
>+
>+        $read->{$file} = $comment;
>     }
>     close M;
>     $read;
>

After applying this patch and enabling manifest's debug option,
here's what we're still left with, though some of these failures are
now a side effect of debugging:

$ perl [-.lib.extutils]manifest.t
1..31
ok 1 - use ExtUtils::Manifest;
ok 2 - make mantest directory
ok 3 - chdir() to mantest
ok 4 - add a temporary file
not ok 5 - mkmanifest() displayed it's additions
#     Failed test ([-.lib.extutils]manifest.t at line 58)
#          got: 'Debug: diskfile foo.
Debug: diskfile manifest.
Added to MANIFEST: MANIFEST
Added to MANIFEST: foo
Added to MANIFEST: manifest
'
#     expected: 'Added to MANIFEST: MANIFEST
Added to MANIFEST: foo
'
ok 6 - create MANIFEST file
not ok 7 - check files in MANIFEST
#     Failed test ([-.lib.extutils]manifest.t at line 67)
#          got: '3'
#     expected: '2'
Debug: Illegal name MANIFEST changed to MANIFEST
Debug: Illegal name foo changed to foo
Debug: Illegal name manifest changed to manifest
Debug: diskfile foo.
Debug: diskfile manifest.
Debug: manicheck checking from disk foo
Debug: manicheck checking from disk manifest
ok 8 - no additional files in directory
ok 9 - add another file
Debug: Illegal name MANIFEST changed to MANIFEST
Debug: Illegal name foo changed to foo
Debug: Illegal name manifest changed to manifest
Debug: diskfile bar.
Debug: diskfile foo.
Debug: diskfile manifest.
Debug: manicheck checking from MANIFEST foo
Debug: manicheck checking from MANIFEST manifest
ok 10 - MANIFEST now out of sync
not ok 11 - warning that bar has been added
#     Failed test ([-.lib.extutils]manifest.t at line 77)
#                   'Debug: Illegal name MANIFEST changed to MANIFEST
Debug: Illegal name foo changed to foo
Debug: Illegal name manifest changed to manifest
Debug: diskfile bar.
Debug: diskfile foo.
Debug: diskfile manifest.
Debug: manicheck checking from disk bar
Not in MANIFEST: bar
Debug: manicheck checking from disk foo
Debug: manicheck checking from disk manifest
'
#     doesn't match '(?-xism:^Not in MANIFEST: bar)'
ok 12 - bar reported as new
not ok 13 - disabled warnings
#     Failed test ([-.lib.extutils]manifest.t at line 84)
#          got: 'Debug: Illegal name MANIFEST changed to MANIFEST
Debug: Illegal name foo changed to foo
Debug: Illegal name manifest changed to manifest
Debug: diskfile bar.
Debug: diskfile foo.
Debug: diskfile manifest.
Debug: manicheck checking from disk bar
Debug: manicheck checking from disk foo
Debug: manicheck checking from disk manifest
'
#     expected: ''
Debug: $matches = sub { my($arg)=@_; return 1 if $arg =~ m/baz/oi  || $arg =~ 
m/.SKIP/oi  || 0 }
not ok 14 - got skipping warning
#     Failed test ([-.lib.extutils]manifest.t at line 91)
#                   'Debug: Illegal name MANIFEST changed to MANIFEST
Debug: Illegal name foo changed to foo
Debug: Illegal name manifest changed to manifest
Debug: diskfile bar.
Debug: diskfile foo.
Debug: diskfile manifest.
Debug: diskfile manifest.skip
Debug: manicheck checking from disk bar
Debug: manicheck checking from disk foo
Debug: manicheck checking from disk manifest
Skipping manifest.skip
'
#     doesn't match '(?-xism:^Skipping MANIFEST\.SKIP)'
Debug: $matches = sub { my($arg)=@_; return 1 if $arg =~ m/baz/oi  || $arg =~ 
m/.SKIP/oi  || 0 }
ok 15 - no output here
ok 16 - listed skipped files
Debug: Illegal name MANIFEST changed to MANIFEST
Debug: Illegal name foo changed to foo
Debug: Illegal name manifest changed to manifest
Debug: diskfile bar.
Debug: diskfile foo.
Debug: diskfile manifest.
Debug: diskfile manifest.skip
Debug: $matches = sub { my($arg)=@_; return 1 if $arg =~ m/baz/oi  || $arg =~ 
m/.SKIP/oi  || 0 }
Debug: manicheck checking from disk bar
Debug: manicheck checking from disk foo
Debug: manicheck checking from disk manifest
ok 17 - listing skipped with filecheck()
ok 18 - created moretest directory
Debug: diskfile bar.
Debug: diskfile foo.
Debug: diskfile manifest.
Debug: diskfile manifest.skip
Debug: diskfile moretest/quux.
not ok 19 - manifind found [.moretest]quux
#     Failed test ([-.lib.extutils]manifest.t at line 109)
Debug: Illegal name MANIFEST changed to MANIFEST
Debug: Illegal name foo changed to foo
Debug: Illegal name manifest changed to manifest
ok 20 - two files found
not ok 21 - both files found
#     Failed test ([-.lib.extutils]manifest.t at line 114)
#          got: 'foo manifest'
#     expected: 'MANIFEST foo'
Debug: Illegal name none changed to none
ok 22 - maniread found comment
ok 23 - made copy directory
Debug: Illegal name none changed to none
not ok 24 - warned about MANIFEST.SKIP
#     Failed test ([-.lib.extutils]manifest.t at line 131)
#          got: 'Debug: Illegal name MANIFEST changed to MANIFEST
Debug: Illegal name foo changed to foo
Debug: Illegal name manifest changed to manifest
Debug: diskfile bar.
Debug: diskfile foo.
Debug: diskfile manifest.
Debug: diskfile manifest.skip
Debug: manicheck checking from disk bar
Debug: manicheck checking from disk foo
Debug: manicheck checking from disk manifest
Skipping manifest.skip'
#     expected: 'Skipping MANIFEST.SKIP'
ok 25 - carped about none
ok 26 - using a new manifest file
ok 27 - remove all added files
ok 28 - remove moretest directory
ok 29 - remove copy directory
ok 30 - return to parent directory
not ok 31 - remove mantest directory
#     Failed test ([-.lib.extutils]manifest.t at line 40)
# Looks like you failed 9 tests of 31.
%SYSTEM-F-ABORT, abort


> > > > kill_perl.t runs fine by itself but not in the test suite.
> > Don't remember offhand about misc.t, but it is almost surely
>> something in test.com since it only happens when the entire test
>> suite is run.
>
>Puzzling.  I can't run the test suite, 'mms test' is barking about
>"unrecognized command verb".

The test drive machine does not have mms installed, but I've just
upgraded the mmk version so that will do fine (it's what I used to do
the build).  Just use mmk wherever you would have used mms.


> > $ perl [-.lib.test.simple.t]todo.t
>> 1..13
>> not ok 1 - Expected failure # TODO Just testing the todo interface.
>> #     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 18)
>...etc...
>
>Believe it or not, that's *exactly* what its supposed to do.
>test.com is just misparsing the "# TODO" part.
>
>Apply this patch and it should clear things up.  I don't know how to
>run test.com, but I'm sure this will work.
>

Yes, that seems to do it.  Here's what I get after the patch to test.com.

$ @[.vms]test .exe "" -"v" [-.lib.test.simple.t]todo.t

23-SEP-2001 16:37:38.41   User: SCHWERN          Process ID:   20400E3D
                          Node: SPE202           Process name: "SCHWERN"

Accounting information:
 Buffered I/O count:      4141  Peak working set size:       8352
 Direct I/O count:         897  Peak virtual size:         178624
 Page faults:             6482  Mounted volumes:                0
 Images activated:          51
 Elapsed CPU time:          0 00:00:01.81
 Connect time:              0 01:46:35.84

Soft CPU Affinity: off
[-.LIB.TEST.SIMPLE.T]TODO...............1..13
not ok 1 - Expected failure # TODO Just testing the todo interface.
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 18)
not ok 2 - Another expected failure # TODO Just testing the todo interface.
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 19)
ok 3 - This is not todo
not ok 4 - Yet another failure # TODO Just testing the todo interface.
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 29)
ok 5 - This is still not todo
not ok 6 - ok # TODO testing that error messages don't leak out of todo
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 38)
not ok 7 - like # TODO testing that error messages don't leak out of todo
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 40)
#                   'this'
#     doesn't match '/that/'
not ok 8 - is # TODO testing that error messages don't leak out of todo
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 41)
#          got: 'this'
#     expected: 'that'
not ok 9 - isnt # TODO testing that error messages don't leak out of todo
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 42)
#     it should not be 'this'
#     but it is.
not ok 10 - Fooble->can(yarble) # TODO testing that error messages don't leak out of 
todo
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 44)
#     Fooble->can('yarble') failed
not ok 11 - object->isa('yarble') # TODO testing that error messages don't leak out of 
todo
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 45)
#     The object isn't a reference
not ok 12 - use Fooble; # TODO testing that error messages don't leak out of todo
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 46)
#     Tried to use 'Fooble'.
#     Error:  Can't locate Fooble.pm in @INC (@INC contains: ../lib/VMS_AXP ../lib 
perl_root:[lib.VMS_AXP.5_7_2] perl_root:[lib] perl_root:[lib.site_perl.VMS_AXP] 
perl_root:[lib.site_perl] /perl_root/lib/site_perl .) at (eval 2) line 2.
not ok 13 - require Fooble; # TODO testing that error messages don't leak out of todo
#     Failed (TODO) test ([-.lib.test.simple.t]todo.t at line 47)
#     Tried to require 'Fooble'.
#     Error:  Can't locate Fooble.pm in @INC (@INC contains: ../lib/VMS_AXP ../lib 
perl_root:[lib.VMS_AXP.5_7_2] perl_root:[lib] perl_root:[lib.site_perl.VMS_AXP] 
perl_root:[lib.site_perl] /perl_root/lib/site_perl .) at (eval 3) line 2.
ok
All tests successful.

>Oh, this is interesting.  After I use the debugger once I get:
>Daughter DB session started...
>1..24
>######### Forked, but do not know how to create a new TTY. #########
>  Since two debuggers fight for the same TTY, input is severely entangled.

Yes, I've noticed that.  It's not deleting from the environment
properly upon exit.  There are not actually two debuggers running  --
it just thinks there are.  Or perhaps it's that it creates a new
entry in the list of debugger pids rather than recognizing that the
current process is already in the list:

      $ show logical perldb_pids
         "PERLDB_PIDS" = "541068861->541068861" (LNM$PROCESS_TABLE)

The other two bugs in the debugger I'm aware of are:

1.) There is a wayward system() call on start-up; I've searched in
vain for where this might be but can't see how it comes up with
"INFOCMP" as a command string.
2.) The exit codes used when quitting need some sort of translation on VMS.

These problems are visible here:

$ perl -de "exit;"

Loading DB routines from perl5db.pl version 1.14
Editor support available.

Enter h or `h h' for help, or `perldoc perldebug' for more help.

main::(-e:1):   exit;
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
 \INFOCMP\
  DB<1> q
%SYSTEM-W-ILLSER, illegal service call number

-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to