mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[NTDLL_APITEST]
- Add a test for NtCreateFile with invalid ObjectAttributes. Patch by Aleksandar Andrejevic. CORE-7167 svn path=/trunk/; revision=60408
This commit is contained in:
@@ -3,6 +3,7 @@ list(APPEND SOURCE
|
||||
LdrEnumResources.c
|
||||
NtAllocateVirtualMemory.c
|
||||
NtContinue.c
|
||||
NtCreateFile.c
|
||||
NtCreateThread.c
|
||||
NtFreeVirtualMemory.c
|
||||
NtMapViewOfSection.c
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* PROJECT: ReactOS api tests
|
||||
* LICENSE: See COPYING in the top level directory
|
||||
* PURPOSE: Test for NtCreateFile
|
||||
* PROGRAMMER: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
|
||||
*/
|
||||
|
||||
#define WIN32_NO_STATUS
|
||||
#include <wine/test.h>
|
||||
//#include <ndk/iotypes.h>
|
||||
#include <ndk/iofuncs.h>
|
||||
//#include <ndk/obtypes.h>
|
||||
//#include <ndk/obfuncs.h>
|
||||
|
||||
START_TEST(NtCreateFile)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
HANDLE FileHandle;
|
||||
IO_STATUS_BLOCK StatusBlock;
|
||||
|
||||
Status = NtCreateFile(&FileHandle,
|
||||
FILE_READ_DATA,
|
||||
(POBJECT_ATTRIBUTES)0xCCCCCCCC,
|
||||
&StatusBlock,
|
||||
NULL,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
FILE_SHARE_READ,
|
||||
FILE_OPEN_IF,
|
||||
FILE_NON_DIRECTORY_FILE,
|
||||
NULL,
|
||||
0);
|
||||
|
||||
ok_hex(Status, STATUS_ACCESS_VIOLATION);
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
extern void func_LdrEnumResources(void);
|
||||
extern void func_NtAllocateVirtualMemory(void);
|
||||
extern void func_NtContinue(void);
|
||||
extern void func_NtCreateFile(void);
|
||||
extern void func_NtCreateThread(void);
|
||||
extern void func_NtFreeVirtualMemory(void);
|
||||
extern void func_NtMapViewOfSection(void);
|
||||
@@ -31,6 +32,7 @@ const struct test winetest_testlist[] =
|
||||
{ "LdrEnumResources", func_LdrEnumResources },
|
||||
{ "NtAllocateVirtualMemory", func_NtAllocateVirtualMemory },
|
||||
{ "NtContinue", func_NtContinue },
|
||||
{ "NtCreateFile", func_NtCreateFile },
|
||||
{ "NtCreateThread", func_NtCreateThread },
|
||||
{ "NtFreeVirtualMemory", func_NtFreeVirtualMemory },
|
||||
{ "NtMapViewOfSection", func_NtMapViewOfSection },
|
||||
|
||||
Reference in New Issue
Block a user