Vitaliy Margolen wine-patch@kievinfo.com writes:
I guess this one got lost. Resend it. Or is there anything wrong with it?
Well, you didn't change create_named_object, which looks suspicious. Also I'd really like to see some regression tests for the behavior of the various objects.
Monday, September 19, 2005, 7:47:08 AM, Alexandre Julliard wrote:
Vitaliy Margolen wine-patch@kievinfo.com writes:
I guess this one got lost. Resend it. Or is there anything wrong with it?
Well, you didn't change create_named_object, which looks suspicious. Also I'd really like to see some regression tests for the behavior of the various objects.
Ah, I see. I new I was missing something. As far as regression testing - most of the named objects created from kernel32 and they are case insensitive. I purposely left it case sensitive to keep it same way as it was before. I know of at least named pipes that fail with current code, if I start mixing case - which does work on windows.
This is a first step to making it right. The next step would be to pass obj_attr attributes to server so it can check for OBJ_CASE_INSENSITIVE.
I will run all tests to check if it broke anything. And also add the case_sensitive flag to create_named_object as well.
Vitaliy
Vitaliy Margolen wine-devel@kievinfo.com writes:
Ah, I see. I new I was missing something. As far as regression testing - most of the named objects created from kernel32 and they are case insensitive. I purposely left it case sensitive to keep it same way as it was before. I know of at least named pipes that fail with current code, if I start mixing case - which does work on windows.
That's why we need regression tests. If things currently fail you can add todo_wine, but we need to know what the exact behavior is supposed to be.
Vitaliy Margolen wrote:
Monday, September 19, 2005, 7:47:08 AM, Alexandre Julliard wrote:
Vitaliy Margolen wine-patch@kievinfo.com writes:
I guess this one got lost. Resend it. Or is there anything wrong with it?
Well, you didn't change create_named_object, which looks suspicious. Also I'd really like to see some regression tests for the behavior of the various objects.
Ah, I see. I new I was missing something. As far as regression testing - most of the named objects created from kernel32 and they are case insensitive. I purposely left it case sensitive to keep it same way as it was before. I know of at least named pipes that fail with current code, if I start mixing case - which does work on windows.
Something like this should test the behaviour (written in MSVC so will need some cleaning up before adding to a Wine test):
WCHAR buffer1[] = L"\BaseNamedObjects\Test"; WCHAR buffer2[] = L"\BaseNamedObjects\test"; WCHAR buffer3[] = L"\BaseNamedObjects\TEst"; HANDLE Event, Mutant, h; NTSTATUS status; OBJECT_ATTRIBUTES attr;
attr.Length = sizeof(attr); attr.RootDirectory = NULL; attr.ObjectName = HeapAlloc(GetProcessHeap(), 0, sizeof(UNICODE_STRING)); attr.Attributes = 0; attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; attr.ObjectName->Buffer = buffer2; attr.ObjectName->Length = wcslen(buffer2) * sizeof(WCHAR); attr.ObjectName->MaximumLength = (wcslen(buffer2) + 1) * sizeof(WCHAR); status = NtCreateMutant(&Mutant, GENERIC_ALL, &attr, FALSE); attr.ObjectName->Buffer = buffer1; attr.ObjectName->Length = wcslen(buffer1) * sizeof(WCHAR); attr.ObjectName->MaximumLength = (wcslen(buffer1) + 1) * sizeof(WCHAR); status = NtCreateEvent(&Event, GENERIC_ALL, &attr, FALSE, FALSE); attr.Attributes = OBJ_CASE_INSENSITIVE; attr.ObjectName->Buffer = buffer3; attr.ObjectName->Length = wcslen(buffer3) * sizeof(WCHAR); attr.ObjectName->MaximumLength = (wcslen(buffer3) + 1) * sizeof(WCHAR); status = NtOpenMutant(&h, GENERIC_ALL, &attr); ok(status == STATUS_OBJECT_TYPE_MISMATCH, "NtOpenMutant should have failed with STATUS_OBJECT_TYPE_MISMATCH because of case-insensitive search finding an event object\n"); return 0;