qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Detlef Riekenberg <wine.dev@web.de>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Regression-Testing-Problems with qemu
Date: Sun, 11 Dec 2005 17:38:29 +0100	[thread overview]
Message-ID: <1134319110.15101.47.camel@p4.LAN> (raw)

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

Hi.

While doing some Regression-Testing for wine ("http://www.winehq.org"),
I run into some Problems with qemu and win95/win98 as guest.

When calling GetPrinterDriverDirectoryA with bad/incomplete Parameter,
GetLastError() returns "0" (ERROR_SUCCESS) on qemu with win95 or win98
as guest, while vmware/win98 or native/win98 returns
"87" (ERROR_INVALID_PARAMETER).

Example:
winspool.drv:info on http://test.winehq.org/data/200511161000/#Win98

host:
Ubuntu linux 5.04 (Kernel: 2.6.10)
qemu: 0.7.2 and cvs-snapshot 2005-11-20


guest:
win98se (german)
win95c  (german)

I stripped the failing Tests down to a short App.
(Source attached, binary available on request)

Different compilers where used:
i686-mingw32msvc-gcc (GCC) 3.3.3 (other linux system)
i586-mingw32msvc-gcc 3.4.2 (on my linux)

For the short Test-App, i used the Pelles C-Compiler:
pocc 3.00.10 (with wine on my linux)



Any Ideas how to fix this?

(More Problems with qemu exists, but for me, the bug above is important)



-- 
By By ...
      ... Detlef

[-- Attachment #2: bad_result.c --]
[-- Type: text/x-csrc, Size: 1225 bytes --]

/*
 * Display the bad results in qemu
 */

#include <stdio.h>
#include <windows.h>
#include <winspool.h>


int main(int argc, char ** argv)
{
    LPBYTE  buffer = NULL;
    DWORD   cbBuf = 0;
    DWORD   pcbNeeded = 0;
    DWORD   res;

    SetLastError(0x00dead00);
    res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, 0, &cbBuf);
    printf("first call returned 0x%x, size 0x%lx/%ld\n", res, cbBuf, cbBuf);

    if (!cbBuf) return 1;

    buffer = HeapAlloc(GetProcessHeap(), 0, cbBuf*2);
    if (buffer == NULL) {
        printf("No buffer (need %ld bytes)\n", cbBuf*2);
        return 1 ;
    }

    SetLastError(0x00dead00);
    res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, &pcbNeeded);

    printf("expected '0' with ERROR_INVALID_USER_BUFFER "
         "or '!=0' with ERROR_INVALID_PARAMETER "
         "got %d with lasterror == %ld\n", res, GetLastError());

    SetLastError(0x00dead00);
    res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, NULL);

    printf("expected '0' with RPC_X_NULL_REF_POINTER "
         "or '!=0' with ERROR_INVALID_PARAMETER "
         "got %d with lasterror == %ld\n", res, GetLastError());

    HeapFree(GetProcessHeap(), 0, buffer);
    return 0;
}


                 reply	other threads:[~2005-12-11 16:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1134319110.15101.47.camel@p4.LAN \
    --to=wine.dev@web.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).