Re: ntdll: Add a file access test.

2013-09-13 Thread Alexandre Julliard
Dmitry Timoshkov  writes:

> Nikolay Sivov  wrote:
>
>> >> It looks like it belongs to kernel32/tests.
>> > Since actual access checks are done by ntdll APIs I believe that 
>> > ntdll/tests
>> > is appropriate place, kernel32 file APIs are just wrappers around the 
>> > tested
>> > functionality.
>> >
>> It doesn't matter what it uses internally. You're testing kernel32 calls.
>
> What are you trying to prove? Half of the calls in that file are using
> kernel32 APIs, that doesn't mean that they need to be moved to kernel32
> or that they are doing something wrong.

Using kernel32 APIs in order to test the ntdll ones is fine. But a test
that only calls kernel32 has no reason to be in ntdll.

-- 
Alexandre Julliard
julli...@winehq.org




Re: ntdll: Add a file access test.

2013-09-13 Thread Dmitry Timoshkov
Nikolay Sivov  wrote:

> >> It looks like it belongs to kernel32/tests.
> > Since actual access checks are done by ntdll APIs I believe that ntdll/tests
> > is appropriate place, kernel32 file APIs are just wrappers around the tested
> > functionality.
> >
> It doesn't matter what it uses internally. You're testing kernel32 calls.

What are you trying to prove? Half of the calls in that file are using
kernel32 APIs, that doesn't mean that they need to be moved to kernel32
or that they are doing something wrong.

-- 
Dmitry.




Re: ntdll: Add a file access test.

2013-09-13 Thread Nikolay Sivov

On 9/13/2013 12:16, Dmitry Timoshkov wrote:

Nikolay Sivov  wrote:


It looks like it belongs to kernel32/tests.

Since actual access checks are done by ntdll APIs I believe that ntdll/tests
is appropriate place, kernel32 file APIs are just wrappers around the tested
functionality.


It doesn't matter what it uses internally. You're testing kernel32 calls.




Re: ntdll: Add a file access test.

2013-09-13 Thread Dmitry Timoshkov
Nikolay Sivov  wrote:

> It looks like it belongs to kernel32/tests.

Since actual access checks are done by ntdll APIs I believe that ntdll/tests
is appropriate place, kernel32 file APIs are just wrappers around the tested
functionality.

-- 
Dmitry.




Re: ntdll: Add a file access test.

2013-09-13 Thread Nikolay Sivov

On 9/13/2013 11:20, Dmitry Timoshkov wrote:

This test passes under Wine and shows that ReadFile after 
CreateFile(GENERIC_WRITE)
is really supposed to fail.
---
  dlls/ntdll/tests/file.c | 82 +
  1 file changed, 82 insertions(+)


It looks like it belongs to kernel32/tests.