[PATCH v3 1/5] kernelbase/tests: Check module instead of function existence.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> --- v2: Fix apply failure due to mail client text encoding. v3: Avoid possible buffer overrun. Add more tests. Thanks Nikolay. dlls/kernelbase/tests/path.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/dlls/kernelbase/tests/path.c b/dlls/kernelbase/tests/path.c index cdba51bf3f..ba271cbe6c 100644 --- a/dlls/kernelbase/tests/path.c +++ b/dlls/kernelbase/tests/path.c @@ -147,12 +147,6 @@ static void test_PathCchAddBackslash(void) unsigned int i; HRESULT hr; - if (!pPathCchAddBackslash) - { - win_skip("PathCchAddBackslash() is not available.\n"); - return; - } - pathW[0] = 0; hr = pPathCchAddBackslash(pathW, 0); ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); @@ -190,12 +184,6 @@ static void test_PathCchAddBackslashEx(void) HRESULT hr; WCHAR *ptrW; - if (!pPathCchAddBackslashEx) - { - win_skip("PathCchAddBackslashEx() is not available.\n"); - return; - } - pathW[0] = 0; hr = pPathCchAddBackslashEx(pathW, 0, NULL, NULL); ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); @@ -248,6 +236,11 @@ static void test_PathCchAddBackslashEx(void) START_TEST(path) { HMODULE hmod = LoadLibraryA("kernelbase.dll"); + if (!hmod) + { + win_skip("kernelbase.dll is not available.\n"); + return; + } pPathCchCombineEx = (void *)GetProcAddress(hmod, "PathCchCombineEx"); pPathCchAddBackslash = (void *)GetProcAddress(hmod, "PathCchAddBackslash"); -- 2.19.1
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=44589 Your paranoid android. === w7u (32 bit report) === kernelbase: 0a08:path: unhandled exception c0000005 at 00000000 === w7pro64 (32 bit report) === kernelbase: 0ad4:path: unhandled exception c0000005 at 00000000 === w7pro64 (64 bit report) === kernelbase: 0acc:path: unhandled exception c0000005 at 0000000000000000
participants (2)
-
Marvin -
Zhiyi Zhang