From: John E. Malmberg [mailto:[EMAIL PROTECTED]
> With the upgrade, I am getting two failures in blead on OpenVMS Alpha.
>
> Built with Non threaded build, large files, and experimental symbolic
> link support on an ODS-5 volume.
>
> ODS-5 volume means that the traditional name mangling of extra dots in
> the filename on disk to be C<_> is not always being done, and my source
> tree is identical in filenames, including case to that on a UNIX platform.
>
> ext/Compress/Zlib/t/03zlib-v1......................FAILED at test 398
>
> not ok 398 - flush not ok
> # Failed test 'flush not ok'
> # at [-.ext.compress.zlib.t]03zlib-v1.t line 1184.
> not ok 399
> # Failed test at [-.ext.compress.zlib.t]03zlib-v1.t line 1185.
> # got: '0'
> # expected: '-2'
> not ok 400 - flush ok
> # Failed test 'flush ok'
> # at [-.ext.compress.zlib.t]03zlib-v1.t line 1186.
> ok 401 - Closed
> # Looks like you failed 3 tests of 401.
>
The first two tests failing are checking that when you give an invalid
parameter to gzflush it returns Z_STREAM_ERROR (which is -2). In your case
it is returning 0, which is success.
The third test failing is checking that a subsequent flush works, but in
your case it is failing.
> I am in the debugger, and the call to flush is looking up an error to a
> previous operation and getting "stream error".
That sounds correct if this is the line of code you are executing from the
test harness.
$status = $fil->gzflush(0xfff);
Can you confirm that at the end of this block of code (from
Compress-Raw-Zlib/Zlib.xs) that RETVAL is -2. If that is the case then the
problem is nothing to do with the zlib library itself.
for (;;) {
if (s->stream.avail_out == 0) {
/* consumed all the available output, so extend it */
Sv_Grow(output, SvLEN(output) + bufinc) ;
cur_length += increment ;
s->stream.next_out = (Bytef*) SvPVbyte_nolen(output) +
cur_length ;
increment = bufinc ;
s->stream.avail_out = increment;
bufinc *= 2 ;
}
RETVAL = deflate(&(s->stream), f);
/* deflate has finished flushing only when it hasn't used up
* all the available space in the output buffer:
*/
if (s->stream.avail_out != 0 || RETVAL != Z_OK )
break;
}
RETVAL = (RETVAL == Z_STREAM_END ? Z_OK : RETVAL) ;
Assuming you have a RETVAL of -2, the next thing that happens is the
creation of a dual-type scalar in this macro
#define setDUALstatus(var, err) \
sv_setnv(var, (double)err) ; \
sv_setpv(var, ((err) ? GetErrorString(err) : "")) ; \
SvNOK_on(var);
This is where the lookup is done that you said was giving "stream error",
which is would I would expect.
So after running setDUALstatus I would expect "var" to have an integer value
of -2 and a string value of "stream error". If that is the case it is
somehow getting changed before it get back to the test script.
> I am in both the Perl debugger and the VMS code debugger at this point,
> running the commands manually through the Perl debugger.
>
> Any hints on where I should be setting code breakpoints to look for what
> is causing this error? Or any hints at all?
>
> I will not be able to investigate further for at least 10 hours.
No worries.
> Be aware of an issue that the length of a file as reported by stat() on
> VMS may be larger than the actual amount of bytes that are readable in
> the file. This is due to the way that VMS stores the files on disk, and
> the only work around is to actually read the file and count the bytes.
>
> I do not know if that may be an error, but it has tripped up other
> programs ported from UNIX.
>
>
> ext/Compress/Zlib/t/14gzopen.....................FAILED at test 30
>
> I have not started looking at the 14gzopen issue yet.
It is the same issue, checking the return status from gzopen.
Paul