ntdll/tests: Fix a test failure on restricted Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
59ed8c593c
commit
29e0178cf5
|
@ -516,9 +516,13 @@ static void test_name_limits(void)
|
||||||
}
|
}
|
||||||
str.Length = sizeof(registryW) + 256 * sizeof(WCHAR);
|
str.Length = sizeof(registryW) + 256 * sizeof(WCHAR);
|
||||||
status = pNtCreateKey( &ret, GENERIC_ALL, &attr, 0, NULL, 0, NULL );
|
status = pNtCreateKey( &ret, GENERIC_ALL, &attr, 0, NULL, 0, NULL );
|
||||||
ok( status == STATUS_SUCCESS, "%u: NtCreateKey failed %x\n", str.Length, status );
|
ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
|
||||||
pNtDeleteKey( ret );
|
"%u: NtCreateKey failed %x\n", str.Length, status );
|
||||||
pNtClose( ret );
|
if (!status)
|
||||||
|
{
|
||||||
|
pNtDeleteKey( ret );
|
||||||
|
pNtClose( ret );
|
||||||
|
}
|
||||||
str.Length++;
|
str.Length++;
|
||||||
status = pNtCreateKey( &ret, GENERIC_ALL, &attr, 0, NULL, 0, NULL );
|
status = pNtCreateKey( &ret, GENERIC_ALL, &attr, 0, NULL, 0, NULL );
|
||||||
ok( status == STATUS_OBJECT_NAME_INVALID ||
|
ok( status == STATUS_OBJECT_NAME_INVALID ||
|
||||||
|
|
Loading…
Reference in New Issue