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?
>> * 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?
(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?
Do you have any feedback on the test before it is submitted?