On 10/11/22 07:13, Jin-oh Kang wrote:
On Tue, Oct 11, 2022, 2:56 AM Zebediah Figura zfigura@codeweavers.com wrote:
On 10/10/22 10:12, Jin-oh Kang wrote:
- is \Device\NamedPipe any different from a normal pipe?
Yes, it is. It's a device object.
Well, yes and no; there is a device object that exists in the object tree at \Device\NamedPipe (it has an object type of "Device"), but I mean the file object that you get when you open that exact path (which has an object type of "File"). Is that different from a normal pipe, and if so, how?
ntdll:pipe test_empty_name() says that calling FSCTL_PIPE_WAIT on it returns STATUS_ILLEGAL_FUNCTION. It doesn't say anything else about it. Do you mind if I add some tests that use it?
My concern is basically that we don't really prove that this pipe is different from a normal pipe. I.e. we don't try calling FSCTL_PIPE_WAIT on a normal pipe, and we don't do anything else with this pipe. (How does it react to FSCTL_PIPE_LISTEN? FSCTL_PIPE_PEEK? FSCTL_PIPE_GET_CONNECTION_ATTRIBUTE? Read or write?)
Of course more tests are always welcome; I'm just trying to describe the specific tests I think would be interesting to answer.
- is \Device\NamedPipe\ any different from a normal pipe?
Yes, it is. It's a directory of a filesystem, named NPFS. This is the only directory of NPFS. There does not exist a directory with any other pathname for NPFS.
What does this mean in practice, though? We don't have tests for trying to do anything with the \Device\NamedPipe\ file, other than calling FSCTL_PIPE_WAIT on it.
We do have tests that use it, though. ntdll:pipe test_empty_name() uses the \Device\NamedPipe\ file as RootDirectory for creating named pipes. Again, do you mind if I add some tests that exercise it?
Right, sorry, I mean tests other than how this interacts with the object tree. I think that's relatively clear by now.
(And we don't have tests for FSCTL_PIPE_WAIT on
"normal" pipes either.)
Also, as far as I can find, we don't have tests for using a RootDirectory other than \Device\NamedPipe or \Device\NamedPipe.
- is "\Device\NamedPipe\foo" a different object than
"\Device\NamedPipe\foo", and, if so, does it behave any differently?
Yes, it is. They are both normal named pipes, each with a unique, different name. Two pathnames you have mentioned are both valid. They are not aliases to each other.
Do we have tests for this anywhere?
It's on testbot: https://testbot.winehq.org/JobDetails.pl?Key=124840
Do you have any feedback on the test before it is submitted?
No, that's pretty much what I was looking for :-)