11#define MAX_INSTANCES 1
14#define PIPE_NAME L"\\KmtestNpfsFileInfoTestPipe"
26 WCHAR PartialName[50];
30 Status = ZwQueryInformationFile(ServerHandle,
37 ok_eq_longlong(FileAllInfo.BasicInformation.CreationTime.QuadPart, 0);
38 ok_eq_longlong(FileAllInfo.BasicInformation.LastAccessTime.QuadPart, 0);
39 ok_eq_longlong(FileAllInfo.BasicInformation.LastWriteTime.QuadPart, 0);
40 ok_eq_longlong(FileAllInfo.BasicInformation.ChangeTime.QuadPart, 0);
42 ok_eq_longlong(FileAllInfo.StandardInformation.AllocationSize.QuadPart, 8192);
43 ok_eq_longlong(FileAllInfo.StandardInformation.EndOfFile.QuadPart, 0);
44 ok_eq_ulong(FileAllInfo.StandardInformation.NumberOfLinks, 1);
45 ok_bool_true(FileAllInfo.StandardInformation.DeletePending,
"DeletePending");
46 ok_bool_false(FileAllInfo.StandardInformation.Directory,
"Directory");
47 ok(FileAllInfo.InternalInformation.IndexNumber.QuadPart != 0xFFFFFFFFFFFFFFFF,
"FileAllInfo.InternalInformation.IndexNumber = 0xFFFFFFFFFFFFFFFF, whereas it shouldn't\n");
48 ok(FileAllInfo.InternalInformation.IndexNumber.QuadPart != 0,
"FileAllInfo.InternalInformation.IndexNumber = 0, whereas it shouldn't\n");
51 ok_eq_longlong(FileAllInfo.PositionInformation.CurrentByteOffset.QuadPart, 0);
53 ok_eq_ulong(FileAllInfo.AlignmentInformation.AlignmentRequirement, 0);
60 Status = ZwQueryInformationFile(ServerHandle,
67 ok_eq_longlong(FileAllInfo.BasicInformation.CreationTime.QuadPart, 0);
68 ok_eq_longlong(FileAllInfo.BasicInformation.LastAccessTime.QuadPart, 0);
69 ok_eq_longlong(FileAllInfo.BasicInformation.LastWriteTime.QuadPart, 0);
70 ok_eq_longlong(FileAllInfo.BasicInformation.ChangeTime.QuadPart, 0);
72 ok_eq_longlong(FileAllInfo.StandardInformation.AllocationSize.QuadPart, 8192);
73 ok_eq_longlong(FileAllInfo.StandardInformation.EndOfFile.QuadPart, 0);
74 ok_eq_ulong(FileAllInfo.StandardInformation.NumberOfLinks, 1);
75 ok_bool_true(FileAllInfo.StandardInformation.DeletePending,
"DeletePending");
76 ok_bool_false(FileAllInfo.StandardInformation.Directory,
"Directory");
77 ok(FileAllInfo.InternalInformation.IndexNumber.QuadPart != 0xFFFFFFFFFFFFFFFF,
"FileAllInfo.InternalInformation.IndexNumber = 0xFFFFFFFFFFFFFFFF, whereas it shouldn't\n");
78 ok(FileAllInfo.InternalInformation.IndexNumber.QuadPart != 0,
"FileAllInfo.InternalInformation.IndexNumber = 0, whereas it shouldn't\n");
81 ok_eq_longlong(FileAllInfo.PositionInformation.CurrentByteOffset.QuadPart, 0);
83 ok_eq_ulong(FileAllInfo.AlignmentInformation.AlignmentRequirement, 0);
86 ok_eq_wchar(FileAllInfo.NameInformation.FileName[6], 0xFFFF);
90 Status = ZwQueryInformationFile(ServerHandle,
97 ok_eq_longlong(FileAllInfo.BasicInformation.CreationTime.QuadPart, 0);
98 ok_eq_longlong(FileAllInfo.BasicInformation.LastAccessTime.QuadPart, 0);
99 ok_eq_longlong(FileAllInfo.BasicInformation.LastWriteTime.QuadPart, 0);
100 ok_eq_longlong(FileAllInfo.BasicInformation.ChangeTime.QuadPart, 0);
102 ok_eq_longlong(FileAllInfo.StandardInformation.AllocationSize.QuadPart, 8192);
103 ok_eq_longlong(FileAllInfo.StandardInformation.EndOfFile.QuadPart, 0);
104 ok_eq_ulong(FileAllInfo.StandardInformation.NumberOfLinks, 1);
105 ok_bool_true(FileAllInfo.StandardInformation.DeletePending,
"DeletePending");
106 ok_bool_false(FileAllInfo.StandardInformation.Directory,
"Directory");
107 ok(FileAllInfo.InternalInformation.IndexNumber.QuadPart != 0xFFFFFFFFFFFFFFFF,
"FileAllInfo.InternalInformation.IndexNumber = 0xFFFFFFFFFFFFFFFF, whereas it shouldn't\n");
108 ok(FileAllInfo.InternalInformation.IndexNumber.QuadPart != 0,
"FileAllInfo.InternalInformation.IndexNumber = 0, whereas it shouldn't\n");
111 ok_eq_longlong(FileAllInfo.PositionInformation.CurrentByteOffset.QuadPart, 0);
113 ok_eq_ulong(FileAllInfo.AlignmentInformation.AlignmentRequirement, 0);
115 ok_eq_wchar(FileAllInfo.NameInformation.FileName[0], 0xFFFF);
static VOID TestFileInfo(IN HANDLE ServerHandle)
static KSTART_ROUTINE RunTest
#define ok_eq_hex(value, expected)
#define ok_eq_ulong(value, expected)
#define ok_eq_longlong(value, expected)
#define ok_bool_false(value, desc)
#define ok_bool_true(value, desc)
#define ok_eq_size(value, expected)
#define ok_eq_wchar(value, expected)
#define NT_SUCCESS(StatCode)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
#define RtlCompareMemory(s1, s2, l)
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
#define FILE_SYNCHRONOUS_IO_NONALERT
#define RtlFillMemory(Dest, Length, Fill)
struct _FILE_ALL_INFORMATION FILE_ALL_INFORMATION
PKTHREAD KmtStartThread(IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext OPTIONAL)
VOID KmtFinishThread(IN PKTHREAD Thread OPTIONAL, IN PKEVENT Event OPTIONAL)
#define DEVICE_NAMED_PIPE
NTSTATUS NpCreatePipe(OUT PHANDLE ServerHandle, IN PCWSTR PipePath, IN ULONG ReadMode, IN ULONG CompletionMode, IN ULONG NamedPipeType, IN ULONG NamedPipeConfiguration, IN ULONG MaximumInstances, IN ULONG InboundQuota, IN ULONG OutboundQuota)
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define FILE_GENERIC_READ
#define FILE_GENERIC_WRITE
#define UNREFERENCED_PARAMETER(P)
NTSTATUS NTAPI ObCloseHandle(IN HANDLE Handle, IN KPROCESSOR_MODE AccessMode)
#define STATUS_BUFFER_OVERFLOW
#define FIELD_OFFSET(t, f)