From 871ab5123325e9427c4bd0eff77159390b9dbabd Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 18 May 2015 17:41:29 +0900 Subject: [PATCH] ntdll/tests: Use the correct flags for NtOpenFile. --- dlls/ntdll/tests/directory.c | 2 +- dlls/ntdll/tests/om.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c index f190ff452d5..ec8cd5ad51d 100644 --- a/dlls/ntdll/tests/directory.c +++ b/dlls/ntdll/tests/directory.c @@ -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) { diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 8939758b040..71380a73292 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -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); -- 2.11.4.GIT