List Info

Thread: RE: patch for ext/IO_Compress_Zlib/t/101truncate-deflate.t for EBCDIC platform




RE: patch for ext/IO_Compress_Zlib/t/101truncate-defla te.t for EBCDIC platform
user name
2007-11-05 03:08:42
From: Chun Bing Ge [mailto:gecbcn.ibm.com]
 
> "Paul Marquess" <Paul.Marquessntlworld.com> wrote 2007-11-02 17:40:01:
> 
> > From: Chun Bing Ge [mailto:gecbcn.ibm.com]
> >
...
> >
> > Regarding the other patches you sent, the one for
004gziphdr.t. has
> already
> > been done by a previous patch. The rest of your
patches are all for the
> > IO_Compress_Zlib/t/101truncate-*.t series of
tests. These are all of the
> > form
> >
> > +if (ord("A") == 193) {
> > +    plan tests => 744 + $extra;
> > +}
> > +else {
> >      plan tests => 734 + $extra;
> > +}
> >
> > Given that you are patching against 5.9.5, I don't
know whether these
> are
> > needed for the most recent development version. I
don't see anything in
> > those test harness that would account for the
extra 10 tests, so I'll
> hold
> > off on applying these for now.
> >
> 
> I think there is a better way which could give you the
answer!
> You could change the source data in those test cases
into the EBCDIC
> values on linux,
> like "abc" --> "x81x82x83".
Then you could get how many extra tests run
> out!

For this particular series of tests that would be fine - the
nature of the
data being compressed doesn't really matter, so I'll go with
that.

So I'll put a patch together that hopefully sorts out the
compression issues
on EBCDIC, but is there anyone running the latest
development sources to
test them out?

Paul


RE: patch for ext/IO_Compress_Zlib/t/101truncate-defla te.t for EBCDIC platform
user name
2007-11-05 03:31:16
"Paul Marquess" <Paul.Marquessntlworld.com> wrote 2007-11-05 17:08:42:

> From: Chun Bing Ge [mailto:gecbcn.ibm.com]
> 
> > "Paul Marquess" <Paul.Marquessntlworld.com> wrote 2007-11-02 
17:40:01:
> > 
> > > From: Chun Bing Ge [mailto:gecbcn.ibm.com]
> > >
> ...
> > >
> > > Regarding the other patches you sent, the one
for 004gziphdr.t. has
> > already
> > > been done by a previous patch. The rest of
your patches are all for 
the
> > > IO_Compress_Zlib/t/101truncate-*.t series of
tests. These are all of 
the
> > > form
> > >
> > > +if (ord("A") == 193) {
> > > +    plan tests => 744 + $extra;
> > > +}
> > > +else {
> > >      plan tests => 734 + $extra;
> > > +}
> > >
> > > Given that you are patching against 5.9.5, I
don't know whether 
these
> > are
> > > needed for the most recent development
version. I don't see anything 
in
> > > those test harness that would account for the
extra 10 tests, so 
I'll
> > hold
> > > off on applying these for now.
> > >
> > 
> > I think there is a better way which could give you
the answer!
> > You could change the source data in those test
cases into the EBCDIC
> > values on linux,
> > like "abc" -->
"x81x82x83". Then you could get how many extra
tests 
run
> > out!
> 
> For this particular series of tests that would be fine
- the nature of 
the
> data being compressed doesn't really matter, so I'll go
with that.
> 
> So I'll put a patch together that hopefully sorts out
the compression 
issues
> on EBCDIC, but is there anyone running the latest
development sources to
> test them out?
> 
> Paul
> 
I'd like to give you the patches for these
tests(perl-current, 5.9.5).
I do not have time to test the lastest development sources,
so below 
patches are FYI.
Any question, please let me know, thanks.

ext/IO_Compress_Zlib/t/101truncate-gzip.t
--- 
/home/spring/perl/perl-current/ext/IO_Compress_Zlib/t/101tru
ncate-gzip.t 
2007-04-24 11:19:59.000000000 +0800
+++
/home/spring/patch/chgfile/ext-IO_Compress_Zlib-t-101truncat
e-gzip.t 
2007-09-11 11:01:47.000000000 +0800
 -18,7
+18,12 
     $extra = 1
         if eval { require Test::NoWarnings ;  import
Test::NoWarnings; 1 
};
 
+if (ord("A") == 193) {
+    plan tests => 988 + $extra;
+}
+else {
     plan tests => 978 + $extra;
+}
 
 };
 


ext/IO_Compress_Zlib/t/101truncate-rawdeflate.t
--- 
/home/spring/perl/perl-current/ext/IO_Compress_Zlib/t/101tru
ncate-rawdeflate.t 
2007-04-24 11:19:59.000000000 +0800
+++ 
/home/spring/patch/chgfile/ext-IO_Compress_Zlib-t-101truncat
e-rawdeflate.t 
2007-09-11 11:05:00.000000000 +0800
 -17,7
+17,12 
     $extra = 1
         if eval { require Test::NoWarnings ;  import
Test::NoWarnings; 1 
};
 
+if (ord("A") == 193) {
+    plan tests => 635 + $extra;
+}
+else {
     plan tests => 625 + $extra;
+}
 
 };
 

ext/IO_Compress_Zlib/t/101truncate-zip.t
--- 
/home/spring/perl/perl-current/ext/IO_Compress_Zlib/t/101tru
ncate-zip.t 
2007-04-24 11:19:59.000000000 +0800
+++
/home/spring/patch/chgfile/ext-IO_Compress_Zlib-t-101truncat
e-zip.t 
2007-09-11 11:07:32.000000000 +0800
 -18,7
+18,12 
     $extra = 1
         if eval { require Test::NoWarnings ;  import
Test::NoWarnings; 1 
};
 
+if (ord("A") == 193) {
+    plan tests => 2326 + $extra;
+}
+else {
     plan tests => 2316 + $extra;
+}
 
 };
 

Ge, Chun Bing
空山新雨后,天气晚来秋
RE: patch for ext/IO_Compress_Zlib/t/101truncate-defla te.t for EBCDIC platform
user name
2007-11-05 04:26:04
From: Chun Bing Ge [mailto:gecbcn.ibm.com]


> "Paul Marquess" <Paul.Marquessntlworld.com> wrote 2007-11-05 17:08:42:
> 
> > From: Chun Bing Ge [mailto:gecbcn.ibm.com]
> >
> > > "Paul Marquess"
<Paul.Marquessntlworld.com> wrote 2007-11-02
> 17:40:01:
> > >
> > > > From: Chun Bing Ge [mailto:gecbcn.ibm.com]
> > > >
> > ...
> > > >
> > > > Regarding the other patches you sent,
the one for 004gziphdr.t. has
> > > already
> > > > been done by a previous patch. The rest
of your patches are all for
> the
> > > > IO_Compress_Zlib/t/101truncate-*.t
series of tests. These are all of
> the
> > > > form
> > > >
> > > > +if (ord("A") == 193) {
> > > > +    plan tests => 744 + $extra;
> > > > +}
> > > > +else {
> > > >      plan tests => 734 + $extra;
> > > > +}
> > > >
> > > > Given that you are patching against
5.9.5, I don't know whether
> these
> > > are
> > > > needed for the most recent development
version. I don't see anything
> in
> > > > those test harness that would account
for the extra 10 tests, so
> I'll
> > > hold
> > > > off on applying these for now.
> > > >
> > >
> > > I think there is a better way which could
give you the answer!
> > > You could change the source data in those
test cases into the EBCDIC
> > > values on linux,
> > > like "abc" -->
"x81x82x83". Then you could get how many extra
tests
> run
> > > out!
> >
> > For this particular series of tests that would be
fine - the nature of
> the
> > data being compressed doesn't really matter, so
I'll go with that.
> >
> > So I'll put a patch together that hopefully sorts
out the compression
> issues
> > on EBCDIC, but is there anyone running the latest
development sources to
> > test them out?
> >
> > Paul
> >
> I'd like to give you the patches for these
tests(perl-current, 5.9.5).
> I do not have time to test the lastest development
sources, so below
> patches are FYI.
> Any question, please let me know, thanks.

Thanks, but hopefully I won't need those patches. I'm going
to make this
change to truncate.pl instead to remove the ASCII data. 


*** ./t/lib/compress/truncate.pl        Fri Nov  2 13:59:57
2007
--- ./t/lib/compress/truncate.pl        Fri Nov  2 14:12:04
2007
***************
*** 14,25 ****
      my $Error           = getErrorRef($CompressClass);
      my $UnError         = getErrorRef($UncompressClass);

!     my $hello = <<EOM ;
! hello world
! this is a test
! some more stuff on this line
! and finally...
! EOM

      my $blocksize = 10 ;

--- 14,34 ----
      my $Error           = getErrorRef($CompressClass);
      my $UnError         = getErrorRef($UncompressClass);

! #    my $hello = <<EOM ;
! #hello world
! #this is a test
! #some more stuff on this line
! #and finally...
! #EOM
!
!     # ASCII hex equivalent of the text above. This makes
the test
!     # harness behave identically on an EBCDIC platform.
!     my $hello =
!      
"x68x65x6cx6cx6fx20x77x6fx72x6cx64x0ax74x
68x69x73" .
!      
"x20x69x73x20x61x20x74x65x73x74x0ax73x6fx
6dx65x20" .
!      
"x6dx6fx72x65x20x73x74x75x66x66x20x6fx6ex
20x74x68" .
!      
"x69x73x20x6cx69x6ex65x0ax61x6ex64x20x66x
69x6ex61" .
!       "x6cx6cx79x2ex2ex2ex0a" ;

      my $blocksize = 10 ;

 
The enclosed patch should apply to a fresh 5.9.5. It updates
all the
compression modules to their latest versions. It should
include all the
EBCDIC changes needed. 

Can you test this please? If it works ok, I'll supply the
patch to the main
development source.

Paul

  
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )