> On December 31, 2002 06:41 am, Patrik Stridvall wrote:
> > I think it is better than Alexandre runs
> > winapi_cleanup --include-quotes
> > himself if he thinks it does the correct things.
>
> Well, that's cool, but your original message gave the impression
> that this is still a work in progress not ready to be used.
It does (save bugs) what I want it to do.
However I not sure that it does is the correct thing.
> Which it seems is the wrong impression. Just let Alexandre know
> to run the above mentioned command after applying your patch,
> that will do.
>
> BTW, did you compile Wine after this patch?
Yes. It compiles fine.
> If it compiles,
> then I don't think there is any problem, no? In fact, if it
> compiles we are *guaranteed* that the result is correct
> because we don't have any duplicated header filename:
>
> [dimi@dimi wine.src]$ find -name "*.h" | sed 's%.*/%%' | sort
> -u | uniq -c | sort -rn | head -1
> 1 zmouse.h
We some more duplicates that that. However I have look at them
quickly manually and I don't think they matter.
I've started on some tests in shlwapi. I've added the following file to
the tests directory under shlwapi, but I can't include it in a cvs diff,
because I don't have write access to the repository.
Any hints as to diffing a new file cleanly w/o write access to CVS?
These tests compile and run clean with the last CVS tree I pulled (a few
days ago). I need to flesh them out, but it's a start.
Here is the diff for the Makefile.in:
cvs server: Diffing dlls/shlwapi/tests
Index: dlls/shlwapi/tests/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/tests/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- dlls/shlwapi/tests/Makefile.in 12 Nov 2002 01:13:10 -0000
1.2
+++ dlls/shlwapi/tests/Makefile.in 31 Dec 2002 20:51:24 -0000
@@ -8,7 +8,8 @@
CTESTS = \
clist.c \
generated.c \
- shreg.c
+ shreg.c \
+ url.c
@MAKE_TEST_RULES@
--- 8< ---
And the entire file for url.c in dlls/shlwapi/tests/url.c:
--- 8< ---
/* Unit test suite for Url* functions
*
* Copyright 2002 Matthew Mastracci
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include "wine/test.h"
#include "wine/unicode.h"
#include "winbase.h"
#include "shlwapi.h"
#include "wininet.h"
const char* TEST_URL_1 = "http://www.winehq.org/tests?date=10/10/1923";
const char* TEST_URL_2 =
"http://localhost:8080/tests%2e.html?date=Mon%2010/10/1923";
const char* TEST_URL_3 =
"http://foo:bar@localhost:21/internal.php?query=x&return=y";
static LPWSTR GetWideString(const char* szString)
{
LPWSTR wszString = (LPWSTR) HeapAlloc(GetProcessHeap(), 0,
(2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR));
MultiByteToWideChar(0, 0, szString, -1, wszString,
INTERNET_MAX_URL_LENGTH);
return wszString;
}
static void FreeWideString(LPWSTR wszString)
{
HeapFree(GetProcessHeap(), 0, wszString);
}
static void hash_url(const char* szUrl)
{
LPCSTR szTestUrl = szUrl;
LPWSTR wszTestUrl = GetWideString(szTestUrl);
DWORD cbSize = sizeof(DWORD);
DWORD dwHash1, dwHash2;
ok(UrlHashA(szTestUrl, (LPBYTE)&dwHash1, cbSize) == S_OK, "UrlHashA
didn't return S_OK");
ok(UrlHashW(wszTestUrl, (LPBYTE)&dwHash2, cbSize) == S_OK, "UrlHashW
didn't return S_OK");
FreeWideString(wszTestUrl);
ok(dwHash1 == dwHash2, "Hashes didn't compare");
}
static void test_UrlHash(void)
{
hash_url(TEST_URL_1);
hash_url(TEST_URL_2);
hash_url(TEST_URL_3);
}
static void test_url_part(const char* szUrl, DWORD dwPart, DWORD
dwFlags, char* szExpected)
{
CHAR szPart[INTERNET_MAX_URL_LENGTH];
WCHAR wszPart[INTERNET_MAX_URL_LENGTH];
LPWSTR wszUrl = GetWideString(szUrl);
LPWSTR wszConvertedPart;
DWORD dwSize;
dwSize = INTERNET_MAX_URL_LENGTH;
ok( UrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags) == S_OK,
"UrlGetPartA didn't return S_OK" );
dwSize = INTERNET_MAX_URL_LENGTH;
ok( UrlGetPartW(wszUrl, wszPart, &dwSize, dwPart, dwFlags) == S_OK,
"UrlGetPartW didn't return S_OK" );
wszConvertedPart = GetWideString(szPart);
ok(strcmpW(wszPart,wszConvertedPart)==0, "Strings didn't match between
ascii and unicode UrlGetPart!");
FreeWideString(wszUrl);
FreeWideString(wszConvertedPart);
ok(strcmp(szPart,szExpected)==0, "Expected %s, but got %s",
szExpected, szPart);
}
static void test_UrlGetPart(void)
{
test_url_part(TEST_URL_3, URL_PART_HOSTNAME, 0, "localhost");
test_url_part(TEST_URL_3, URL_PART_PORT, 0, "21");
test_url_part(TEST_URL_3, URL_PART_USERNAME, 0, "foo");
test_url_part(TEST_URL_3, URL_PART_PASSWORD, 0, "bar");
test_url_part(TEST_URL_3, URL_PART_SCHEME, 0, "http");
test_url_part(TEST_URL_3, URL_PART_QUERY, 0, "?query=x&return=y");
}
START_TEST(url)
{
test_UrlHash();
test_UrlGetPart();
}
--
Matthew Mastracci <matt(a)aclaro.com>
Looking at http://fgouget.free.fr/wine/tests-en.shtml,
I downloaded & ran the precompiled tests.
Are them updated to ensure results in sync with the current CVS ?
Is there a way to compile tests under Cygwin ? Looking into doc doesnt
say that.
What data should be reported when seeing "invalid test" in current
results on the web page (running XP here) ?
Best wishes.
=====
Sylvain Petreolle
spetreolle(a)users.sourceforge.net
Fight against Spam ! http://www.euro.cauce.org/en/index.html
ICQ #170597259
"Don't think you are. Know you are." Morpheus in Matrix, chapter 15.
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
I was exploring what was making win2k's cmd.exe crash,
and I had found a problem in GetFullPathName, so I wrote a test.
AndiM nicly ran it for me in win98se.
Andreas Mohr wrote:
>Hi,
>
>A:\>fptest
>C:\ returned 3 and C:\ in buf, and 00000000 is the s pointer.
>C:\\ returned 4 and C:\\ in buf, and 00000000 is the s pointer.
>C:\.. returned 3 and C:\ in buf, and 00000000 is the s pointer.
>C:\\.. returned 4 and C:\\ in buf, and 00000000 is the s pointer.
>C:\Program Files\.. returned 3 and C:\ in buf, and 00000000 is the s ptr.
>C:\\Program Files\.. returned 4 and C:\\ in buf, and 00000000 is the s ptr.
>C:\blargzool urned 14 and C:\blargazoool in buf, and 0073FCD3 is the s ptr.
>
>HTH,
>
>Andi
>
>
On the XP machine I have,
C:\\ returns C:\ and C:\\.. returns C:\
I did not modify any code yet, but instead bring it up here as possibly
something we need to have code that
behaves differently to mimic different windows versions
-Dante
I downloaded and ran the Wine Comformance tests from http://fgouget.free.fr/wine/winetests.zip
Dr. Watson (drwatson.exe) was enabled
advapi32_test.exe/registry
crash
DrWatson:
The application overflowed its temporary memory area.
Module Name: ADVAPI32_TEST.E
Application Name: Advapi32_test.exe
dsound_text.exe
I don't have msvcrtd.dll (where can I get it)
REQUEST: Is it possible to compile these tests using mingw32.
gdi32_test.exe/generated
2786 tests executed, 0 marked as todo, 0 failures
kernel32_test.exe/alloc
alloc.c:208: Test failed: GlobalReAlloc failed to convert FIXED to MOVEABLE: err
or=87
alloc.c:213: Test failed: Converting from FIXED to MOVEABLE didn't REALLY work
alloc.c:238: Test failed: Discarded memory we shouldn't have
alloc.c:239: Test failed: GlobalUnlock Failed.
alloc: 58 tests executed, 0 marked as todo, 4 failures.
kernel32_test.exe/atom
atom.c:55:WARNING: Unicode atom APIs are not supported on this platform
atom: 163850 tests executed, 0 marked as todo, 0 failures.
kernel32_test.exe/codepage
2 tests executed, 0 marked as todo, 0 failures
kernel32_test.exe/directory
25 tests executed, 0 todo, 0 failures
kernel32_test.exe/drive
80 tests executed,0 todo, 0 failures
kernel32_test.exe/environ
19 executed, 0 todo, 0 failures
kernel32_test.exe/file
file.c:631: Test failed: WriteFile error 183
file.c:632: Test failed: expected number of bytes written 0
file.c:633:Current offset = 0100
file.c:634: Test failed: expected file offset 21
file.c:639: Test failed: WriteFile error 87
file.c:640: Test failed: expected number of bytes written 0
file.c:642: Test failed: expected file offset 517
file.c:656: Test failed: ReadFile error 0
file.c:657: Test failed: expected number of bytes read 0
file.c:658:Current offset = 0000
file.c:659: Test failed: expected file offset 21
file.c:661: Test failed: pattern match failed
file: 487224 tests executed, 0 marked as todo, 10 failures.
kernel32_test.exe/format_msg
58 executed, 0 todo, 0 failures
kernel32_test.exe/generated
609 executed, 0 marked as todo, 0 failures
kernel32_test.exe/locale
locale.c:499: Test failed: GetDateFormat check DATE_YEARMONTH with null format e
xpected ERROR_INVALID_FLAGS got return of '10' and error of '0'
/locale: 105 tests executed, 0 marked as todo, 1 failure.
kernel32_test.exe/path
path.c:881:TMP=C:\WINDOWS\TEMP
path.c:892:TMP=C:\WINDOWS
path.c:902:TMP=C:\
path.c:912:TMP=C:
1702 executed, 0 todo, 0 failures
kernel32_test.exe/process
tests/process.c: 1 tests executed, 0 marked as todo, 0 failures.
tests/process.c: 1 tests executed, 0 marked as todo, 0 failures.
tests/process.c: 1 tests executed, 0 marked as todo, 0 failures.
tests/process.c: 1 tests executed, 0 marked as todo, 0 failures.
tests/process.c: 1 tests executed, 0 marked as todo, 0 failures.
tests/process.c: 1 tests executed, 0 marked as todo, 0 failures.
tests/process.c: 1 tests executed, 0 marked as todo, 0 failures.
tests/process.c: 1 tests executed, 0 marked as todo, 0 failures.
tests/process.c: 1 tests executed, 0 marked as todo, 0 failures.
tests/process.c: 1 tests executed, 0 marked as todo, 0 failures.
116 executed, 0 todo, 0 failures
kernel32_test.exe/thread
thread.c:430: Test failed: SetThreadPriorityBoost Failed
thread.c:432: Test failed: GetThreadPriorityBoost Failed
thread.c:434: Test failed: SetThreadPriorityBoost Failed
thread.c:436: Test failed: GetThreadPriorityBoost Failed
86 executed, 0 todo, 4 failures
msvcrt_test.exe/file
2 executed, 0 todo, 4 failures
msvcrt_test.exe/scanf
8 tests executed, 0 todo, 0 failures
netapi32_test.exe
access.c:174:It appears there is no netapi32 functionality on this platform
same error reported by all netapi32 tests.
ntdll_test.exe/error
813 executed, 0 todo, 0 failures
ntdll_test.exe/generated
1279 executed, 0 todo, 0 failures
ntdll_test.exe/rtlbitmap, ntdll_test.exe/rtlst
1 executed, 0 todo, 0 failures
[Please reply e-mail; I don't yet subscribe.]
I am interested in support for file-locking and locking of specified regions
of a file, in order to support databases such as MS-Access and Paradox.
But as I ponder the various likely-looking segments of the source-code, I
really do not know where to begin ... nor what has been done in this area
before.
It is clear that an implementation of locking must work on SMB-shares and that
it should "actually lock things" in that other Windows users should see the
locks as they are placed and removed. It's also clear that implementing
timeouts on these locks could be "problematic," since the Unix impl. of file
locking is not quite the same as Windows expects.
Pointers? Comments? War-stories? Advice? "Someone already did that"s?