Commit 871ab512 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll/tests: Use the correct flags for NtOpenFile.

parent b3913c4f
......@@ -180,7 +180,7 @@ static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char
data_size = mask ? offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[256] ) : sizeof(data);
/* Read the directory and note which files are found */
status = pNtOpenFile( &dirh, SYNCHRONIZE | FILE_LIST_DIRECTORY, attr, &io, FILE_OPEN,
status = pNtOpenFile( &dirh, SYNCHRONIZE | FILE_LIST_DIRECTORY, attr, &io, FILE_SHARE_READ,
FILE_SYNCHRONOUS_IO_NONALERT|FILE_OPEN_FOR_BACKUP_INTENT|FILE_DIRECTORY_FILE);
ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%x, error %d\n", testdirA, status, GetLastError());
if (status != STATUS_SUCCESS) {
......
......@@ -150,7 +150,7 @@ static void test_namespace_pipe(void)
pRtlInitUnicodeString(&str, buffer3);
InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN);
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, 0);
ok(status == STATUS_OBJECT_PATH_NOT_FOUND ||
status == STATUS_PIPE_NOT_AVAILABLE ||
status == STATUS_OBJECT_NAME_INVALID || /* vista */
......@@ -159,7 +159,7 @@ static void test_namespace_pipe(void)
pRtlInitUnicodeString(&str, buffer4);
InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL);
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN);
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, 0);
ok(status == STATUS_OBJECT_NAME_NOT_FOUND ||
status == STATUS_OBJECT_NAME_INVALID, /* vista */
"NtOpenFile should have failed with STATUS_OBJECT_NAME_NOT_FOUND got(%08x)\n", status);
......@@ -657,7 +657,9 @@ static void test_symboliclink(void)
pRtlFreeUnicodeString(&target);
pRtlCreateUnicodeStringFromAsciiz(&str, "test-link\\NUL");
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN);
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, 0);
todo_wine ok(status == STATUS_SUCCESS, "Failed to open NUL device(%08x)\n", status);
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_DIRECTORY_FILE);
todo_wine ok(status == STATUS_SUCCESS, "Failed to open NUL device(%08x)\n", status);
pRtlFreeUnicodeString(&str);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment