ntdll/tests: Fix some more failures on restricted Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b0140f8ee2
commit
3e33f6c2d9
|
@ -1099,24 +1099,28 @@ static void test_query_object(void)
|
||||||
|
|
||||||
pRtlCreateUnicodeStringFromAsciiz( &path, "\\REGISTRY\\Machine\\Software\\Classes" );
|
pRtlCreateUnicodeStringFromAsciiz( &path, "\\REGISTRY\\Machine\\Software\\Classes" );
|
||||||
status = pNtCreateKey( &handle, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
|
status = pNtCreateKey( &handle, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
|
||||||
ok( handle != 0, "NtCreateKey failed status %x\n", status );
|
ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
|
||||||
|
"NtCreateKey failed status %x\n", status );
|
||||||
pRtlFreeUnicodeString( &path );
|
pRtlFreeUnicodeString( &path );
|
||||||
len = 0;
|
if (status == STATUS_SUCCESS)
|
||||||
status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(buffer), &len );
|
{
|
||||||
ok( status == STATUS_SUCCESS , "NtQueryObject returned %x\n", status );
|
len = 0;
|
||||||
str = (UNICODE_STRING *)buffer;
|
status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(buffer), &len );
|
||||||
todo_wine
|
ok( status == STATUS_SUCCESS , "NtQueryObject returned %x\n", status );
|
||||||
ok( len > sizeof(UNICODE_STRING), "unexpected len %u\n", len );
|
str = (UNICODE_STRING *)buffer;
|
||||||
str = (UNICODE_STRING *)buffer;
|
todo_wine
|
||||||
expected_len = sizeof(UNICODE_STRING) + str->Length + sizeof(WCHAR);
|
ok( len > sizeof(UNICODE_STRING), "unexpected len %u\n", len );
|
||||||
todo_wine
|
str = (UNICODE_STRING *)buffer;
|
||||||
ok( len == expected_len || broken(len == expected_len - sizeof(WCHAR)), /* NT4 */
|
expected_len = sizeof(UNICODE_STRING) + str->Length + sizeof(WCHAR);
|
||||||
"unexpected len %u\n", len );
|
todo_wine
|
||||||
todo_wine
|
ok( len == expected_len || broken(len == expected_len - sizeof(WCHAR)), /* NT4 */
|
||||||
ok( len > sizeof(UNICODE_STRING) + sizeof("\\Classes") * sizeof(WCHAR),
|
"unexpected len %u\n", len );
|
||||||
"name too short %s\n", wine_dbgstr_w(str->Buffer) );
|
todo_wine
|
||||||
trace( "got %s len %u\n", wine_dbgstr_w(str->Buffer), len );
|
ok( len > sizeof(UNICODE_STRING) + sizeof("\\Classes") * sizeof(WCHAR),
|
||||||
pNtClose( handle );
|
"name too short %s\n", wine_dbgstr_w(str->Buffer) );
|
||||||
|
trace( "got %s len %u\n", wine_dbgstr_w(str->Buffer), len );
|
||||||
|
pNtClose( handle );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_type_mismatch(void)
|
static void test_type_mismatch(void)
|
||||||
|
|
Loading…
Reference in New Issue