[PATCH 0/1] MR7060: scrrun/tests: Add drive_get_path test
The test gets each drive A-Z. For each sucessfully retrieved drive, it calls drive_get_path. The call should returns the drive's letter plus a colon (:). For example, calling with drive C will return "C:" Wine-bug https://bugs.winehq.org/show_bug.cgi?id=57539 -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7060
From: Quinn Rafferty <ramleejo(a)yahoo.com> The test gets each drive A-Z. For each sucessfully retrieved drive, it calls drive_get_path. The call should returns the drive's letter plus a colon (:). For example, calling with drive C will return "C:" Wine-bug https://bugs.winehq.org/show_bug.cgi?id=57539 --- dlls/scrrun/tests/filesystem.c | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c index e53bd092ce9..9d18a1b8b65 100644 --- a/dlls/scrrun/tests/filesystem.c +++ b/dlls/scrrun/tests/filesystem.c @@ -2728,6 +2728,45 @@ static void test_DoOpenPipeStream(void) if (stream_write) ITextStream_Release(stream_write); } +static void test_DriveGetPath(void) +{ + HRESULT hr; + IDrive *drive; + BSTR path, drivespec; + + /*Cycle the drives and check each*/ + for(WCHAR path_maker[] = L"A:"; path_maker[0] <= 'Z'; path_maker[0]++) + { + drive = (void*)0xdeadbeef; + /*Get the drive*/ + drivespec = SysAllocString(path_maker); + hr = IFileSystem3_GetDrive(fs3, drivespec, &drive); + + if (SUCCEEDED(hr)) + { + hr = IDrive_get_Path(drive, NULL); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); + + /*Get the path*/ + path = NULL; + hr = IDrive_get_Path(drive, &path); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(path != NULL, "got %p\n", path); + + /*The path was successfuly returned if drivespec == path*/ + todo_wine + ok(!lstrcmpW(path, drivespec), "path is %s, expected %s\n", + wine_dbgstr_w(path), + wine_dbgstr_w(drivespec) + ); + + SysFreeString(path); + IDrive_Release(drive); + } + + SysFreeString(drivespec); + } +} START_TEST(filesystem) { @@ -2773,6 +2812,7 @@ START_TEST(filesystem) test_GetSpecialFolder(); test_MoveFile(); test_DoOpenPipeStream(); + test_DriveGetPath(); IFileSystem3_Release(fs3); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7060
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=150487 Your paranoid android. === debian11 (32 bit report) === scrrun: filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 === debian11 (32 bit ar:MA report) === scrrun: filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 === debian11 (32 bit de report) === scrrun: filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 === debian11 (32 bit fr report) === scrrun: filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 === debian11 (32 bit he:IL report) === scrrun: filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 === debian11 (32 bit hi:IN report) === scrrun: filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 === debian11 (32 bit ja:JP report) === scrrun: filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 === debian11 (32 bit zh:CN report) === scrrun: filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 === debian11b (32 bit WoW report) === scrrun: filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 00000000 === debian11b (64 bit WoW report) === scrrun: filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 0000000000000000 filesystem.c:2748: Test failed: Unexpected hr 0x80004001. filesystem.c:2753: Test failed: Unexpected hr 0x80004001. filesystem.c:2754: Test failed: got 0000000000000000
participants (3)
-
Marvin -
Quinn Rafferty -
Quinn Rafferty (@ramleejo)