[PATCH] kernel32/tests: Add test of CreateDirectory with long path.
dmitry at baikal.ru
Thu Nov 5 01:00:05 CST 2015
YongHao Hu <christopherwuy at gmail.com> wrote:
> >> On Windows, CreateDirectoryA fail when the path's size longer than
> >> MAX_PATH-12(248) while Wine's implementation succeed.
> >> :https://bugs.winehq.org/show_bug.cgi?id=39552
> > Is there an application that depends on this very strange implementation
> > detail?
> Nope. I didn't find an application that depends on this implementation
> But I found this detail because of the implementation of
> I think if it is impossible to create a directory whose size max than
> 248, the patch can be improved.
Is there any reason that you care about the size limit? In the most cases you
shouldn't unless there is an application that depends on particular behaviour.
> > Besides, the messages in the ok() calls sometimes are wrong.
> Could you explain a bit more detail?
Compare what the calls below are supposed to do and what ok() actually reports:
in case of a failure.
+ ret = CreateDirectoryA(tmpdir, NULL);
+ todo_wine ok(ret == FALSE,
+ "CreateDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError());
+ ret = RemoveDirectoryA(tmpdir);
+ todo_wine ok(ret == FALSE, "RemoveDirectoryA should always succeed\n");
> > Also,
> > you shouldn't test against TRUE/FALSE directly.
> Do you have any good idea?
ok(ret, ""); or if (!ret, ""); are commonly accepted solutions.
More information about the wine-devel