[Expat-discuss] Expat and Open Watcom
Michael Greene
greenemk at cox.com
Tue Jun 27 13:54:41 CEST 2006
Karl Waclawek wrote:
> Michael Greene wrote:
>> Karl Waclawek wrote:
>>> Michael Greene wrote:
> old removed
>>> Karl
>> Thanks for the all the responses, but it seems in that I was missing
>> the XML_DTD define. Now runtests.exe completes 100%. I still need to
>> track the errors with the XML_TEST_SUITE.
>>
>>
> Not all errors are errors (I mean mostly those that say "Output
> differs", but also others).
> Some are simply a result of xmlwf having a different definition of
> canonical XML
> than the current standard. There is an open bug (#569461) where the XML
> test suite is discussed.
> Also the code running the test suite isn't ideal - it doesn't process
> the XML file that describes
> the test cases, but processes them based on the directory structure,
> which is not 100% correct.
>
> Overall, Expat is close to 100% compliant.
>
> Karl
Karl,
The source of my "out of memory" errors when running XML_TEST_SUITE are
due to the test file size and using readfilemap.c. The test suite files
are size 0, so malloc( 0 ) returns NULL and I get a false "out of
memory" error. I assume that any build that uses readfilemap.c would
have this return. Would it be better to do this:
nbytes = sb.st_size;
+ if(nbytes == 0) {
+ close(fd);
+ return 1;
+ }
p = malloc(nbytes);
if (!p) {
+ close(fd);
return 0;
}
So that nbytes is checked for 0 size and return 1 ?
With this change and a couple other defines I am at:
Passed: 1773
Failed: 37
MikeG
More information about the Expat-discuss
mailing list