Hi Jackek,

I went over your patch but I believe it might have few issues that i wanted to raise before we change anything
1. For some reason when you are doing the "ok" test after CreateNamedPipe you do against != NULL should != INVALID_HANDLE_VALUE
    this is critical... since the 2nd server might have failed with OBJECT_NAME_ALREADY_EXISTS
2. When you create the 2nd server instance against the "ok" check is against NULL but not only that, you check against "server" and not "server2"

The reason I'm raising these issues is because from my understanding of Windows, there can be only 1 instance for a given named pipe instance,
Please see that once you change these things, my logic remains correct... and that simply server2 was never created and got INVALID_HANDLE_VALUE
with a should be GLE of 231 aka ERROR_PIPE_BUSY.

Please let me know how it goes so we will know how to continue.

Thanks and I hope you have a great weekend,
-- Jon.

On Wed, Sep 27, 2017 at 6:33 PM, Jacek Caban <jacek@codeweavers.com> wrote:
Hi Jonathan,

Your tests still don't really show intended behaviour. Your calls that
set security descriptor use new SD that has the same tested values as
before the call, then what's the point in setting it? Anyway, I cleaned
it up and changed a bit to see how it's really supposed to work. See the
attachment.

It looks like client and served should indeed share security descriptor,
but pipe object should not, so that part is wrong.

Thanks,
Jacek