kernel32: Loosen trailing \ requirement on GetVolumeInformationAW.

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Thu Jul 8 08:16:59 CDT 2010


Hi,

>That's only moving the bug around.
Indeed. It just moves the todo_wine from one side to the other.

> We have tests for the current
>behavior, any further improvement must keep the existing tests working.

I dispute the correctness of the tests. Here's what I get
on a real (as opposed to virtual) w2k machine, starting the test from within D:\...\:

volume.c:337: Test failed: GetVolumeInformationA w/o '\' did not fail, last error 234
volume: 257 tests executed (0 marked as todo, 1 failure), 0 skipped.

the "not" is my addition to reveal the value of "ret":
        ok(!ret && GetLastError() == ERROR_INVALID_NAME,
	   "GetVolumeInformationA w/o '\\' did%s fail, last error %u\n", ret ? " not":"", GetLastError());

So from the 3 relevant tests about GetVolumeInformation, 2 return no error without the trailing slash.

My conclusion is that the current tests (that all pass on winetestbot) may
lead us to false conclusions. There's something else that controls whether
no trailing slash succeeds or not. ... Well, here's a little light:

C:\>d:
D:\foo>d:\bar\zot\kernel32_test.exe volume # from testbot job #3225
volume.c:328: Test failed: GetVolumeInformationA w/o '\' did not fail, last error 3735928559
volume: 285 tests executed (0 marked as todo, 1 failure), 0 skipped.

I.e. the test fails (GetVolumeInformation succeeds) when the "active" directory
on C: is \, regardless of my current directory being anywhere on another drive.
Whether my current directory is a root or not does not matter (unless I'm in C:\).

There may be more strangeness to the behaviour: I don't understand why the
test failed on the first run, as IIRC the cmd window shell supposedly opens
with CD on C: as "C:\Documents...\user\", i.e. not C:\

Regards,
 Jörg Höhle


More information about the wine-devel mailing list