winspool.drv: Conformance-Tests

Detlef Riekenberg at
Thu Aug 18 12:14:06 CDT 2005

Felix Nawothnig wrote:

> > While rewriting the conformance-tests for winspool.drv, how should we
> > handle this bugs / features ?
> a) ... 
> b) ...
> c) ...
> Disclaimer: These are my personal guidelines, so treat them as such. :-)

Thanks for your hints. I will change some Tests to trace, when i check
for the undocumented results. 
In my case, SetLastError() is used, when the Function fails (documented)
and also, when the Function returned SUCCESS (undocumented).

> Just check this on NT then, but avoid using GetVersion() - I'd suggest 
> to do something like:

That was my Test:

    /* Test for BUG in win9x and wine: Level is not checked */
    if((result != FALSE) && 
         (strlen(buffer) == (exact-1)))
                ok(0, "BUG in win9x and wine: Invalid Level '0' is" \
                    " not checked (valid Level is '1')\n");
        is_buffer_untouched(buffer, exactbytes);

> > I marked that as todo("windows").
> > Is this ok?
> No. Until there are other third-party win32 implementations using the 
> WRT (Reactos?) we use just todo_wine, nothing else.

OK. I change that.

> > Another Example for GetPrinterDriverDirectory and Enum*:
> > On w2k, the the returned "number of bytes required" in the ANSI-Version
> > is the same as in the Unicode-Version.

> > For GetPrinterDriverDirectory, the rest from the unicode-version of the
> > result is visible in the second part of the buffer. 
> > (I Think, w2k fill the buffer with the unicode-version and convert
> > in-place to ANSI. Should we do the same ?)
> I'm not sure what you mean here...

Documented is: Return the required number of Bytes for the Buffer.

On W2K the default Driver-Directory is
"C:\WINNT\system32\spool\DRIVERS\W32X86" (38 Characters + Zero).

Optimal Buffersize is 78 Byte for "W" and 39 Byte for "A", but W2k
required a Buffer of 78 Byte for GetPrinterDriverDirectoryA. 

A Trace for the Buffer-Contents is:

.c:656:00236438: buffer "C:\WINNT\system32\spool\DRIVERS\W32X86"
.c:661:00236460: buffer+40 L"ool\DRIVERS\W32X86"

> If the function works as documented but fills the rest of the passed 
> buffer with undefined stuff (it NUL terminates the first part, right?) 
Yes, thats the behavior.
On win9X, the "W"-Version is not implemented and the "A"-Version wants a
Buffer with the optimal Size (18 Byte for "C:\WINDOWS\SYSTEM"+0).
(Wine has a BUG and returned a 19 here. I know how to fix this, but I
want to get the tests in the CVS first).

> we shouldn't test for it unless we find an app which depends on it.

I will change the relevant Tests to trace.

By By ...
      ... Detlef

More information about the wine-devel mailing list