In article <20100911171359.gb2...@timac.local>, tim.bu...@pobox.com (Tim Bunce) wrote:
> On Thu, Sep 09, 2010 at 06:05:09PM -0500, Craig A. Berry wrote: > > In article <4c88ecbf.8040...@easysoft.com>, > > martin.ev...@easysoft.com ("Martin J. Evans") wrote: > > > > > I ran DBI trunk on VMS (perl, v5.8.1 built for VMS_AXP) just to check it > > > out. > > > There were a lot of failures. > > I'm pretty sure DBI passed all tests on VMS sometime in the last year or > > two, so hopefully there's nothing too fundamental wrong. I see what I > > can find. > > Wonderful. Many thanks Craig! I've attached a patch that gets VMS into about the same shape as other platforms, which is to say about 4-5 test failures mostly related to the z*51_dbmfile.t tests as of tr...@14425. (The count is approximate since things are a bit of a moving target right now -- every time I've updated in the past week or so I've gotten new test failures and/or merge conflicts with what I've been trying to fix.) Here's what's in the patch: 1.) On VMS, assignments to %ENV normally persist after Perl exits, so when setting something up for a test, they need to be torn down in an END block to prevent subsequent tests from getting unintended environment settings. 2.) A couple of the fake modules used for testing depend on readdir() returning at least one directory when passed an empty directory (it doesn't seem to matter *what* directory as long as there is something). While unixy platforms typically get away with this assumption by getting the dot and dot-dot directories, the standard explicitly says the presence of these must not be depended on (and they don't exist on VMS). The path of least resistances was to make test_dir() in t/lib.pl create its own placeholder directory inside the temp directory it creates. 3.) On VMS, the .dir extension is reserved for directories, so SDBM_File creates its dir files with the .sdbm_dir extension. A VMS-specific adjustment to 51dbm_file.t was needed for this. 4.) On VMS, there is no such thing as a file with no extension. A file with zero-length extension is, by default returned from readdir() with a trailing dot. A couple of tweaks were needed in DBD::File to get rid of that dot. The things that still fail look like: t/zvxgp_50dbm_simple.t ..... ok Can't store item CODE(0x14284e0) at ../../lib/storable.pm (autosplit into [--.lib.auto.Storable]_freeze.al) line 339. DBD::Gofer::db selectall_arrayref failed: Cannot open disk$i64sys:[craig.dbi.test_output_60891]krueger.lck: no such file or director y (2) at /D0/CRAIG/DBI/blib/lib/DBD/File.pm line 690 at /D0/CRAIG/DBI/blib/lib/DBI/DBD/SqlEngine.pm line 793; DBD::DBM::st execute f ailed [for Statement "select * from Krueger"] at DBI::PurePerl DBI::st::execute line 118. at ./t/51dbm_file.t line 82 Can't use an undefined value as an ARRAY reference at ./t/51dbm_file.t line 83. Compilation failed in require at t/zvxgp_51dbm_file.t line 6. # Tests were run but no plan was declared and done_testing() was not seen. whereas on Mac OS X they look like: t/zvxnp_51dbm_file.t ....... 1/? DBD::DBM::db selectall_arrayref failed: Cannot open /Users/craig/dbi/test_output_31349/freddy.lck:No such file or directory (2) at /Users/craig/dbi/blib/lib/DBD/File.pm line 690 at /Users/craig/dbi/blib/lib/DBI/DBD/SqlEngine.pm line 793 [for Statement "select * from Krueger"] at ./t/51dbm_file.t line 74 Can't use an undefined value as an ARRAY reference at ./t/51dbm_file.t line 75. Compilation failed in require at t/zvxnp_51dbm_file.t line 6. # Tests were run but no plan was declared and done_testing() was not seen. t/zvxnp_51dbm_file.t ....... Dubious, test returned 2 (wstat 512, 0x200) All 5 subtests passed so there is a slightly different subset of the z*51dbm_file.t tests that don't pass but for similar-sounding reasons. On VMS, it seems to be all the ones that set DBI_AUTOPROXY in the environment. I have not had any success at peeling back the layers upon layers of indirection that Gofer and friends perform to do whatever it is they do, so I'm punting on this. begin 644 dbi_vms_20100918.patch m26y...@z(&QI8B]$0D0O1FEL92YP;0H]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M"BTM+2!L:6(O1$)$+T9I;&4N<&T)*')E=FES:6]N(#$T-#(U*0HK*RL@;&EB M+T1"1"]&:6QE+G!M"2AW;W)K:6YG(&-O<'DI"D!`("TQ-#$L,3...@*s$t,2PV M($!`"B`@("`@)&1R:79E<B`]("1D<f...@m/GM);7!L96UE;G1O<D-L87-S?2`] M?B!M+UYD8F1<.EPZ*%M>7#I=*RE<.EPZ+VD@/R`D,2`Z(")&:6QE(CL*(`H@ M("`@('=H:6QE("AD969I;F5D("@D9FEL92`](')E861D:7(@*"1D:7)H*2DI M('L*+0EI9B`H)%Y/(&5Q(")635,B*2!["BT)("`@(",@:68@;v...@5du3('1H m...@879o:6...@=v%r;FEN9W,@9G)O;2!C871D:7(@:68@>6]U('5S92!A(&9I M;&4*+0D@("`@(R`H;F]T(&$...@9&ER*2!A<R!T:&4...@9fel92!b96qo=phm"2`@ M("`D9FEL92`A?B!M+UPN9&ER)"]O:2!A;F0@;F5X=#L*+0D@("`...@?0h@"6UY M("1D(#...@1fel93hz4w!e8rt^8v%t9&ER("@D9&ER+"`D9FEL92D["B`)(R!A M;&QO=R!C=7)R96YT(&1I<B`N+BX@:7...@8v%n(&)E(&$...@9&%T85]S;W5R8V4@ M=&]O"B`))&9I;&4@;f...@1fel93hz4w!e8rt^=7!d:7(@*"D@)b...@+60@)&0@ M86YD"D!`("TW-S8L-B`K-S<Q+#<@0$`*(`EI9B`H)')E<W!E8W1?8V%S92D@ M>PH@"2`@("`D8VUP<W5B(#T@<W5B('L*(`D);7...@*"1F;b...@=6yd968l("1S m...@i(#...@1fel93hz0f%s96ya;64Z.F9I;&5P87)S92`H)%\L("1F;E]A;GE? M97AT7W)E9V5X*3L**PD))'-F>"`]("<G(&EF("1>3R!E<2`G5DU3)R!A;F0@ M)'-F>"!E<2`G+B<[("`C(&YO(&5X=&5N<VEO;B!T=7)N<R!U<"!A<R!A(&1O M=`H@"0dd...@97$@)&)A<V5N86UE(&%N9`H@"0D@("`@<F5T=7)N("AL8R`D M<V9X(&5Q(&QC("1E>'0@;W(@(21R97$@)B8@(21...@i.ph@"0ER971U<FX@ M,#l*...@+3<X-"PV("LW.#`L-R!`0`H@"65L<V4@>PH@"2`@("`D8VUP<W5B M(#T@<W5B('L*(`D);7...@*"1F;b...@=6yd968l("1...@i(#...@1fel93hz0f%s M96YA;64Z.F9I;&5P87)S92`H)%\L("1F;E]A;GE?97AT7W)E9V5X*3L**PD) M)'-F>"`]("<G(&EF("1>3R!E<2`G5DU3)R!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M97AT(#T@)%Y/(&5Q("=635,G(#\@)RYS9&)M7V1I<B<@.B`G+F1I<B<["BL* M("1...@m/F1O*'$O8W)E871E('1A8FQE(&9r...@*&$@:6YT96=E<b...@8b!i M;G1E9V5R*2\I.PHM;VLH("UF($9I;&4Z.E-P96,M/F-A=&9I;&4H("1D:7(L M(")&4D5$+F1I<B(@*2P@(D92140N9&ER(&5X:7-T<R(@*3L**V]K*"`M9B!& M:6QE.CI3<&5C+3YC871F:6QE*"`D9&ER+"`B1E)%1"1D:7)F97AT(B`I+"`B M1E)%1"1D:7)F97AT(&5X:7-T<R(@*3L*(`H@<FUT<F5E("1D:7(["B!M:W!A M=&@@)&1I<cl*...@+30x+#<@*S4P+#<@0$`*('T*(`H@)&1B:"T^9&\H<2]C M<F5A=&4...@=&%B;&4...@1e)%1"`H82!I;G1E9V5R+"!B(&EN=&5G97(I+RD["BUO M:R@@+...@1fel93hz4w!e8rt^8v%t9fel92@@)&1I<BP@(F9R960N9&ER(B`I M+"`B9G)E9"YD:7(@97AI<W1S(B`I.PHK;VLH("UF($9I;&4Z.E-P96,M/F-A M=&9I;&4H("1D:7(L(")F<F5D)&1I<F9E>'0B("DL(")F<F5D)&1I<F9E>'0@ M97AI<W1S(B`I.PH@"B!O:R@@)&1B:"T^9&\H<2]I;G-E<G0@:6YT;R!F4D5$ M("AA+&(I('9A;'5E<r...@q+#(I+RDL("=I;G-E<G0@:6YT;R!M:7AE9"!C87-E -('1A8FQE)R`I.PH@"@== ` end