ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2011
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
18 participants
498 discussions
Start a n
N
ew thread
[tfaber] 53281: [KMTESTS/IO] - Rename IoDriverObject test to IoDeviceObject
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Aug 17 12:04:15 2011 New Revision: 53281 URL:
http://svn.reactos.org/svn/reactos?rev=53281&view=rev
Log: [KMTESTS/IO] - Rename IoDriverObject test to IoDeviceObject Added: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDeviceObject_drv.c - copied, changed from r53280, branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDeviceObject_user.c - copied, changed from r53272, branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_user.c branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iodeviceobject_drv.rbuild - copied, changed from r53272, branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iodriverobject_drv.rbuild Removed: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_user.c branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iodriverobject_drv.rbuild Modified: branches/GSoC_2011/KMTestSuite/kmtests/CMakeLists.txt branches/GSoC_2011/KMTestSuite/kmtests/directory.rbuild branches/GSoC_2011/KMTestSuite/kmtests/kmtest.rbuild branches/GSoC_2011/KMTestSuite/kmtests/kmtest/testlist.c branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/CMakeLists.txt Modified: branches/GSoC_2011/KMTestSuite/kmtests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/C…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/CMakeLists.txt [iso-8859-1] Wed Aug 17 12:04:15 2011 @@ -68,7 +68,7 @@ kmtest/testlist.c example/Example_user.c - ntos_io/IoDriverObject_user.c + ntos_io/IoDeviceObject_user.c rtl/RtlAvlTree.c rtl/RtlMemory.c rtl/RtlSplayTree.c @@ -90,7 +90,7 @@ add_dependencies(kmtest_drivers kmtest_drv example_drv - iodriverobject_drv + iodeviceobject_drv iohelper_drv) add_custom_target(kmtest_all) Modified: branches/GSoC_2011/KMTestSuite/kmtests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/d…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/directory.rbuild [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/directory.rbuild [iso-8859-1] Wed Aug 17 12:04:15 2011 @@ -5,7 +5,7 @@ <xi:include href="example/example_drv.rbuild" /> </directory> <directory name="ntos_io"> - <xi:include href="ntos_io/iodriverobject_drv.rbuild" /> + <xi:include href="ntos_io/iodeviceobject_drv.rbuild" /> <xi:include href="ntos_io/iohelper_drv.rbuild" /> </directory> <xi:include href="kmtest.rbuild" /> Modified: branches/GSoC_2011/KMTestSuite/kmtests/kmtest.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/k…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/kmtest.rbuild [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/kmtest.rbuild [iso-8859-1] Wed Aug 17 12:04:15 2011 @@ -14,7 +14,7 @@ <file>Example_user.c</file> </directory> <directory name="ntos_io"> - <file>IoDriverObject_user.c</file> + <file>IoDeviceObject_user.c</file> </directory> <directory name="rtl"> <file>RtlAvlTree.c</file> Modified: branches/GSoC_2011/KMTestSuite/kmtests/kmtest/testlist.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/k…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/kmtest/testlist.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/kmtest/testlist.c [iso-8859-1] Wed Aug 17 12:04:15 2011 @@ -8,7 +8,7 @@ #include <kmt_test.h> KMT_TESTFUNC Test_Example; -KMT_TESTFUNC Test_IoDriverObject; +KMT_TESTFUNC Test_IoDeviceObject; KMT_TESTFUNC Test_RtlAvlTree; KMT_TESTFUNC Test_RtlMemory; KMT_TESTFUNC Test_RtlSplayTree; @@ -17,7 +17,7 @@ const KMT_TEST TestList[] = { { "Example", Test_Example }, - { "IoDriverObject", Test_IoDriverObject }, + { "IoDeviceObject", Test_IoDeviceObject }, { "RtlAvlTree", Test_RtlAvlTree }, { "RtlMemory", Test_RtlMemory }, { "RtlSplayTree", Test_RtlSplayTree }, Modified: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/CMakeLists.txt [iso-8859-1] Wed Aug 17 12:04:15 2011 @@ -2,20 +2,20 @@ ../include) # -# IoDriverObject +# IoDeviceObject # -list(APPEND IODRIVEROBJECT_DRV_SOURCE +list(APPEND IODEVICEOBJECT_DRV_SOURCE ../kmtest_drv/kmtest_standalone.c - IoDriverObject_drv.c) + IoDeviceObject_drv.c) -add_library(iodriverobject_drv SHARED ${IODRIVEROBJECT_DRV_SOURCE}) +add_library(iodeviceobject_drv SHARED ${IODEVICEOBJECT_DRV_SOURCE}) -set_module_type(iodriverobject_drv kernelmodedriver) -target_link_libraries(iodriverobject_drv kmtest_printf ${PSEH_LIB}) -add_importlibs(iodriverobject_drv ntoskrnl hal) -set_property(TARGET iodriverobject_drv PROPERTY COMPILE_DEFINITIONS KMT_STANDALONE_DRIVER) +set_module_type(iodeviceobject_drv kernelmodedriver) +target_link_libraries(iodeviceobject_drv kmtest_printf ${PSEH_LIB}) +add_importlibs(iodeviceobject_drv ntoskrnl hal) +set_property(TARGET iodeviceobject_drv PROPERTY COMPILE_DEFINITIONS KMT_STANDALONE_DRIVER) -add_cd_file(TARGET iodriverobject_drv DESTINATION reactos/bin FOR all) +add_cd_file(TARGET iodeviceobject_drv DESTINATION reactos/bin FOR all) # # IoHelper Copied: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDeviceObject_drv.c (from r53280, branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c) URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDeviceObject_drv.c [iso-8859-1] Wed Aug 17 12:04:15 2011 @@ -39,7 +39,7 @@ UNREFERENCED_PARAMETER(RegistryPath); UNREFERENCED_PARAMETER(Flags); - *DeviceName = L"IoDriverObject"; + *DeviceName = L"IoDeviceObject"; KmtRegisterIrpHandler(IRP_MJ_CREATE, NULL, TestIrpHandler); KmtRegisterIrpHandler(IRP_MJ_CLOSE, NULL, TestIrpHandler); Copied: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDeviceObject_user.c (from r53272, branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_user.c) URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_user.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDeviceObject_user.c [iso-8859-1] Wed Aug 17 12:04:15 2011 @@ -7,9 +7,9 @@ #include <kmt_test.h> -START_TEST(IoDriverObject) +START_TEST(IoDeviceObject) { - KmtLoadDriver(L"IoDriverObject", FALSE); + KmtLoadDriver(L"IoDeviceObject", FALSE); KmtOpenDriver(); KmtCloseDriver(); KmtUnloadDriver(); Removed: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c (removed) @@ -1,435 +1,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Driver Object Test Driver - * PROGRAMMER: Michael Martin <martinmnet(a)hotmail.com> - * Thomas Faber <thfabba(a)gmx.de> - */ - -#include <kmt_test.h> - -//#define NDEBUG -#include <debug.h> - -typedef enum -{ - DriverEntry, - DriverIrp, - DriverUnload -} DRIVER_STATUS; - -static KMT_IRP_HANDLER TestIrpHandler; -static VOID TestDriverObject(IN PDRIVER_OBJECT DriverObject, IN DRIVER_STATUS DriverStatus); - -static PDEVICE_OBJECT MainDeviceObject; -static PDEVICE_OBJECT AttachDeviceObject; -static PDRIVER_OBJECT ThisDriverObject; - -NTSTATUS -TestEntry( - IN PDRIVER_OBJECT DriverObject, - IN PCUNICODE_STRING RegistryPath, - OUT PCWSTR *DeviceName, - IN OUT INT *Flags) -{ - NTSTATUS Status = STATUS_SUCCESS; - - PAGED_CODE(); - - UNREFERENCED_PARAMETER(RegistryPath); - UNREFERENCED_PARAMETER(Flags); - - *DeviceName = L"IoDriverObject"; - - KmtRegisterIrpHandler(IRP_MJ_CREATE, NULL, TestIrpHandler); - KmtRegisterIrpHandler(IRP_MJ_CLOSE, NULL, TestIrpHandler); - - TestDriverObject(DriverObject, DriverEntry); - - return Status; -} - -VOID -TestUnload( - IN PDRIVER_OBJECT DriverObject) -{ - PAGED_CODE(); - - TestDriverObject(DriverObject, DriverUnload); -} - -static -NTSTATUS -TestIrpHandler( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PIO_STACK_LOCATION IoStackLocation) -{ - NTSTATUS Status = STATUS_SUCCESS; - - UNREFERENCED_PARAMETER(IoStackLocation); - - TestDriverObject(DeviceObject->DriverObject, DriverIrp); - - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return Status; -} - -static -VOID -TestDriverObject( - IN PDRIVER_OBJECT DriverObject, - IN DRIVER_STATUS DriverStatus) -{ - BOOLEAN CheckThisDispatchRoutine; - PVOID FirstMajorFunc; - int i; - - ok(DriverObject->Size == sizeof(DRIVER_OBJECT), "Size does not match, got %x",DriverObject->Size); - ok(DriverObject->Type == 4, "Type does not match 4. got %d",DriverObject->Type); - - if (DriverStatus == DriverEntry) - { - ok(DriverObject->DeviceObject == NULL, "Expected DeviceObject pointer to be 0, got %p", - DriverObject->DeviceObject); - ok (DriverObject->Flags == DRVO_LEGACY_DRIVER, - "Expected Flags to be DRVO_LEGACY_DRIVER, got %lu", - DriverObject->Flags); - } - else if (DriverStatus == DriverIrp) - { - ok(DriverObject->DeviceObject != NULL, "Expected DeviceObject pointer to non null"); - ok (DriverObject->Flags == (DRVO_LEGACY_DRIVER | DRVO_INITIALIZED), - "Expected Flags to be DRVO_LEGACY_DRIVER | DRVO_INITIALIZED, got %lu", - DriverObject->Flags); - } - else if (DriverStatus == DriverUnload) - { - ok(DriverObject->DeviceObject != NULL, "Expected DeviceObject pointer to non null"); - ok (DriverObject->Flags == (DRVO_LEGACY_DRIVER | DRVO_INITIALIZED | DRVO_UNLOAD_INVOKED), - "Expected Flags to be DRVO_LEGACY_DRIVER | DRVO_INITIALIZED | DRVO_UNLOAD_INVOKED, got %lu", - DriverObject->Flags); - } - else - ASSERT(FALSE); - - /* Select a routine that was not changed */ - FirstMajorFunc = DriverObject->MajorFunction[1]; - ok(FirstMajorFunc != 0, "Expected MajorFunction[1] to be non NULL"); - - if (!skip(FirstMajorFunc != NULL, "First major function not set!\n")) - { - for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++) - { - if (DriverStatus > 0) CheckThisDispatchRoutine = (i > 3) && (i != 14); - else CheckThisDispatchRoutine = TRUE; - - if (CheckThisDispatchRoutine) - { - ok(DriverObject->MajorFunction[i] == FirstMajorFunc, "Expected MajorFunction[%d] to match %p", - i, FirstMajorFunc); - } - } - } -} - -BOOLEAN ZwLoadTest(PDRIVER_OBJECT DriverObject, PUNICODE_STRING DriverRegistryPath, PWCHAR NewDriverRegPath) -{ - UNICODE_STRING RegPath; - NTSTATUS Status; - - /* Try to load ourself */ - Status = ZwLoadDriver(DriverRegistryPath); - ok (Status == STATUS_IMAGE_ALREADY_LOADED, "Expected NTSTATUS STATUS_IMAGE_ALREADY_LOADED, got 0x%lX", Status); - - if (Status != STATUS_IMAGE_ALREADY_LOADED) - { - DbgPrint("WARNING: Loading this a second time will cause BUGCHECK!\n"); - } - - /* Try to load with a Registry Path that doesnt exist */ - RtlInitUnicodeString(&RegPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\deadbeef"); - Status = ZwLoadDriver(&RegPath); - ok (Status == STATUS_OBJECT_NAME_NOT_FOUND, "Expected NTSTATUS STATUS_OBJECT_NAME_NOT_FOUND, got 0x%lX", Status); - - /* Load the driver */ - RtlInitUnicodeString(&RegPath, NewDriverRegPath); - Status = ZwLoadDriver(&RegPath); - ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX", Status); - - if (!NT_SUCCESS(Status)) - { - return FALSE; - } - - return TRUE; -} - -BOOLEAN ZwUnloadTest(PDRIVER_OBJECT DriverObject, PUNICODE_STRING DriverRegistryPath, PWCHAR NewDriverRegPath) -{ - UNICODE_STRING RegPath; - NTSTATUS Status; - - /* Try to unload ourself, which should fail as our Unload routine hasnt been set yet. */ - Status = ZwUnloadDriver(DriverRegistryPath); - ok (Status == STATUS_INVALID_DEVICE_REQUEST, "Expected NTSTATUS STATUS_INVALID_DEVICE_REQUEST, got 0x%lX", Status); - - /* Try to unload with a Registry Path that doesnt exist */ - RtlInitUnicodeString(&RegPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\deadbeef"); - Status = ZwUnloadDriver(&RegPath); - ok (Status == STATUS_OBJECT_NAME_NOT_FOUND, "Expected NTSTATUS STATUS_OBJECT_NAME_NOT_FOUND, got 0x%lX", Status); - - /* Unload the driver */ - RtlInitUnicodeString(&RegPath, NewDriverRegPath); - Status = ZwUnloadDriver(&RegPath); - ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX", Status); - - if (!NT_SUCCESS(Status)) - { - return FALSE; - } - - return TRUE; -} - -VOID LowerDeviceKernelAPITest(PDEVICE_OBJECT DeviceObject, BOOLEAN UnLoading) -{ - PDEVICE_OBJECT RetObject; - - RetObject = IoGetLowerDeviceObject(DeviceObject); - - if (UnLoading) - { - ok(RetObject == 0, - "Expected no Lower DeviceObject, got %p", RetObject); - } - else - { - ok(RetObject == AttachDeviceObject, - "Expected an Attached DeviceObject %p, got %p", AttachDeviceObject, RetObject); - } - - if (RetObject) - { - ObDereferenceObject(RetObject); - } - - RetObject = IoGetDeviceAttachmentBaseRef(DeviceObject); - ok(RetObject == DeviceObject, - "Expected an Attached DeviceObject %p, got %p", DeviceObject, RetObject); - - if (RetObject) - { - ObDereferenceObject(RetObject); - } - -} -VOID DeviceCreatedTest(PDEVICE_OBJECT DeviceObject, BOOLEAN ExclusiveAccess) -{ - PEXTENDED_DEVOBJ_EXTENSION extdev; - - /*Check the device object members */ - ok(DeviceObject->Type==3, "Expected Type = 3, got %x", DeviceObject->Type); - ok(DeviceObject->Size = 0xb8, "Expected Size = 0xba, got %x", DeviceObject->Size); - ok(DeviceObject->ReferenceCount == 0, "Expected ReferenceCount = 0, got %lu", - DeviceObject->ReferenceCount); - ok(DeviceObject->DriverObject == ThisDriverObject, - "Expected DriverObject member to match this DriverObject %p, got %p", - ThisDriverObject, DeviceObject->DriverObject); - ok(DeviceObject->NextDevice == NULL, "Expected NextDevice to be NULL, got %p", DeviceObject->NextDevice); - ok(DeviceObject->AttachedDevice == NULL, "Expected AttachDevice to be NULL, got %p", DeviceObject->AttachedDevice); - ok(DeviceObject->Characteristics == 0, "Expected Characteristics to be 0"); - if (ExclusiveAccess) - { - ok((DeviceObject->Flags == (DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING | DO_EXCLUSIVE)), - "Expected Flags DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING | DO_EXCLUSIVE, got %lu", DeviceObject->Flags); - } - else - { - ok((DeviceObject->Flags == (DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING)), - "Expected Flags DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING, got %lu", DeviceObject->Flags); - } - ok(DeviceObject->DeviceType == FILE_DEVICE_UNKNOWN, - "Expected DeviceType to match creation parameter FILE_DEVICE_UNKNWOWN, got %lu", - DeviceObject->DeviceType); - ok(DeviceObject->ActiveThreadCount == 0, "Expected ActiveThreadCount = 0, got %lu\n", DeviceObject->ActiveThreadCount); - - /*Check the extended extension */ - extdev = (PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension; - ok(extdev->ExtensionFlags == 0, "Expected Extended ExtensionFlags to be 0, got %lu", extdev->ExtensionFlags); - ok (extdev->Type == 13, "Expected Type of 13, got %d", extdev->Type); - ok (extdev->Size == 0, "Expected Size of 0, got %d", extdev->Size); - ok (extdev->DeviceObject == DeviceObject, "Expected DeviceOject to match newly created device %p, got %p", - DeviceObject, extdev->DeviceObject); - ok(extdev->AttachedTo == NULL, "Expected AttachTo to be NULL, got %p", extdev->AttachedTo); - ok(extdev->StartIoCount == 0, "Expected StartIoCount = 0, got %lu", extdev->StartIoCount); - ok(extdev->StartIoKey == 0, "Expected StartIoKey = 0, got %lu", extdev->StartIoKey); - ok(extdev->StartIoFlags == 0, "Expected StartIoFlags = 0, got %lu", extdev->StartIoFlags); -} - -VOID DeviceDeletionTest(PDEVICE_OBJECT DeviceObject, BOOLEAN Lower) -{ - PEXTENDED_DEVOBJ_EXTENSION extdev; - - /*Check the device object members */ - ok(DeviceObject->Type==3, "Expected Type = 3, got %d", DeviceObject->Type); - ok(DeviceObject->Size = 0xb8, "Expected Size = 0xba, got %d", DeviceObject->Size); - ok(DeviceObject->ReferenceCount == 0, "Expected ReferenceCount = 0, got %lu", - DeviceObject->ReferenceCount); - if (!Lower) - { - ok(DeviceObject->DriverObject == ThisDriverObject, - "Expected DriverObject member to match this DriverObject %p, got %p", - ThisDriverObject, DeviceObject->DriverObject); - } - ok(DeviceObject->NextDevice == NULL, "Expected NextDevice to be NULL, got %p", DeviceObject->NextDevice); - - if (Lower) - { - ok(DeviceObject->AttachedDevice == MainDeviceObject, - "Expected AttachDevice to be %p, got %p", MainDeviceObject, DeviceObject->AttachedDevice); - } - else - { - ok(DeviceObject->AttachedDevice == NULL, "Expected AttachDevice to be NULL, got %p", DeviceObject->AttachedDevice); - } - - ok(DeviceObject->Flags ==FILE_VIRTUAL_VOLUME, - "Expected Flags FILE_VIRTUAL_VOLUME, got %lu", DeviceObject->Flags); - ok(DeviceObject->DeviceType == FILE_DEVICE_UNKNOWN, - "Expected DeviceType to match creation parameter FILE_DEVICE_UNKNWOWN, got %lu", - DeviceObject->DeviceType); - ok(DeviceObject->ActiveThreadCount == 0, "Expected ActiveThreadCount = 0, got %lu\n", DeviceObject->ActiveThreadCount); - - /*Check the extended extension */ - extdev = (PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension; - ok(extdev->ExtensionFlags == DOE_UNLOAD_PENDING, - "Expected Extended ExtensionFlags to be DOE_UNLOAD_PENDING, got %lu", extdev->ExtensionFlags); - ok (extdev->Type == 13, "Expected Type of 13, got %d", extdev->Type); - ok (extdev->Size == 0, "Expected Size of 0, got %d", extdev->Size); - ok (extdev->DeviceObject == DeviceObject, "Expected DeviceOject to match newly created device %p, got %p", - DeviceObject, extdev->DeviceObject); - if (Lower) - { - /* Skip this for now */ - //ok(extdev->AttachedTo == MainDeviceObject, "Expected AttachTo to %p, got %p", MainDeviceObject, extdev->AttachedTo); - } - else - { - ok(extdev->AttachedTo == NULL, "Expected AttachTo to be NULL, got %p", extdev->AttachedTo); - } - ok(extdev->StartIoCount == 0, "Expected StartIoCount = 0, got %lu", extdev->StartIoCount); - ok(extdev->StartIoKey == 0, "Expected StartIoKey = 0, got %lu", extdev->StartIoKey); - ok(extdev->StartIoFlags == 0, "Expected StartIoFlags = 0, got %lu", extdev->StartIoFlags); -} - -VOID DeviceCreateDeleteTest(PDRIVER_OBJECT DriverObject) -{ - NTSTATUS Status; - UNICODE_STRING DeviceString; - UNICODE_STRING DosDeviceString; - PDEVICE_OBJECT DeviceObject; - - /* Create using wrong directory */ - RtlInitUnicodeString(&DeviceString, L"\\Device1\\Kmtest"); - Status = IoCreateDevice(DriverObject, - 0, - &DeviceString, - FILE_DEVICE_UNKNOWN, - 0, - FALSE, - &DeviceObject); - ok(Status == STATUS_OBJECT_PATH_NOT_FOUND, "Expected STATUS_OBJECT_PATH_NOT_FOUND, got 0x%lX", Status); - - /* Create using correct params with exlusice access */ - RtlInitUnicodeString(&DeviceString, L"\\Device\\Kmtest"); - Status = IoCreateDevice(DriverObject, - 0, - &DeviceString, - FILE_DEVICE_UNKNOWN, - 0, - TRUE, - &DeviceObject); - ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX", Status); - - DeviceCreatedTest(DeviceObject, TRUE); - - /* Delete the device */ - if (NT_SUCCESS(Status)) - { - IoDeleteDevice(DeviceObject); - ok(DriverObject->DeviceObject == 0, "Expected DriverObject->DeviceObject to be NULL, got %p", - DriverObject->DeviceObject); - } - - /* Create using correct params with exlusice access */ - Status = IoCreateDevice(DriverObject, - 0, - &DeviceString, - FILE_DEVICE_UNKNOWN, - 0, - FALSE, - &DeviceObject); - ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX", Status); - - DeviceCreatedTest(DeviceObject, FALSE); - - /* Delete the device */ - if (NT_SUCCESS(Status)) - { - IoDeleteDevice(DeviceObject); - ok(DriverObject->DeviceObject == 0, "Expected DriverObject->DeviceObject to be NULL, got %p", - DriverObject->DeviceObject); - } - - /* Recreate device */ - Status = IoCreateDevice(DriverObject, - 0, - &DeviceString, - FILE_DEVICE_UNKNOWN, - 0, - FALSE, - &DeviceObject); - ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX", Status); - - RtlInitUnicodeString(&DosDeviceString, L"\\DosDevices\\kmtest"); - Status = IoCreateSymbolicLink(&DosDeviceString, &DeviceString); - - if (!NT_SUCCESS(Status)) - { - /* Delete device object if not successful */ - IoDeleteDevice(DeviceObject); - return; - } - - MainDeviceObject = DeviceObject; - - return; -} - -BOOLEAN AttachDeviceTest(PDEVICE_OBJECT DeviceObject, PWCHAR NewDriverRegPath) -{ - NTSTATUS Status; - UNICODE_STRING LowerDeviceName; - - RtlInitUnicodeString(&LowerDeviceName, NewDriverRegPath); - Status = IoAttachDevice(DeviceObject, &LowerDeviceName, &AttachDeviceObject); - - /* TODO: Add more tests */ - - return TRUE; -} - -BOOLEAN DetachDeviceTest(PDEVICE_OBJECT AttachedDevice) -{ - - IoDetachDevice(AttachedDevice); - - /* TODO: Add more tests */ - - return TRUE; -} Removed: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_user.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_user.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_user.c (removed) @@ -1,16 +1,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Driver Object test user-mode part - * PROGRAMMER: Thomas Faber <thfabba(a)gmx.de> - */ - -#include <kmt_test.h> - -START_TEST(IoDriverObject) -{ - KmtLoadDriver(L"IoDriverObject", FALSE); - KmtOpenDriver(); - KmtCloseDriver(); - KmtUnloadDriver(); -} Copied: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iodeviceobject_drv.rbuild (from r53272, branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iodriverobject_drv.rbuild) URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iodriverobject_drv.rbuild [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iodeviceobject_drv.rbuild [iso-8859-1] Wed Aug 17 12:04:15 2011 @@ -1,11 +1,11 @@ -<module name="iodriverobject_drv" type="kernelmodedriver" installbase="bin" installname="iodriverobject_drv.sys"> +<module name="iodeviceobject_drv" type="kernelmodedriver" installbase="bin" installname="iodeviceobject_drv.sys"> <include base="kmtest_drv">include</include> <library>ntoskrnl</library> <library>hal</library> <library>pseh</library> <library>kmtest_printf</library> <define name="KMT_STANDALONE_DRIVER" /> - <file>IoDriverObject_drv.c</file> + <file>IoDeviceObject_drv.c</file> <directory name=".."> <directory name="kmtest_drv"> <file>kmtest_standalone.c</file> Removed: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iodriverobject_drv.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iodriverobject_drv.rbuild [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iodriverobject_drv.rbuild (removed) @@ -1,14 +1,0 @@ -<module name="iodriverobject_drv" type="kernelmodedriver" installbase="bin" installname="iodriverobject_drv.sys"> - <include base="kmtest_drv">include</include> - <library>ntoskrnl</library> - <library>hal</library> - <library>pseh</library> - <library>kmtest_printf</library> - <define name="KMT_STANDALONE_DRIVER" /> - <file>IoDriverObject_drv.c</file> - <directory name=".."> - <directory name="kmtest_drv"> - <file>kmtest_standalone.c</file> - </directory> - </directory> -</module>
13 years, 2 months
1
0
0
0
[tfaber] 53280: [KMTESTS] - ObType: take advantage of r53211 - IoDriverObject: add the remaining functions from the old drvobj and devobj tests - fix some rbuild files
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Aug 17 11:50:46 2011 New Revision: 53280 URL:
http://svn.reactos.org/svn/reactos?rev=53280&view=rev
Log: [KMTESTS] - ObType: take advantage of r53211 - IoDriverObject: add the remaining functions from the old drvobj and devobj tests - fix some rbuild files Added: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/iohelper_drv.rbuild - copied unchanged from r53279, branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoHelper_drv.rbuild Removed: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoHelper_drv.rbuild Modified: branches/GSoC_2011/KMTestSuite/kmtests/directory.rbuild branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c branches/GSoC_2011/KMTestSuite/kmtests/ntos_ob/ObType.c Modified: branches/GSoC_2011/KMTestSuite/kmtests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/d…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/directory.rbuild [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/directory.rbuild [iso-8859-1] Wed Aug 17 11:50:46 2011 @@ -6,6 +6,7 @@ </directory> <directory name="ntos_io"> <xi:include href="ntos_io/iodriverobject_drv.rbuild" /> + <xi:include href="ntos_io/iohelper_drv.rbuild" /> </directory> <xi:include href="kmtest.rbuild" /> <xi:include href="kmtest_drv.rbuild" /> Modified: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoDriverObject_drv.c [iso-8859-1] Wed Aug 17 11:50:46 2011 @@ -21,6 +21,10 @@ static KMT_IRP_HANDLER TestIrpHandler; static VOID TestDriverObject(IN PDRIVER_OBJECT DriverObject, IN DRIVER_STATUS DriverStatus); +static PDEVICE_OBJECT MainDeviceObject; +static PDEVICE_OBJECT AttachDeviceObject; +static PDRIVER_OBJECT ThisDriverObject; + NTSTATUS TestEntry( IN PDRIVER_OBJECT DriverObject, @@ -132,3 +136,300 @@ } } } + +BOOLEAN ZwLoadTest(PDRIVER_OBJECT DriverObject, PUNICODE_STRING DriverRegistryPath, PWCHAR NewDriverRegPath) +{ + UNICODE_STRING RegPath; + NTSTATUS Status; + + /* Try to load ourself */ + Status = ZwLoadDriver(DriverRegistryPath); + ok (Status == STATUS_IMAGE_ALREADY_LOADED, "Expected NTSTATUS STATUS_IMAGE_ALREADY_LOADED, got 0x%lX", Status); + + if (Status != STATUS_IMAGE_ALREADY_LOADED) + { + DbgPrint("WARNING: Loading this a second time will cause BUGCHECK!\n"); + } + + /* Try to load with a Registry Path that doesnt exist */ + RtlInitUnicodeString(&RegPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\deadbeef"); + Status = ZwLoadDriver(&RegPath); + ok (Status == STATUS_OBJECT_NAME_NOT_FOUND, "Expected NTSTATUS STATUS_OBJECT_NAME_NOT_FOUND, got 0x%lX", Status); + + /* Load the driver */ + RtlInitUnicodeString(&RegPath, NewDriverRegPath); + Status = ZwLoadDriver(&RegPath); + ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX", Status); + + if (!NT_SUCCESS(Status)) + { + return FALSE; + } + + return TRUE; +} + +BOOLEAN ZwUnloadTest(PDRIVER_OBJECT DriverObject, PUNICODE_STRING DriverRegistryPath, PWCHAR NewDriverRegPath) +{ + UNICODE_STRING RegPath; + NTSTATUS Status; + + /* Try to unload ourself, which should fail as our Unload routine hasnt been set yet. */ + Status = ZwUnloadDriver(DriverRegistryPath); + ok (Status == STATUS_INVALID_DEVICE_REQUEST, "Expected NTSTATUS STATUS_INVALID_DEVICE_REQUEST, got 0x%lX", Status); + + /* Try to unload with a Registry Path that doesnt exist */ + RtlInitUnicodeString(&RegPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\deadbeef"); + Status = ZwUnloadDriver(&RegPath); + ok (Status == STATUS_OBJECT_NAME_NOT_FOUND, "Expected NTSTATUS STATUS_OBJECT_NAME_NOT_FOUND, got 0x%lX", Status); + + /* Unload the driver */ + RtlInitUnicodeString(&RegPath, NewDriverRegPath); + Status = ZwUnloadDriver(&RegPath); + ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX", Status); + + if (!NT_SUCCESS(Status)) + { + return FALSE; + } + + return TRUE; +} + +VOID LowerDeviceKernelAPITest(PDEVICE_OBJECT DeviceObject, BOOLEAN UnLoading) +{ + PDEVICE_OBJECT RetObject; + + RetObject = IoGetLowerDeviceObject(DeviceObject); + + if (UnLoading) + { + ok(RetObject == 0, + "Expected no Lower DeviceObject, got %p", RetObject); + } + else + { + ok(RetObject == AttachDeviceObject, + "Expected an Attached DeviceObject %p, got %p", AttachDeviceObject, RetObject); + } + + if (RetObject) + { + ObDereferenceObject(RetObject); + } + + RetObject = IoGetDeviceAttachmentBaseRef(DeviceObject); + ok(RetObject == DeviceObject, + "Expected an Attached DeviceObject %p, got %p", DeviceObject, RetObject); + + if (RetObject) + { + ObDereferenceObject(RetObject); + } + +} +VOID DeviceCreatedTest(PDEVICE_OBJECT DeviceObject, BOOLEAN ExclusiveAccess) +{ + PEXTENDED_DEVOBJ_EXTENSION extdev; + + /*Check the device object members */ + ok(DeviceObject->Type==3, "Expected Type = 3, got %x", DeviceObject->Type); + ok(DeviceObject->Size = 0xb8, "Expected Size = 0xba, got %x", DeviceObject->Size); + ok(DeviceObject->ReferenceCount == 0, "Expected ReferenceCount = 0, got %lu", + DeviceObject->ReferenceCount); + ok(DeviceObject->DriverObject == ThisDriverObject, + "Expected DriverObject member to match this DriverObject %p, got %p", + ThisDriverObject, DeviceObject->DriverObject); + ok(DeviceObject->NextDevice == NULL, "Expected NextDevice to be NULL, got %p", DeviceObject->NextDevice); + ok(DeviceObject->AttachedDevice == NULL, "Expected AttachDevice to be NULL, got %p", DeviceObject->AttachedDevice); + ok(DeviceObject->Characteristics == 0, "Expected Characteristics to be 0"); + if (ExclusiveAccess) + { + ok((DeviceObject->Flags == (DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING | DO_EXCLUSIVE)), + "Expected Flags DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING | DO_EXCLUSIVE, got %lu", DeviceObject->Flags); + } + else + { + ok((DeviceObject->Flags == (DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING)), + "Expected Flags DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING, got %lu", DeviceObject->Flags); + } + ok(DeviceObject->DeviceType == FILE_DEVICE_UNKNOWN, + "Expected DeviceType to match creation parameter FILE_DEVICE_UNKNWOWN, got %lu", + DeviceObject->DeviceType); + ok(DeviceObject->ActiveThreadCount == 0, "Expected ActiveThreadCount = 0, got %lu\n", DeviceObject->ActiveThreadCount); + + /*Check the extended extension */ + extdev = (PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension; + ok(extdev->ExtensionFlags == 0, "Expected Extended ExtensionFlags to be 0, got %lu", extdev->ExtensionFlags); + ok (extdev->Type == 13, "Expected Type of 13, got %d", extdev->Type); + ok (extdev->Size == 0, "Expected Size of 0, got %d", extdev->Size); + ok (extdev->DeviceObject == DeviceObject, "Expected DeviceOject to match newly created device %p, got %p", + DeviceObject, extdev->DeviceObject); + ok(extdev->AttachedTo == NULL, "Expected AttachTo to be NULL, got %p", extdev->AttachedTo); + ok(extdev->StartIoCount == 0, "Expected StartIoCount = 0, got %lu", extdev->StartIoCount); + ok(extdev->StartIoKey == 0, "Expected StartIoKey = 0, got %lu", extdev->StartIoKey); + ok(extdev->StartIoFlags == 0, "Expected StartIoFlags = 0, got %lu", extdev->StartIoFlags); +} + +VOID DeviceDeletionTest(PDEVICE_OBJECT DeviceObject, BOOLEAN Lower) +{ + PEXTENDED_DEVOBJ_EXTENSION extdev; + + /*Check the device object members */ + ok(DeviceObject->Type==3, "Expected Type = 3, got %d", DeviceObject->Type); + ok(DeviceObject->Size = 0xb8, "Expected Size = 0xba, got %d", DeviceObject->Size); + ok(DeviceObject->ReferenceCount == 0, "Expected ReferenceCount = 0, got %lu", + DeviceObject->ReferenceCount); + if (!Lower) + { + ok(DeviceObject->DriverObject == ThisDriverObject, + "Expected DriverObject member to match this DriverObject %p, got %p", + ThisDriverObject, DeviceObject->DriverObject); + } + ok(DeviceObject->NextDevice == NULL, "Expected NextDevice to be NULL, got %p", DeviceObject->NextDevice); + + if (Lower) + { + ok(DeviceObject->AttachedDevice == MainDeviceObject, + "Expected AttachDevice to be %p, got %p", MainDeviceObject, DeviceObject->AttachedDevice); + } + else + { + ok(DeviceObject->AttachedDevice == NULL, "Expected AttachDevice to be NULL, got %p", DeviceObject->AttachedDevice); + } + + ok(DeviceObject->Flags ==FILE_VIRTUAL_VOLUME, + "Expected Flags FILE_VIRTUAL_VOLUME, got %lu", DeviceObject->Flags); + ok(DeviceObject->DeviceType == FILE_DEVICE_UNKNOWN, + "Expected DeviceType to match creation parameter FILE_DEVICE_UNKNWOWN, got %lu", + DeviceObject->DeviceType); + ok(DeviceObject->ActiveThreadCount == 0, "Expected ActiveThreadCount = 0, got %lu\n", DeviceObject->ActiveThreadCount); + + /*Check the extended extension */ + extdev = (PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension; + ok(extdev->ExtensionFlags == DOE_UNLOAD_PENDING, + "Expected Extended ExtensionFlags to be DOE_UNLOAD_PENDING, got %lu", extdev->ExtensionFlags); + ok (extdev->Type == 13, "Expected Type of 13, got %d", extdev->Type); + ok (extdev->Size == 0, "Expected Size of 0, got %d", extdev->Size); + ok (extdev->DeviceObject == DeviceObject, "Expected DeviceOject to match newly created device %p, got %p", + DeviceObject, extdev->DeviceObject); + if (Lower) + { + /* Skip this for now */ + //ok(extdev->AttachedTo == MainDeviceObject, "Expected AttachTo to %p, got %p", MainDeviceObject, extdev->AttachedTo); + } + else + { + ok(extdev->AttachedTo == NULL, "Expected AttachTo to be NULL, got %p", extdev->AttachedTo); + } + ok(extdev->StartIoCount == 0, "Expected StartIoCount = 0, got %lu", extdev->StartIoCount); + ok(extdev->StartIoKey == 0, "Expected StartIoKey = 0, got %lu", extdev->StartIoKey); + ok(extdev->StartIoFlags == 0, "Expected StartIoFlags = 0, got %lu", extdev->StartIoFlags); +} + +VOID DeviceCreateDeleteTest(PDRIVER_OBJECT DriverObject) +{ + NTSTATUS Status; + UNICODE_STRING DeviceString; + UNICODE_STRING DosDeviceString; + PDEVICE_OBJECT DeviceObject; + + /* Create using wrong directory */ + RtlInitUnicodeString(&DeviceString, L"\\Device1\\Kmtest"); + Status = IoCreateDevice(DriverObject, + 0, + &DeviceString, + FILE_DEVICE_UNKNOWN, + 0, + FALSE, + &DeviceObject); + ok(Status == STATUS_OBJECT_PATH_NOT_FOUND, "Expected STATUS_OBJECT_PATH_NOT_FOUND, got 0x%lX", Status); + + /* Create using correct params with exlusice access */ + RtlInitUnicodeString(&DeviceString, L"\\Device\\Kmtest"); + Status = IoCreateDevice(DriverObject, + 0, + &DeviceString, + FILE_DEVICE_UNKNOWN, + 0, + TRUE, + &DeviceObject); + ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX", Status); + + DeviceCreatedTest(DeviceObject, TRUE); + + /* Delete the device */ + if (NT_SUCCESS(Status)) + { + IoDeleteDevice(DeviceObject); + ok(DriverObject->DeviceObject == 0, "Expected DriverObject->DeviceObject to be NULL, got %p", + DriverObject->DeviceObject); + } + + /* Create using correct params with exlusice access */ + Status = IoCreateDevice(DriverObject, + 0, + &DeviceString, + FILE_DEVICE_UNKNOWN, + 0, + FALSE, + &DeviceObject); + ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX", Status); + + DeviceCreatedTest(DeviceObject, FALSE); + + /* Delete the device */ + if (NT_SUCCESS(Status)) + { + IoDeleteDevice(DeviceObject); + ok(DriverObject->DeviceObject == 0, "Expected DriverObject->DeviceObject to be NULL, got %p", + DriverObject->DeviceObject); + } + + /* Recreate device */ + Status = IoCreateDevice(DriverObject, + 0, + &DeviceString, + FILE_DEVICE_UNKNOWN, + 0, + FALSE, + &DeviceObject); + ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX", Status); + + RtlInitUnicodeString(&DosDeviceString, L"\\DosDevices\\kmtest"); + Status = IoCreateSymbolicLink(&DosDeviceString, &DeviceString); + + if (!NT_SUCCESS(Status)) + { + /* Delete device object if not successful */ + IoDeleteDevice(DeviceObject); + return; + } + + MainDeviceObject = DeviceObject; + + return; +} + +BOOLEAN AttachDeviceTest(PDEVICE_OBJECT DeviceObject, PWCHAR NewDriverRegPath) +{ + NTSTATUS Status; + UNICODE_STRING LowerDeviceName; + + RtlInitUnicodeString(&LowerDeviceName, NewDriverRegPath); + Status = IoAttachDevice(DeviceObject, &LowerDeviceName, &AttachDeviceObject); + + /* TODO: Add more tests */ + + return TRUE; +} + +BOOLEAN DetachDeviceTest(PDEVICE_OBJECT AttachedDevice) +{ + + IoDetachDevice(AttachedDevice); + + /* TODO: Add more tests */ + + return TRUE; +} Removed: branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoHelper_drv.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoHelper_drv.rbuild [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_io/IoHelper_drv.rbuild (removed) @@ -1,14 +1,0 @@ -<module name="iohelper_drv" type="kernelmodedriver" installbase="bin" installname="iohelper_drv.sys"> - <include base="kmtest_drv">include</include> - <library>ntoskrnl</library> - <library>hal</library> - <library>pseh</library> - <library>kmtest_printf</library> - <define name="KMT_STANDALONE_DRIVER" /> - <file>IoHelper_drv.c</file> - <directory name=".."> - <directory name="kmtest_drv"> - <file>kmtest_standalone.c</file> - </directory> - </directory> -</module> Modified: branches/GSoC_2011/KMTestSuite/kmtests/ntos_ob/ObType.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/kmtests/n…
============================================================================== --- branches/GSoC_2011/KMTestSuite/kmtests/ntos_ob/ObType.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/kmtests/ntos_ob/ObType.c [iso-8859-1] Wed Aug 17 11:50:46 2011 @@ -133,9 +133,8 @@ return STATUS_OBJECT_NAME_NOT_FOUND;//STATUS_SUCCESS; } -/* TODO: this does not actually return an NTSTATUS! */ -static -NTSTATUS +static +BOOLEAN NTAPI OkayToCloseProc( IN PEPROCESS Process OPTIONAL,
13 years, 2 months
1
0
0
0
[fireball] 53279: [GDI32] - Get rid of dangerous LoadLibraryA("freetype.dll") invocation happening inside DLL_PROCESS_ATTACH and link statically instead. This commit breaks the arwinss branch build...
by fireball@svn.reactos.org
Author: fireball Date: Wed Aug 17 11:11:54 2011 New Revision: 53279 URL:
http://svn.reactos.org/svn/reactos?rev=53279&view=rev
Log: [GDI32] - Get rid of dangerous LoadLibraryA("freetype.dll") invocation happening inside DLL_PROCESS_ATTACH and link statically instead. This commit breaks the arwinss branch buildability on itself (not that much of a loss considering how old stuff is in the branch) and is a first commit towards ability to build arwinss in trunk. Modified: branches/arwinss/reactos/dll/win32/gdi32/freetype.c branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild Modified: branches/arwinss/reactos/dll/win32/gdi32/freetype.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
============================================================================== --- branches/arwinss/reactos/dll/win32/gdi32/freetype.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/gdi32/freetype.c [iso-8859-1] Wed Aug 17 11:11:54 2011 @@ -2714,6 +2714,7 @@ static BOOL init_freetype(void) { +#ifdef DYNAMIC_FREETYPE ft_handle = LoadLibraryA("freetype.dll"); if(!ft_handle) { WINE_MESSAGE( @@ -2723,6 +2724,13 @@ "
http://www.freetype.org\n
"); return FALSE; } +#else + /* Request version so it is actually linked in */ + FT_Version.major = FT_Version.minor = FT_Version.patch = -1; + FT_Library_Version(library,&FT_Version.major,&FT_Version.minor,&FT_Version.patch); + + ft_handle = GetModuleHandleA("freetype.dll"); +#endif #define LOAD_FUNCPTR(f) if((p##f = (PVOID)GetProcAddress(ft_handle, #f)) == NULL){WARN("Can't find symbol %s\n", #f); goto sym_not_found;} @@ -2799,7 +2807,9 @@ "font library. To enable Wine to use TrueType fonts please upgrade\n" "FreeType to at least version 2.0.5.\n" "
http://www.freetype.org\n
"); +#ifdef DYNAMIC_FREETYPE FreeLibrary(ft_handle); +#endif ft_handle = NULL; return FALSE; } Modified: branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
============================================================================== --- branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild [iso-8859-1] Wed Aug 17 11:11:54 2011 @@ -2,7 +2,7 @@ <importlibrary definition="gdi32.spec" /> <include base="gdi32">include</include> <include base="ReactOS">include/reactos/wine</include> - <include base="ReactOS">dll/3rdparty/freetype/include</include> + <include base="ReactOS">lib/3rdparty/freetype/include</include> <define name="_DISABLE_TIDENTS" /> <redefine name="WINVER">0x0600</redefine> <redefine name="_WIN32_WINNT">0x0501</redefine> @@ -13,6 +13,7 @@ <library>ntdll</library> <library>usp10</library> <library>user32</library> + <library>freetype</library> <library>win32ksys</library> <library>pseh</library> <library>dxguid</library>
13 years, 2 months
1
0
0
0
[tkreuzer] 53278: [GDI FONT DRIVER] - Implement initial "ClearType" support. Currently only bitmap characters are correctly copied and they can have a color distortion. But its at least readable.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Aug 17 08:48:51 2011 New Revision: 53278 URL:
http://svn.reactos.org/svn/reactos?rev=53278&view=rev
Log: [GDI FONT DRIVER] - Implement initial "ClearType" support. Currently only bitmap characters are correctly copied and they can have a color distortion. But its at least readable. Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/copybits.c branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/copybits.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/drivers…
============================================================================== --- branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/copybits.c [iso-8859-1] (original) +++ branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/copybits.c [iso-8859-1] Wed Aug 17 08:48:51 2011 @@ -99,6 +99,68 @@ } } +#define CT_OPAQUE 0x2a + +static +VOID +FtfdCopyBits_S1D8( + GLYPHBITS *pgb, + FT_Bitmap *ftbitmap) +{ + ULONG ulRows, ulSrcDelta; + PBYTE pjDstLine, pjSrcLine; + + pjDstLine = pgb->aj; + + pjSrcLine = ftbitmap->buffer; + ulSrcDelta = abs(ftbitmap->pitch); + + ulRows = pgb->sizlBitmap.cy; + while (ulRows--) + { + ULONG ulWidth = pgb->sizlBitmap.cx; + BYTE j, *pjSrc; + pjSrc = pjSrcLine; + + /* Get 8 pixels */ + j = (*pjSrc++); + + while (ulWidth >= 8) + { + /* Set 8 pixels */ + *pjDstLine++ = (j & 128) ? CT_OPAQUE : 0; + *pjDstLine++ = (j & 64) ? CT_OPAQUE : 0; + *pjDstLine++ = (j & 32) ? CT_OPAQUE : 0; + *pjDstLine++ = (j & 16) ? CT_OPAQUE : 0; + *pjDstLine++ = (j & 8) ? CT_OPAQUE : 0; + *pjDstLine++ = (j & 4) ? CT_OPAQUE : 0; + *pjDstLine++ = (j & 2) ? CT_OPAQUE : 0; + *pjDstLine++ = (j & 1) ? CT_OPAQUE : 0; + + /* Next 8 pixels */ + j = (*pjSrc++); + ulWidth -= 8; + } + + /* Set remaining pixels (max 7) */ + switch (ulWidth) + { + case 7: pjDstLine[6] = (j & 2) ? CT_OPAQUE : 0; + case 6: pjDstLine[5] = (j & 4) ? CT_OPAQUE : 0; + case 5: pjDstLine[4] = (j & 8) ? CT_OPAQUE : 0; + case 4: pjDstLine[3] = (j & 16) ? CT_OPAQUE : 0; + case 3: pjDstLine[2] = (j & 32) ? CT_OPAQUE : 0; + case 2: pjDstLine[1] = (j & 64) ? CT_OPAQUE : 0; + case 1: pjDstLine[0] = (j & 128) ? CT_OPAQUE : 0; + } + + pjDstLine += ulWidth; + + /* Go to the next source line */ + pjSrcLine += ulSrcDelta; + } +} + static VOID FtfdCopyBits_S8D4( @@ -137,6 +199,47 @@ } } +static +VOID +FtfdCopyBits_LCD_X( + GLYPHBITS *pgb, + FT_Bitmap *ftbitmap) +{ + ULONG ulRows, ulDstDelta, ulSrcDelta; + PBYTE pjDstLine, pjSrcLine; + + pjDstLine = pgb->aj; + ulDstDelta = pgb->sizlBitmap.cx; + + pjSrcLine = ftbitmap->buffer; + ulSrcDelta = abs(ftbitmap->pitch); + + ulRows = pgb->sizlBitmap.cy; + while (ulRows--) + { + ULONG ulWidth = ulDstDelta; + BYTE *pjSrc; + + pjSrc = pjSrcLine; + while (ulWidth--) + { + /* Get the pixel */ + *pjDstLine++ = (*pjSrc++); + } + + /* Go to the next source line */ + pjSrcLine += ulSrcDelta; + } +} + +static +VOID +FtfdCopyBits_LCD_Y( + GLYPHBITS *pgb, + FT_Bitmap *ftbitmap) +{ +} + VOID NTAPI FtfdCopyBits( @@ -157,28 +260,47 @@ { FtfdCopyBits_S1D1(pgb, ftbitmap); } + else if ((ftbitmap->pixel_mode == FT_PIXEL_MODE_GRAY) && + (ftbitmap->num_grays == 256)) + { + FtfdCopyBits_S8D1(pgb, ftbitmap); + } + else + { + WARN("Unsupported pixel format\n"); + __debugbreak(); + } + } + else if (jBppDst == 4) + { + if (ftbitmap->pixel_mode == FT_PIXEL_MODE_MONO) + { + FtfdCopyBits_S1D4(pgb, ftbitmap); + } else if (ftbitmap->pixel_mode == FT_PIXEL_MODE_GRAY && ftbitmap->num_grays == 256) { - FtfdCopyBits_S8D1(pgb, ftbitmap); + FtfdCopyBits_S8D4(pgb, ftbitmap); } else { WARN("Unsupported pixel format\n"); __debugbreak(); } - - } - else if (jBppDst == 4) - { - if (ftbitmap->pixel_mode == FT_PIXEL_MODE_MONO) - { - FtfdCopyBits_S1D4(pgb, ftbitmap); - } - else if (ftbitmap->pixel_mode == FT_PIXEL_MODE_GRAY && - ftbitmap->num_grays == 256) - { - FtfdCopyBits_S8D4(pgb, ftbitmap); + } + else if (jBppDst == 8) + { + if (ftbitmap->pixel_mode == FT_PIXEL_MODE_LCD) + { + FtfdCopyBits_LCD_X(pgb, ftbitmap); + } + else if (ftbitmap->pixel_mode == FT_PIXEL_MODE_LCD_V) + { + FtfdCopyBits_LCD_Y(pgb, ftbitmap); + } + else if (ftbitmap->pixel_mode == FT_PIXEL_MODE_MONO) + { + FtfdCopyBits_S1D8(pgb, ftbitmap); } else { Modified: branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/drivers…
============================================================================== --- branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c [iso-8859-1] (original) +++ branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/glyph.c [iso-8859-1] Wed Aug 17 08:48:51 2011 @@ -115,8 +115,11 @@ pfont->ftface = ftface; - /* Set requested number of bits per pixel */ - pfont->jBpp = pfo->flFontType & FO_GRAY16 ? 4 : 1; + /* Set requested number of bits per pixel of the target */ + if (pfo->flFontType & FO_CLEARTYPE_X) pfont->jBpp = 8; + else if (pfo->flFontType & FO_CLEARTYPE_Y) pfont->jBpp = 8; + else if (pfo->flFontType & FO_GRAY16) pfont->jBpp = 4; + else pfont->jBpp = 1; /* Get the XFORMOBJ from the font */ pxo = FONTOBJ_pxoGetXform(pfo); @@ -549,7 +552,13 @@ FT_Error fterror; FT_Render_Mode mode; - mode = pfont->jBpp == 1 ? FT_RENDER_MODE_MONO : FT_RENDER_MODE_NORMAL; + /* Determine the right render mode */ + if (pfont->jBpp == 1) mode = FT_RENDER_MODE_MONO; + else if (pfont->pfo->flFontType & FO_CLEARTYPE_X) mode = FT_RENDER_MODE_LCD; + else if (pfont->pfo->flFontType & FO_CLEARTYPE_Y) mode = FT_RENDER_MODE_LCD_V; + else mode = FT_RENDER_MODE_NORMAL; + + /* Render the glyph */ fterror = FT_Render_Glyph(pfont->ftface->glyph, mode); if (fterror) {
13 years, 2 months
1
0
0
0
[cgutman] 53277: [ACPI] - OS layer fixes - Use our cache implementation
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Aug 17 07:23:55 2011 New Revision: 53277 URL:
http://svn.reactos.org/svn/reactos?rev=53277&view=rev
Log: [ACPI] - OS layer fixes - Use our cache implementation Modified: trunk/reactos/drivers/bus/acpi/CMakeLists.txt trunk/reactos/drivers/bus/acpi/acpica/acpica.rbuild trunk/reactos/drivers/bus/acpi/osl.c Modified: trunk/reactos/drivers/bus/acpi/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/CMakeList…
============================================================================== --- trunk/reactos/drivers/bus/acpi/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/CMakeLists.txt [iso-8859-1] Wed Aug 17 07:23:55 2011 @@ -121,7 +121,6 @@ acpica/utilities/uttrack.c acpica/utilities/utxface.c) -set_target_properties(acpica PROPERTIES COMPILE_DEFINITIONS "ACPI_USE_LOCAL_CACHE") add_dependencies(acpica bugcodes) add_library(acpi SHARED Modified: trunk/reactos/drivers/bus/acpi/acpica/acpica.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ac…
============================================================================== --- trunk/reactos/drivers/bus/acpi/acpica/acpica.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/acpica/acpica.rbuild [iso-8859-1] Wed Aug 17 07:23:55 2011 @@ -1,7 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="acpica" type="staticlibrary" allowwarnings="true"> - <define name="ACPI_USE_LOCAL_CACHE"/> <include base="acpica">include</include> <directory name="dispatcher"> <file>dsfield.c</file> Modified: trunk/reactos/drivers/bus/acpi/osl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/osl.c?rev…
============================================================================== --- trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] Wed Aug 17 07:23:55 2011 @@ -149,19 +149,6 @@ #ifndef ACPI_USE_LOCAL_CACHE -void* -AcpiOsAcquireObjectHelper ( - POOL_TYPE PoolType, - SIZE_T NumberOfBytes, - ULONG Tag) -{ - void* Alloc = ExAllocatePool(PoolType, NumberOfBytes); - - /* acpica expects memory allocated from cache to be zeroed */ - RtlZeroMemory(Alloc,NumberOfBytes); - return Alloc; -} - ACPI_STATUS AcpiOsCreateCache ( char *CacheName, @@ -173,7 +160,7 @@ ExAllocatePool(NonPagedPool,sizeof(NPAGED_LOOKASIDE_LIST)); ExInitializeNPagedLookasideList(Lookaside, - (PALLOCATE_FUNCTION)AcpiOsAcquireObjectHelper,// custom memory allocator + NULL, NULL, 0, ObjectSize, @@ -283,7 +270,7 @@ Internal, 0, InterruptNumber, - 0, + InterruptNumber, &DIrql, &Affinity);
13 years, 2 months
1
0
0
0
[cgutman] 53276: - Fix build
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Aug 17 06:28:14 2011 New Revision: 53276 URL:
http://svn.reactos.org/svn/reactos?rev=53276&view=rev
Log: - Fix build Modified: trunk/reactos/hal/halx86/generic/acpi/halpnpdd.c Modified: trunk/reactos/hal/halx86/generic/acpi/halpnpdd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/acpi/ha…
============================================================================== --- trunk/reactos/hal/halx86/generic/acpi/halpnpdd.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/acpi/halpnpdd.c [iso-8859-1] Wed Aug 17 06:28:14 2011 @@ -425,14 +425,13 @@ OUT PIO_RESOURCE_REQUIREMENTS_LIST *Requirements) { PPDO_EXTENSION DeviceExtension = DeviceObject->DeviceExtension; - NTSTATUS Status; PAGED_CODE(); /* Only the ACPI PDO has requirements */ if (DeviceExtension->PdoType == AcpiPdo) { /* Query ACPI requirements */ - Status = HalpQueryAcpiResourceRequirements(Requirements); + return HalpQueryAcpiResourceRequirements(Requirements); } else if (DeviceExtension->PdoType == WdPdo) {
13 years, 2 months
1
0
0
0
[cgutman] 53275: - Free memory using a valid tag - Don't use a hardcoded constant for pointer size - Don't access invalid memory when an SCI is absent (fixes ASSERT(Descriptor->u.Interrupt.MinimumV...
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Aug 17 05:55:43 2011 New Revision: 53275 URL:
http://svn.reactos.org/svn/reactos?rev=53275&view=rev
Log: - Free memory using a valid tag - Don't use a hardcoded constant for pointer size - Don't access invalid memory when an SCI is absent (fixes ASSERT(Descriptor->u.Interrupt.MinimumVector == Descriptor->u.Interrupt.MaximumVector) failure) - Remove unreachable code Modified: trunk/reactos/hal/halx86/generic/acpi/halacpi.c trunk/reactos/hal/halx86/generic/acpi/halpnpdd.c Modified: trunk/reactos/hal/halx86/generic/acpi/halacpi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/acpi/ha…
============================================================================== --- trunk/reactos/hal/halx86/generic/acpi/halacpi.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/acpi/halacpi.c [iso-8859-1] Wed Aug 17 05:55:43 2011 @@ -1002,7 +1002,7 @@ else { /* Fail */ - ExFreePoolWithTag(RequirementsList, 0); + ExFreePoolWithTag(RequirementsList, ' laH'); Status = STATUS_NO_SUCH_DEVICE; } } Modified: trunk/reactos/hal/halx86/generic/acpi/halpnpdd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/acpi/ha…
============================================================================== --- trunk/reactos/hal/halx86/generic/acpi/halpnpdd.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/acpi/halpnpdd.c [iso-8859-1] Wed Aug 17 05:55:43 2011 @@ -196,7 +196,7 @@ FdoRelations = ExAllocatePoolWithTag(PagedPool, FIELD_OFFSET(DEVICE_RELATIONS, Objects) + - 4 * PdoCount, + sizeof(PDEVICE_OBJECT) * PdoCount, ' laH'); if (!FdoRelations) return STATUS_INSUFFICIENT_RESOURCES; @@ -220,7 +220,7 @@ } /* Free existing structure */ - ExFreePoolWithTag(*DeviceRelations, 0); + ExFreePool(*DeviceRelations); } /* Now check if we have a PDO list */ @@ -359,7 +359,7 @@ { /* Fail, no memory */ Status = STATUS_INSUFFICIENT_RESOURCES; - ExFreePoolWithTag(RequirementsList, 0); + ExFreePoolWithTag(RequirementsList, ' laH'); return Status; } @@ -372,43 +372,40 @@ ResourceList->List[0].InterfaceType = PNPBus; ResourceList->List[0].PartialResourceList.Version = 1; ResourceList->List[0].PartialResourceList.Revision = 1; - ResourceList->List[0].PartialResourceList.Count = 1; + ResourceList->List[0].PartialResourceList.Count = 0; /* Setup the first descriptor */ PartialDesc = ResourceList->List[0].PartialResourceList.PartialDescriptors; - PartialDesc->Type = CmResourceTypeInterrupt; /* Find the requirement descriptor for the SCI */ for (i = 0; i < RequirementsList->List[0].Count; i++) { /* Get this descriptor */ Descriptor = &RequirementsList->List[0].Descriptors[i]; - if (Descriptor->Type == CmResourceTypeInterrupt) break; - Descriptor = NULL; + if (Descriptor->Type == CmResourceTypeInterrupt) + { + /* Copy requirements descriptor into resource descriptor */ + PartialDesc->Type = CmResourceTypeInterrupt; + PartialDesc->ShareDisposition = Descriptor->ShareDisposition; + PartialDesc->Flags = Descriptor->Flags; + ASSERT(Descriptor->u.Interrupt.MinimumVector == + Descriptor->u.Interrupt.MaximumVector); + PartialDesc->u.Interrupt.Vector = Descriptor->u.Interrupt.MinimumVector; + PartialDesc->u.Interrupt.Level = Descriptor->u.Interrupt.MinimumVector; + PartialDesc->u.Interrupt.Affinity = 0xFFFFFFFF; + + ResourceList->List[0].PartialResourceList.Count++; + + break; + } } - - /* Make sure we found the descriptor */ - if (Descriptor) - { - /* Copy requirements descriptor into resource descriptor */ - PartialDesc->ShareDisposition = Descriptor->ShareDisposition; - PartialDesc->Flags = Descriptor->Flags; - ASSERT(Descriptor->u.Interrupt.MinimumVector == - Descriptor->u.Interrupt.MaximumVector); - PartialDesc->u.Interrupt.Vector = Descriptor->u.Interrupt.MinimumVector; - PartialDesc->u.Interrupt.Level = Descriptor->u.Interrupt.MinimumVector; - PartialDesc->u.Interrupt.Affinity = 0xFFFFFFFF; - - /* Return resources and success */ - *Resources = ResourceList; - ExFreePoolWithTag(RequirementsList, 0); - return STATUS_SUCCESS; - } - - /* Free memory and fail */ - ExFreePoolWithTag(RequirementsList, 0); - ExFreePoolWithTag(ResourceList, 0); - Status = STATUS_NOT_FOUND; + + /* Return resources and success */ + *Resources = ResourceList; + + ExFreePoolWithTag(RequirementsList, ' laH'); + + return STATUS_SUCCESS; } else if (DeviceExtension->PdoType == WdPdo) { @@ -420,9 +417,6 @@ /* This shouldn't happen */ return STATUS_UNSUCCESSFUL; } - - /* Return the status */ - return Status; } NTSTATUS @@ -450,9 +444,6 @@ /* This shouldn't happen */ return STATUS_UNSUCCESSFUL; } - - /* Return the status */ - return Status; } NTSTATUS
13 years, 2 months
1
0
0
0
[cgutman] 53274: - Partially revert r53272 (I forgot that DEVICE_RELATIONS stores a pointer array)
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Aug 17 05:51:21 2011 New Revision: 53274 URL:
http://svn.reactos.org/svn/reactos?rev=53274&view=rev
Log: - Partially revert r53272 (I forgot that DEVICE_RELATIONS stores a pointer array) Modified: trunk/reactos/drivers/bus/acpi/pnp.c Modified: trunk/reactos/drivers/bus/acpi/pnp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/pnp.c?rev…
============================================================================== --- trunk/reactos/drivers/bus/acpi/pnp.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/pnp.c [iso-8859-1] Wed Aug 17 05:51:21 2011 @@ -193,7 +193,7 @@ // length = sizeof(DEVICE_RELATIONS) + - (((numPdosPresent + prevcount) - 1) * sizeof (DEVICE_OBJECT)); + (((numPdosPresent + prevcount) - 1) * sizeof (PDEVICE_OBJECT)); relations = (PDEVICE_RELATIONS) ExAllocatePoolWithTag (PagedPool, length, 'IPCA'); @@ -214,7 +214,7 @@ // if (prevcount) { RtlCopyMemory (relations->Objects, oldRelations->Objects, - prevcount * sizeof (DEVICE_OBJECT)); + prevcount * sizeof (PDEVICE_OBJECT)); } relations->Count = prevcount + numPdosPresent;
13 years, 2 months
1
0
0
0
[tfaber] 53273: [KMTestSuite] - Sync to rostests r53161. Fixes build with recent trunk
by tfaber@svn.reactos.org
Author: tfaber Date: Tue Aug 16 20:51:21 2011 New Revision: 53273 URL:
http://svn.reactos.org/svn/reactos?rev=53273&view=rev
Log: [KMTestSuite] - Sync to rostests r53161. Fixes build with recent trunk Added: branches/GSoC_2011/KMTestSuite/apitests/ntdll/NtFreeVirtualMemory.c - copied unchanged from r53271, trunk/rostests/apitests/ntdll/NtFreeVirtualMemory.c Modified: branches/GSoC_2011/KMTestSuite/ (props changed) branches/GSoC_2011/KMTestSuite/CMakeLists.txt branches/GSoC_2011/KMTestSuite/apitests/ntdll/CMakeLists.txt branches/GSoC_2011/KMTestSuite/apitests/ntdll/ntdll_apitest.rbuild branches/GSoC_2011/KMTestSuite/apitests/ntdll/testlist.c branches/GSoC_2011/KMTestSuite/rosautotest/CMakeLists.txt branches/GSoC_2011/KMTestSuite/tests/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/comctl32/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/comdlg32/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/inetcomm/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/itss/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/jscript/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/msctf/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/mstask/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/msvcrt/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/oleaut32/olepicture.c branches/GSoC_2011/KMTestSuite/winetests/qmgr/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/quartz/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/cstub.c branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/ndr_marshall.c branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/rpc.c branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/rpc_async.c branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/server.c branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/server.idl branches/GSoC_2011/KMTestSuite/winetests/shdocvw/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/urlmon/protocol.c branches/GSoC_2011/KMTestSuite/winetests/ws2_32/sock.c branches/GSoC_2011/KMTestSuite/winetests/xmllite/CMakeLists.txt branches/GSoC_2011/KMTestSuite/winetests/xmllite/reader.c Propchange: branches/GSoC_2011/KMTestSuite/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 16 20:51:21 2011 @@ -1,1 +1,1 @@ -/trunk/rostests:51266-52109 +/trunk/rostests:51165-53271 Modified: branches/GSoC_2011/KMTestSuite/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/CMakeList…
============================================================================== --- branches/GSoC_2011/KMTestSuite/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -5,7 +5,9 @@ #add_subdirectory(dxtest) add_subdirectory(kmtests) #add_subdirectory(regtests) -add_subdirectory(rosautotest) +if(NOT MSVC) # FIXME: msvc build + add_subdirectory(rosautotest) +endif() add_subdirectory(tests) add_subdirectory(win32) add_subdirectory(winetests) Modified: branches/GSoC_2011/KMTestSuite/apitests/ntdll/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/apitests/…
============================================================================== --- branches/GSoC_2011/KMTestSuite/apitests/ntdll/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/apitests/ntdll/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -2,6 +2,7 @@ add_definitions(-D_DLL -D__USE_CRTIMP) list(APPEND SOURCE + NtFreeVirtualMemory.c RtlInitializeBitMap.c ZwContinue.c testlist.c) Modified: branches/GSoC_2011/KMTestSuite/apitests/ntdll/ntdll_apitest.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/apitests/…
============================================================================== --- branches/GSoC_2011/KMTestSuite/apitests/ntdll/ntdll_apitest.rbuild [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/apitests/ntdll/ntdll_apitest.rbuild [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,13 +1,15 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> -<module name="ntdll_apitest" type="win32cui" installbase="bin" installname="ntdll_apitest.exe"> +<module name="ntdll_apitest" type="win32cui" installbase="bin" installname="ntdll_apitest.exe" + allowwarnings="true"> <include base="ntdll_apitest">.</include> <library>wine</library> <library>ntdll</library> <library>pseh</library> <file>testlist.c</file> + <file>NtFreeVirtualMemory.c</file> <file>RtlInitializeBitMap.c</file> <file>ZwContinue.c</file> <if property="ARCH" value="i386"> Modified: branches/GSoC_2011/KMTestSuite/apitests/ntdll/testlist.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/apitests/…
============================================================================== --- branches/GSoC_2011/KMTestSuite/apitests/ntdll/testlist.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/apitests/ntdll/testlist.c [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -7,11 +7,13 @@ extern void func_RtlInitializeBitMap(void); extern void func_ZwContinue(void); +extern void func_NtFreeVirtualMemory(void); const struct test winetest_testlist[] = { { "RtlInitializeBitMap", func_RtlInitializeBitMap }, { "ZwContinue", func_ZwContinue }, + { "NtFreeVirtualMemory", func_NtFreeVirtualMemory }, { 0, 0 } }; Modified: branches/GSoC_2011/KMTestSuite/rosautotest/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/rosautote…
============================================================================== --- branches/GSoC_2011/KMTestSuite/rosautotest/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/rosautotest/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -19,12 +19,10 @@ shutdown.cpp tools.cpp) -add_executable(rosautotest -#${CMAKE_CURRENT_BINARY_DIR}/rosautotest_precomp.h.gch -${SOURCE}) +add_executable(rosautotest ${SOURCE}) -#add_pch(rosautotest ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) set_module_type(rosautotest win32cui) add_importlibs(rosautotest advapi32 shell32 user32 wininet msvcrt kernel32 ntdll) +add_pch(rosautotest precomp.h) add_cd_file(TARGET rosautotest DESTINATION reactos/system32 FOR all) Modified: branches/GSoC_2011/KMTestSuite/tests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/tests/CMa…
============================================================================== --- branches/GSoC_2011/KMTestSuite/tests/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/tests/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,2 +1,4 @@ add_subdirectory(mmixer_test) -add_subdirectory(pseh2) +if (NOT MSVC) + add_subdirectory(pseh2) +endif() Modified: branches/GSoC_2011/KMTestSuite/winetests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -3,7 +3,9 @@ add_subdirectory(advapi32) add_subdirectory(advpack) -add_subdirectory(amstream) +if(NOT MSVC) + add_subdirectory(amstream) # FIXME: msvc build. +endif() add_subdirectory(atl) add_subdirectory(avifil32) add_subdirectory(browseui) @@ -20,9 +22,13 @@ add_subdirectory(fusion) add_subdirectory(gdi32) add_subdirectory(gdiplus) -add_subdirectory(hlink) +if(NOT MSVC) + add_subdirectory(hlink) # FIXME: msvc build. +endif() add_subdirectory(icmp) -add_subdirectory(imagehlp) +if(NOT MSVC) + add_subdirectory(imagehlp) # FIXME: msvc build. +endif() add_subdirectory(imm32) add_subdirectory(inetcomm) add_subdirectory(inetmib1) @@ -38,13 +44,18 @@ add_subdirectory(msacm32) add_subdirectory(mscms) add_subdirectory(msctf) -add_subdirectory(mshtml) -add_subdirectory(msi) +if(NOT MSVC) + # FIXME: msvc build. + add_subdirectory(mshtml) + add_subdirectory(msi) +endif() add_subdirectory(mstask) add_subdirectory(msvcrt) add_subdirectory(msvcrtd) add_subdirectory(msvfw32) -add_subdirectory(msxml3) +if(NOT MSVC) + add_subdirectory(msxml3) # FIXME: msvc build. +endif() add_subdirectory(netapi32) add_subdirectory(ntdll) add_subdirectory(ntdsapi) @@ -52,7 +63,9 @@ add_subdirectory(odbccp32) add_subdirectory(ole32) add_subdirectory(oleacc) -add_subdirectory(oleaut32) +if(NOT MSVC) + add_subdirectory(oleaut32) # FIXME: msvc build. +endif() add_subdirectory(opengl32) add_subdirectory(pdh) add_subdirectory(powrprof) @@ -62,7 +75,9 @@ add_subdirectory(rasapi32) add_subdirectory(riched20) add_subdirectory(riched32) -add_subdirectory(rpcrt4) +if(NOT MSVC) + add_subdirectory(rpcrt4) # FIXME: msvc build. +endif() add_subdirectory(rsabase) add_subdirectory(rsaenh) add_subdirectory(schannel) @@ -75,7 +90,9 @@ add_subdirectory(snmpapi) add_subdirectory(spoolss) add_subdirectory(twain_32) -add_subdirectory(urlmon) +if(NOT MSVC) + add_subdirectory(urlmon) # FIXME: msvc build. +endif() add_subdirectory(user32) add_subdirectory(userenv) add_subdirectory(usp10) Modified: branches/GSoC_2011/KMTestSuite/winetests/comctl32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/comctl32/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/comctl32/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,7 +1,5 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) @@ -38,6 +36,11 @@ add_executable(comctl32_winetest ${SOURCE}) target_link_libraries(comctl32_winetest wine) + +if(MSVC) + target_link_libraries(comctl32_winetest uuid) +endif() + set_module_type(comctl32_winetest win32cui) add_importlibs(comctl32_winetest comctl32 ole32 user32 gdi32 advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET comctl32_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/comdlg32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/comdlg32/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/comdlg32/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,7 +1,5 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) list(APPEND SOURCE filedlg.c @@ -12,6 +10,11 @@ add_executable(comdlg32_winetest ${SOURCE}) target_link_libraries(comdlg32_winetest wine) + +if(MSVC) + target_link_libraries(comdlg32_winetest uuid) +endif() + set_module_type(comdlg32_winetest win32cui) add_importlibs(comdlg32_winetest comdlg32 winspool user32 gdi32 msvcrt kernel32 ntdll) add_cd_file(TARGET comdlg32_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/inetcomm/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/inetcomm/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/inetcomm/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,7 +1,5 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) list(APPEND SOURCE mimeintl.c @@ -10,6 +8,11 @@ add_executable(inetcomm_winetest ${SOURCE}) target_link_libraries(inetcomm_winetest wine) + +if(MSVC) + target_link_libraries(inetcomm_winetest uuid) +endif() + set_module_type(inetcomm_winetest win32cui) add_importlibs(inetcomm_winetest inetcomm oleaut32 ole32 msvcrt kernel32 ntdll) add_cd_file(TARGET inetcomm_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/itss/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/itss/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/itss/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,12 +1,15 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) set_rc_compiler() add_executable(itss_winetest protocol.c testlist.c rsrc.rc) target_link_libraries(itss_winetest wine) + +if(MSVC) + target_link_libraries(itss_winetest uuid) +endif() + set_module_type(itss_winetest win32cui) add_importlibs(itss_winetest ole32 msvcrt kernel32 ntdll) add_cd_file(TARGET itss_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/jscript/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/jscript/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/jscript/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,7 +1,5 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) set_rc_compiler() @@ -14,6 +12,11 @@ add_executable(jscript_winetest ${SOURCE}) target_link_libraries(jscript_winetest wine) + +if(MSVC) + target_link_libraries(jscript_winetest uuid) +endif() + set_module_type(jscript_winetest win32cui) add_importlibs(jscript_winetest ole32 oleaut32 advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET jscript_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/msctf/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/msctf/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/msctf/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,10 +1,13 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) add_executable(msctf_winetest inputprocessor.c testlist.c) target_link_libraries(msctf_winetest wine) + +if(MSVC) + target_link_libraries(msctf_winetest uuid) +endif() + set_module_type(msctf_winetest win32cui) add_importlibs(msctf_winetest ole32 user32 msvcrt kernel32 ntdll) add_cd_file(TARGET msctf_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/mstask/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/mstask/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/mstask/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,7 +1,5 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) list(APPEND SOURCE task.c @@ -11,6 +9,11 @@ add_executable(mstask_winetest ${SOURCE}) target_link_libraries(mstask_winetest wine) + +if(MSVC) + target_link_libraries(mstask_winetest uuid) +endif() + set_module_type(mstask_winetest win32cui) add_importlibs(mstask_winetest ole32 msvcrt kernel32 ntdll) add_cd_file(TARGET mstask_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/msvcrt/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/msvcrt/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/msvcrt/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,8 +1,7 @@ add_definitions( -D__ROS_LONG64__ - -D_CRT_NONSTDC_NO_DEPRECATE - -D_DLL -D__USE_CRTIMP) + -D_CRT_NONSTDC_NO_DEPRECATE) list(APPEND SOURCE cpp.c @@ -22,6 +21,11 @@ time.c) add_executable(msvcrt_winetest ${SOURCE}) + +if(MSVC) + target_link_libraries(msvcrt_winetest oldnames) +endif() + set_module_type(msvcrt_winetest win32cui) add_importlibs(msvcrt_winetest msvcrt kernel32 ntdll) add_cd_file(TARGET msvcrt_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/oleaut32/olepicture.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/oleaut32/olepicture.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/oleaut32/olepicture.c [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -578,6 +578,11 @@ BOOL keep; short type; + if(!winetest_interactive) { + skip("Bug 5000: oleaut_winetest:olepicture crashes with Page Fault.\n"); + return; + } + hglob = GlobalAlloc (0, sizeof(enhmetafile)); data = GlobalLock(hglob); memcpy(data, enhmetafile, sizeof(enhmetafile)); Modified: branches/GSoC_2011/KMTestSuite/winetests/qmgr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/qmgr/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/qmgr/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,7 +1,5 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) list(APPEND SOURCE enum_files.c @@ -13,6 +11,11 @@ add_executable(qmgr_winetest ${SOURCE}) target_link_libraries(qmgr_winetest wine) + +if(MSVC) + target_link_libraries(qmgr_winetest uuid) +endif() + set_module_type(qmgr_winetest win32cui) add_importlibs(qmgr_winetest ole32 shlwapi user32 msvcrt kernel32 ntdll) add_cd_file(TARGET qmgr_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/quartz/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/quartz/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/quartz/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -15,7 +15,7 @@ testlist.c) add_executable(quartz_winetest ${SOURCE}) -target_link_libraries(quartz_winetest wine) +target_link_libraries(quartz_winetest wine uuid) set_module_type(quartz_winetest win32cui) add_importlibs(quartz_winetest ole32 oleaut32 advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET quartz_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -6,7 +6,8 @@ -D__ROS_LONG64__ -D_DLL -D__USE_CRTIMP) -add_rpc_library(serverrpc server.idl) +add_rpc_files(client server.idl) +add_rpc_files(server server.idl) list(APPEND SOURCE cstub.c @@ -16,13 +17,14 @@ rpc_async.c rpc_protseq.c server.c - testlist.c) + testlist.c + ${CMAKE_CURRENT_BINARY_DIR}/server_c.c + ${CMAKE_CURRENT_BINARY_DIR}/server_s.c) add_executable(rpcrt4_winetest ${SOURCE}) target_link_libraries(rpcrt4_winetest uuid wine - serverrpc ${PSEH_LIB}) set_module_type(rpcrt4_winetest win32cui) Modified: branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/cstub.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/cstub.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/cstub.c [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -691,9 +691,14 @@ struct dummy_unknown { - const IUnknownVtbl *vtbl; + IUnknown IUnknown_iface; LONG ref; }; + +static inline struct dummy_unknown *impl_from_IUnknown(IUnknown *iface) +{ + return CONTAINING_RECORD(iface, struct dummy_unknown, IUnknown_iface); +} static HRESULT WINAPI dummy_QueryInterface(IUnknown *This, REFIID iid, void **ppv) { @@ -703,13 +708,13 @@ static ULONG WINAPI dummy_AddRef(LPUNKNOWN iface) { - struct dummy_unknown *this = (struct dummy_unknown *)iface; + struct dummy_unknown *this = impl_from_IUnknown(iface); return InterlockedIncrement( &this->ref ); } static ULONG WINAPI dummy_Release(LPUNKNOWN iface) { - struct dummy_unknown *this = (struct dummy_unknown *)iface; + struct dummy_unknown *this = impl_from_IUnknown(iface); return InterlockedDecrement( &this->ref ); } @@ -719,7 +724,7 @@ dummy_AddRef, dummy_Release }; -static struct dummy_unknown dummy_unknown = { &dummy_unknown_vtbl, 0 }; +static struct dummy_unknown dummy_unknown = { { &dummy_unknown_vtbl }, 0 }; static void create_proxy_test( IPSFactoryBuffer *ppsf, REFIID iid, const void *expected_vtbl ) { @@ -737,7 +742,8 @@ ok( count == 0, "wrong refcount %u\n", count ); dummy_unknown.ref = 4; - r = IPSFactoryBuffer_CreateProxy(ppsf, (IUnknown *)&dummy_unknown, iid, &proxy, (void **)&iface); + r = IPSFactoryBuffer_CreateProxy(ppsf, &dummy_unknown.IUnknown_iface, iid, &proxy, + (void **)&iface); ok( r == S_OK, "IPSFactoryBuffer_CreateProxy failed %x\n", r ); ok( dummy_unknown.ref == 5, "wrong refcount %u\n", dummy_unknown.ref ); ok( *(void **)iface == expected_vtbl, "wrong iface pointer %p/%p\n", *(void **)iface, expected_vtbl ); @@ -775,6 +781,7 @@ vtbl = &create_stub_test_fail_vtbl; pstub = create_stub(ppsf, &IID_if1, obj, E_NOINTERFACE); + ok(pstub == S_OK, "create_stub failed: %u\n", GetLastError()); } @@ -892,6 +899,7 @@ obj = (IUnknown*)&new_vtbl; r = IRpcStubBuffer_Connect(pstub, obj); + ok(r == S_OK, "r %08x\n", r); ok(connect_test_base_Connect_called == 1, "connect_test_bsae_Connect called %d times\n", connect_test_base_Connect_called); ok(connect_test_orig_release_called == 3, "release called %d\n", connect_test_orig_release_called); Modified: branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/ndr_marshall.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/ndr_marshall.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/ndr_marshall.c [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1543,6 +1543,9 @@ my_alloc_called = 0; StubMsg.Buffer = StubMsg.BufferStart; mem = mem_orig = HeapAlloc(GetProcessHeap(), 0, sizeof(memsrc)); + /* Windows apparently checks string length on the output buffer to determine its size... */ + memset( mem, 'x', sizeof(memsrc) - 1 ); + mem[sizeof(memsrc) - 1] = 0; NdrPointerUnmarshall( &StubMsg, &mem, fmtstr_conf_str, 0); ok(mem == mem_orig, "mem not alloced\n"); ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); Modified: branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/rpc.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/rpc.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/rpc.c [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -120,13 +120,9 @@ for (i1 = 0; i1 < 10; i1++) { Uuid1 = Uuid_Table[i1]; rslt=UuidToStringW(&Uuid1, &wstr); - if (rslt==RPC_S_CANNOT_SUPPORT) { - /* Must be Win9x (no Unicode support), skip the tests */ - break; - } - ok( (rslt == RPC_S_OK), "Simple UUID->WString copy\n" ); - ok( (UuidFromStringW(wstr, &Uuid2) == RPC_S_OK), "Simple WString->UUID copy from generated UUID String\n" ); - ok( UuidEqual(&Uuid1, &Uuid2, &rslt), "Uuid -> WString -> Uuid transform\n" ); + ok( (rslt == RPC_S_OK), "Simple UUID->WString copy\n" ); + ok( (UuidFromStringW(wstr, &Uuid2) == RPC_S_OK), "Simple WString->UUID copy from generated UUID String\n" ); + ok( UuidEqual(&Uuid1, &Uuid2, &rslt), "Uuid -> WString -> Uuid transform\n" ); /* invalid uuid tests -- size of valid UUID string=36 */ for (i2 = 0; i2 < 36; i2++) { wx = wstr[i2]; @@ -266,8 +262,7 @@ status = RpcBindingSetAuthInfo(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE, RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); - ok(status == RPC_S_OK || broken(status == RPC_S_UNKNOWN_AUTHN_SERVICE), /* win9x */ - "RpcBindingSetAuthInfo failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%u)\n", status); status = RpcBindingInqAuthInfo(IFoo_IfHandle, NULL, NULL, NULL, NULL, NULL); ok(status == RPC_S_BINDING_HAS_NO_AUTH, "RpcBindingInqAuthInfo failed (%u)\n", @@ -277,10 +272,6 @@ RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%u)\n", status); -if(1) - skip("bug 5778: this test part needs rpcrt4 sync >= 1.2rc6\n"); -else -{ level = authnsvc = authzsvc = 0; principal = (unsigned char *)0xdeadbeef; identity = (RPC_AUTH_IDENTITY_HANDLE *)0xdeadbeef; @@ -288,14 +279,14 @@ &identity, &authzsvc); ok(status == RPC_S_OK, "RpcBindingInqAuthInfo failed (%u)\n", status); - ok(identity == NULL, "expected NULL identity\n"); - ok(principal != (unsigned char *)0xdeadbeef, "expected valid principal\n"); - ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "expected RPC_C_AUTHN_LEVEL_PKT_PRIVACY\n"); - ok(authnsvc == RPC_C_AUTHN_WINNT, "expected RPC_C_AUTHN_WINNT\n"); - todo_wine ok(authzsvc == RPC_C_AUTHZ_NAME, "expected RPC_C_AUTHZ_NAME\n"); + ok(identity == NULL, "expected NULL identity, got %p\n", identity); + ok(principal != (unsigned char *)0xdeadbeef, "expected valid principal, got %p\n", principal); + ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "expected RPC_C_AUTHN_LEVEL_PKT_PRIVACY, got %d\n", level); + ok(authnsvc == RPC_C_AUTHN_WINNT, "expected RPC_C_AUTHN_WINNT, got %d\n", authnsvc); + todo_wine ok(authzsvc == RPC_C_AUTHZ_NAME, "expected RPC_C_AUTHZ_NAME, got %d\n", authzsvc); RpcStringFree(&principal); -} + status = RpcMgmtStopServerListening(NULL); ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n", status); @@ -441,13 +432,7 @@ { LONG win32status; RPC_STATUS rpc_status; - BOOL on_win9x = FALSE; BOOL w2k3_up = FALSE; - - /* Win9x always returns the given status */ - win32status = I_RpcMapWin32Status(ERROR_ACCESS_DENIED); - if (win32status == ERROR_ACCESS_DENIED) - on_win9x = TRUE; /* Windows 2003 and Vista return STATUS_UNSUCCESSFUL if given an unknown status */ win32status = I_RpcMapWin32Status(9999); @@ -582,9 +567,6 @@ expected_win32status = rpc_status; } - if (on_win9x) - missing = TRUE; - ok(win32status == expected_win32status || broken(missing && win32status == rpc_status), "I_RpcMapWin32Status(%d) should have returned 0x%x instead of 0x%x%s\n", Modified: branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/rpc_async.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/rpc_async.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/rpc_async.c [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -25,8 +25,8 @@ #include <rpc.h> #include <rpcasync.h> -RPC_STATUS (RPC_ENTRY *pRpcAsyncInitializeHandle)(PRPC_ASYNC_STATE,unsigned int); -RPC_STATUS (RPC_ENTRY *pRpcAsyncGetCallStatus)(PRPC_ASYNC_STATE); +static RPC_STATUS (RPC_ENTRY *pRpcAsyncInitializeHandle)(PRPC_ASYNC_STATE,unsigned int); +static RPC_STATUS (RPC_ENTRY *pRpcAsyncGetCallStatus)(PRPC_ASYNC_STATE); static void test_RpcAsyncInitializeHandle(void) { Modified: branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/server.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/server.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/server.c [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -88,50 +88,77 @@ return d; } -int -s_int_return(void) +int __cdecl s_int_return(void) { return INT_CODE; } -int -s_square(int x) +int __cdecl s_square(int x) { return x * x; } -int -s_sum(int x, int y) +int __cdecl s_sum(int x, int y) { return x + y; } -void -s_square_out(int x, int *y) +signed char __cdecl s_sum_char(signed char x, signed char y) +{ + return x + y; +} + +short __cdecl s_sum_short(short x, short y) +{ + return x + y; +} + +int __cdecl s_sum_float(float x, float y) +{ + return x + y; +} + +int __cdecl s_sum_double_int(int x, double y) +{ + return x + y; +} + +hyper __cdecl s_sum_hyper(hyper x, hyper y) +{ + return x + y; +} + +int __cdecl s_sum_hyper_int(hyper x, hyper y) +{ + return x + y; +} + +int __cdecl s_sum_char_hyper(signed char x, hyper y) +{ + return x + y; +} + +void __cdecl s_square_out(int x, int *y) { *y = s_square(x); } -void -s_square_ref(int *x) +void __cdecl s_square_ref(int *x) { *x = s_square(*x); } -int -s_str_length(const char *s) +int __cdecl s_str_length(const char *s) { return strlen(s); } -int -s_str_t_length(str_t s) +int __cdecl s_str_t_length(str_t s) { return strlen(s); } -int -s_cstr_length(const char *s, int n) +int __cdecl s_cstr_length(const char *s, int n) { int len = 0; while (0 < n-- && *s++) @@ -139,65 +166,55 @@ return len; } -int -s_dot_self(vector_t *v) +int __cdecl s_dot_self(vector_t *v) { return s_square(v->x) + s_square(v->y) + s_square(v->z); } -double -s_square_half(double x, double *y) +double __cdecl s_square_half(double x, double *y) { *y = x / 2.0; return x * x; } -float -s_square_half_float(float x, float *y) +float __cdecl s_square_half_float(float x, float *y) { *y = x / 2.0f; return x * x; } -LONG -s_square_half_long(LONG x, LONG *y) +LONG __cdecl s_square_half_long(LONG x, LONG *y) { *y = x / 2; return x * x; } -int -s_sum_fixed_array(int a[5]) +int __cdecl s_sum_fixed_array(int a[5]) { return a[0] + a[1] + a[2] + a[3] + a[4]; } -int -s_pints_sum(pints_t *pints) +int __cdecl s_pints_sum(pints_t *pints) { return *pints->pi + **pints->ppi + ***pints->pppi; } -double -s_ptypes_sum(ptypes_t *pt) +double __cdecl s_ptypes_sum(ptypes_t *pt) { return *pt->pc + *pt->ps + *pt->pl + *pt->pf + *pt->pd; } -int -s_dot_pvectors(pvectors_t *p) +int __cdecl s_dot_pvectors(pvectors_t *p) { return p->pu->x * (*p->pv)->x + p->pu->y * (*p->pv)->y + p->pu->z * (*p->pv)->z; } -int -s_sum_sp(sp_t *sp) +int __cdecl s_sum_sp(sp_t *sp) { return sp->x + sp->s->x; } -double -s_square_sun(sun_t *su) +double __cdecl s_square_sun(sun_t *su) { switch (su->s) { @@ -210,16 +227,14 @@ } } -int -s_test_list_length(test_list_t *list) +int __cdecl s_test_list_length(test_list_t *list) { return (list->t == TL_LIST ? 1 + s_test_list_length(list->u.tail) : 0); } -int -s_sum_fixed_int_3d(int m[2][3][4]) +int __cdecl s_sum_fixed_int_3d(int m[2][3][4]) { int i, j, k; int sum = 0; @@ -232,8 +247,7 @@ return sum; } -int -s_sum_conf_array(int x[], int n) +int __cdecl s_sum_conf_array(int x[], int n) { int *p = x, *end = p + n; int sum = 0; @@ -244,8 +258,7 @@ return sum; } -int -s_sum_conf_ptr_by_conf_ptr(int n1, int *n2_then_x1, int *x2) +int __cdecl s_sum_conf_ptr_by_conf_ptr(int n1, int *n2_then_x1, int *x2) { int i; int sum = 0; @@ -261,20 +274,17 @@ return sum; } -int -s_sum_unique_conf_array(int x[], int n) +int __cdecl s_sum_unique_conf_array(int x[], int n) { return s_sum_conf_array(x, n); } -int -s_sum_unique_conf_ptr(int *x, int n) +int __cdecl s_sum_unique_conf_ptr(int *x, int n) { return x ? s_sum_conf_array(x, n) : 0; } -int -s_sum_var_array(int x[20], int n) +int __cdecl s_sum_var_array(int x[20], int n) { ok(0 <= n, "RPC sum_var_array\n"); ok(n <= 20, "RPC sum_var_array\n"); @@ -282,8 +292,7 @@ return s_sum_conf_array(x, n); } -int -s_sum_complex_array(int n, refpint_t pi[]) +int __cdecl s_sum_complex_array(int n, refpint_t pi[]) { int total = 0; for (; n > 0; n--) @@ -291,28 +300,24 @@ return total; } -int -s_dot_two_vectors(vector_t vs[2]) +int __cdecl s_dot_two_vectors(vector_t vs[2]) { return vs[0].x * vs[1].x + vs[0].y * vs[1].y + vs[0].z * vs[1].z; } -void -s_get_number_array(int x[20], int *n) +void __cdecl s_get_number_array(int x[20], int *n) { int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; memcpy(x, c, sizeof(c)); *n = sizeof(c)/sizeof(c[0]); } -int -s_sum_cs(cs_t *cs) +int __cdecl s_sum_cs(cs_t *cs) { return s_sum_conf_array(cs->ca, cs->n); } -int -s_sum_cps(cps_t *cps) +int __cdecl s_sum_cps(cps_t *cps) { int sum = 0; int i; @@ -326,8 +331,7 @@ return sum; } -int -s_sum_cpsc(cpsc_t *cpsc) +int __cdecl s_sum_cpsc(cpsc_t *cpsc) { int sum = 0; int i; @@ -336,15 +340,13 @@ return sum; } -int -s_square_puint(puint_t p) +int __cdecl s_square_puint(puint_t p) { int n = atoi(p); return n * n; } -int -s_sum_puints(puints_t *p) +int __cdecl s_sum_puints(puints_t *p) { int sum = 0; int i; @@ -353,8 +355,7 @@ return sum; } -int -s_sum_cpuints(cpuints_t *p) +int __cdecl s_sum_cpuints(cpuints_t *p) { int sum = 0; int i; @@ -363,21 +364,18 @@ return sum; } -int -s_dot_copy_vectors(vector_t u, vector_t v) +int __cdecl s_dot_copy_vectors(vector_t u, vector_t v) { return u.x * v.x + u.y * v.y + u.z * v.z; } -int -s_square_test_us(test_us_t *tus) +int __cdecl s_square_test_us(test_us_t *tus) { int n = atoi(tus->us.x); return n * n; } -double -s_square_encu(encu_t *eu) +double __cdecl s_square_encu(encu_t *eu) { switch (eu->t) { @@ -388,8 +386,7 @@ } } -double -s_square_unencu(int t, unencu_t *eu) +double __cdecl s_square_unencu(int t, unencu_t *eu) { switch (t) { @@ -400,20 +397,17 @@ } } -void -s_check_se2(se_t *s) +void __cdecl s_check_se2(se_t *s) { ok(s->f == E2, "check_se2\n"); } -int -s_sum_parr(int *a[3]) +int __cdecl s_sum_parr(int *a[3]) { return s_sum_pcarr(a, 3); } -int -s_sum_pcarr(int *a[], int n) +int __cdecl s_sum_pcarr(int *a[], int n) { int i, s = 0; for (i = 0; i < n; ++i) @@ -421,8 +415,7 @@ return s; } -int -s_enum_ord(e_t e) +int __cdecl s_enum_ord(e_t e) { switch (e) { @@ -435,8 +428,7 @@ } } -double -s_square_encue(encue_t *eue) +double __cdecl s_square_encue(encue_t *eue) { switch (eue->t) { @@ -447,8 +439,7 @@ } } -int -s_sum_toplev_conf_2n(int *x, int n) +int __cdecl s_sum_toplev_conf_2n(int *x, int n) { int sum = 0; int i; @@ -457,8 +448,7 @@ return sum; } -int -s_sum_toplev_conf_cond(int *x, int a, int b, int c) +int __cdecl s_sum_toplev_conf_cond(int *x, int a, int b, int c) { int sum = 0; int n = c ? a : b; @@ -468,26 +458,22 @@ return sum; } -double -s_sum_aligns(aligns_t *a) +double __cdecl s_sum_aligns(aligns_t *a) { return a->c + a->i + a->s + a->d; } -int -s_sum_padded(padded_t *p) +int __cdecl s_sum_padded(padded_t *p) { return p->i + p->c; } -int -s_sum_padded2(padded_t ps[2]) +int __cdecl s_sum_padded2(padded_t ps[2]) { return s_sum_padded(&ps[0]) + s_sum_padded(&ps[1]); } -int -s_sum_padded_conf(padded_t *ps, int n) +int __cdecl s_sum_padded_conf(padded_t *ps, int n) { int sum = 0; int i; @@ -496,32 +482,27 @@ return sum; } -int -s_sum_bogus(bogus_t *b) +int __cdecl s_sum_bogus(bogus_t *b) { return *b->h.p1 + *b->p2 + *b->p3 + b->c; } -void -s_check_null(int *null) +void __cdecl s_check_null(int *null) { ok(!null, "RPC check_null\n"); } -int -s_str_struct_len(str_struct_t *s) +int __cdecl s_str_struct_len(str_struct_t *s) { return lstrlenA(s->s); } -int -s_wstr_struct_len(wstr_struct_t *s) +int __cdecl s_wstr_struct_len(wstr_struct_t *s) { return lstrlenW(s->s); } -int -s_sum_doub_carr(doub_carr_t *dc) +int __cdecl s_sum_doub_carr(doub_carr_t *dc) { int i, j; int sum = 0; @@ -531,8 +512,7 @@ return sum; } -void -s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc) +void __cdecl s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc) { doub_carr_t *t; int i, j; @@ -549,8 +529,7 @@ *dc = t; } -unsigned -s_hash_bstr(bstr_t b) +unsigned __cdecl s_hash_bstr(bstr_t b) { short n = b[-1]; short *s = b; @@ -561,8 +540,16 @@ return hash; } -void -s_get_name(name_t *name) +void __cdecl s_get_a_bstr(bstr_t *b) +{ + bstr_t bstr; + short str[] = {5, 'W', 'i', 'n', 'e', 0}; + bstr = HeapAlloc(GetProcessHeap(), 0, sizeof(str)); + memcpy(bstr, str, sizeof(str)); + *b = bstr + 1; +} + +void __cdecl s_get_name(name_t *name) { const char bossman[] = "Jeremy White"; memcpy(name->name, bossman, min(name->size, sizeof(bossman))); @@ -571,14 +558,12 @@ name->name[name->size - 1] = 0; } -int -s_sum_pcarr2(int n, int **pa) +int __cdecl s_sum_pcarr2(int n, int **pa) { return s_sum_conf_array(*pa, n); } -int -s_sum_L1_norms(int n, vector_t *vs) +int __cdecl s_sum_L1_norms(int n, vector_t *vs) { int i; int sum = 0; @@ -587,8 +572,7 @@ return sum; } -s123_t * -s_get_s123(void) +s123_t * __cdecl s_get_s123(void) { s123_t *s = MIDL_user_allocate(sizeof *s); s->f1 = 1; @@ -597,24 +581,22 @@ return s; } -str_t -s_get_filename(void) +str_t __cdecl s_get_filename(void) { return (char *)__FILE__; } -int s_echo_ranged_int(int n) +int __cdecl s_echo_ranged_int(int n) { return n; } -void s_get_ranged_enum(renum_t *re) +void __cdecl s_get_ranged_enum(renum_t *re) { *re = RE3; } -void -s_context_handle_test(void) +void __cdecl s_context_handle_test(void) { NDR_SCONTEXT h; RPC_BINDING_HANDLE binding; @@ -714,8 +696,7 @@ } } -void -s_get_numbers(int length, int size, pints_t n[]) +void __cdecl s_get_numbers(int length, int size, pints_t n[]) { int i; for (i = 0; i < length; i++) @@ -727,8 +708,7 @@ } } -void -s_get_numbers_struct(numbers_struct_t **ns) +void __cdecl s_get_numbers_struct(numbers_struct_t **ns) { int i; *ns = midl_user_allocate(FIELD_OFFSET(numbers_struct_t, numbers[5])); @@ -745,23 +725,20 @@ *(*ns)->numbers[0].pi = 5; } -void -s_full_pointer_test(int *a, int *b) +void __cdecl s_full_pointer_test(int *a, int *b) { ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a); ok(*b == 42, "Expected *b to be 42 instead of %d\n", *a); ok(a == b, "Expected a (%p) to point to the same memory as b (%p)\n", a, b); } -void -s_full_pointer_null_test(int *a, int *b) +void __cdecl s_full_pointer_null_test(int *a, int *b) { ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a); ok(b == NULL, "Expected b to be NULL instead of %p\n", b); } -void -s_stop(void) +void __cdecl s_stop(void) { ok(RPC_S_OK == RpcMgmtStopServerListening(NULL), "RpcMgmtStopServerListening\n"); ok(RPC_S_OK == RpcServerUnregisterIf(NULL, NULL, FALSE), "RpcServerUnregisterIf\n"); @@ -815,6 +792,7 @@ short h; char c; int x; + hyper y; str_struct_t ss = {string}; wstr_struct_t ws = {wstring}; str_t str; @@ -824,7 +802,22 @@ ok(int_return() == INT_CODE, "RPC int_return\n"); ok(square(7) == 49, "RPC square\n"); - ok(sum(23, -4) == 19, "RPC sum\n"); + x = sum(23, -4); + ok(x == 19, "RPC sum got %d\n", x); + c = sum_char(-23, 50); + ok(c == 27, "RPC sum_char got %d\n", (int)c); + h = sum_short(1122, -344); + ok(h == 778, "RPC sum_short got %d\n", (int)h); + x = sum_float(123.45, -32.2); + ok(x == 91, "RPC sum_float got %d\n", x); + x = sum_double_int(-78, 148.46); + ok(x == 70, "RPC sum_double_int got %d\n", x); + y = sum_hyper((hyper)0x12345678 << 16, (hyper)0x33557799 << 16); + ok(y == (hyper)0x4589ce11 << 16, "RPC hyper got %x%08x\n", (DWORD)(y >> 32), (DWORD)y); + x = sum_hyper_int((hyper)0x24242424 << 16, -((hyper)0x24241212 << 16)); + ok(x == 0x12120000, "RPC hyper_int got 0x%x\n", x); + x = sum_char_hyper( 12, ((hyper)0x42424242 << 32) | 0x33334444 ); + ok(x == 0x33334450, "RPC char_hyper got 0x%x\n", x); x = 0; square_out(11, &x); @@ -1119,7 +1112,7 @@ puints_t pus; cpuints_t cpus; short bstr_data[] = { 5, 'H', 'e', 'l', 'l', 'o' }; - bstr_t bstr = &bstr_data[1]; + bstr_t bstr = &bstr_data[1], bstr2; name_t name; void *buffer; int *pa2; @@ -1167,6 +1160,12 @@ ok(hash_bstr(bstr) == s_hash_bstr(bstr), "RPC hash_bstr_data\n"); + get_a_bstr(&bstr); + s_get_a_bstr(&bstr2); + ok(!lstrcmpW((LPCWSTR)bstr, (LPCWSTR)bstr2), "bstr mismatch\n"); + HeapFree(GetProcessHeap(), 0, bstr - 1); + HeapFree(GetProcessHeap(), 0, bstr2 - 1); + free_list(list); if (!old_windows_version) @@ -1352,6 +1351,69 @@ HeapFree(GetProcessHeap(), 0, pi); } +void __cdecl s_authinfo_test(unsigned int protseq, int secure) +{ + RPC_BINDING_HANDLE binding; + RPC_STATUS status; + ULONG level, authnsvc; + RPC_AUTHZ_HANDLE privs; + unsigned char *principal; + + binding = I_RpcGetCurrentCallHandle(); + ok(binding != NULL, "I_RpcGetCurrentCallHandle returned NULL\n"); + + level = authnsvc = 0xdeadbeef; + privs = (RPC_AUTHZ_HANDLE)0xdeadbeef; + principal = (unsigned char *)0xdeadbeef; + + if (secure || protseq == RPC_PROTSEQ_LRPC) + { + status = RpcBindingInqAuthClientA(binding, &privs, &principal, &level, &authnsvc, NULL); + if (status == RPC_S_CANNOT_SUPPORT) + { + win_skip("RpcBindingInqAuthClientA not supported\n"); + return; + } + ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + ok(privs != (RPC_AUTHZ_HANDLE)0xdeadbeef, "privs unchanged\n"); + ok(principal != (unsigned char *)0xdeadbeef, "principal unchanged\n"); + if (protseq != RPC_PROTSEQ_LRPC) + { + todo_wine + ok(principal != NULL, "NULL principal\n"); + } + if (protseq == RPC_PROTSEQ_LRPC && principal && pGetUserNameExA) + { + int len; + char *spn; + + len = WideCharToMultiByte(CP_ACP, 0, (const WCHAR *)privs, -1, NULL, 0, NULL, NULL); + spn = HeapAlloc( GetProcessHeap(), 0, len ); + WideCharToMultiByte(CP_ACP, 0, (const WCHAR *)privs, -1, spn, len, NULL, NULL); + + ok(!strcmp(domain_and_user, spn), "expected %s got %s\n", domain_and_user, spn); + HeapFree( GetProcessHeap(), 0, spn ); + } + ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "level unchanged\n"); + ok(authnsvc == RPC_C_AUTHN_WINNT, "authnsvc unchanged\n"); + + status = RpcImpersonateClient(NULL); + ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + status = RpcRevertToSelf(); + ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + + } + else + { + status = RpcBindingInqAuthClientA(binding, &privs, &principal, &level, &authnsvc, NULL); + ok(status == RPC_S_BINDING_HAS_NO_AUTH, "expected RPC_S_BINDING_HAS_NO_AUTH got %u\n", status); + ok(privs == (RPC_AUTHZ_HANDLE)0xdeadbeef, "got %p\n", privs); + ok(principal == (unsigned char *)0xdeadbeef, "got %s\n", principal); + ok(level == 0xdeadbeef, "got %u\n", level); + ok(authnsvc == 0xdeadbeef, "got %u\n", authnsvc); + } +} + static void run_tests(void) { Modified: branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/server.idl URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/server.idl [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/rpcrt4/server.idl [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -31,9 +31,7 @@ [ uuid(00000000-4114-0704-2301-000000000000), -#ifndef __midl implicit_handle(handle_t IServer_IfHandle) -#endif ] interface IServer { @@ -81,6 +79,13 @@ int int_return(void); int square(int x); int sum(int x, int y); + signed char sum_char(signed char x, signed char y); + short sum_short(short x, short y); + int sum_float(float x, float y); + int sum_double_int(int x, double y); + hyper sum_hyper(hyper x, hyper y); + int sum_hyper_int(hyper x, hyper y); + int sum_char_hyper(signed char x, hyper y); void square_out(int x, [out] int *y); void square_ref([in, out] int *x); int str_length([string] const char *s); @@ -157,7 +162,7 @@ int sum_cs(cs_t *cs); int sum_cps(cps_t *cps); int sum_cpsc(cpsc_t *cpsc); - int sum_complex_array(int n, refpint_t pi[n]); + int sum_complex_array(int n, [size_is(n)] refpint_t pi[]); typedef [wire_marshal(int)] void *puint_t; int square_puint(puint_t p); @@ -311,7 +316,7 @@ typedef [unique] user_bstr_t *wire_bstr_t; typedef [wire_marshal(wire_bstr_t)] short *bstr_t; unsigned hash_bstr(bstr_t s); - + void get_a_bstr([out]bstr_t *s); typedef struct { [string, size_is(size)] char *name; Modified: branches/GSoC_2011/KMTestSuite/winetests/shdocvw/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/shdocvw/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/shdocvw/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -11,7 +11,7 @@ testlist.c) add_executable(shdocvw_winetest ${SOURCE}) -target_link_libraries(shdocvw_winetest wine) +target_link_libraries(shdocvw_winetest wine uuid) set_module_type(shdocvw_winetest win32cui) add_importlibs(shdocvw_winetest gdi32 shell32 ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET shdocvw_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/urlmon/protocol.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/urlmon/protocol.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/urlmon/protocol.c [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -3442,6 +3442,12 @@ { HMODULE hurlmon; + if(!winetest_interactive) + { + skip("protocol test skipped, bug 6381\n"); + return; + } + hurlmon = GetModuleHandle("urlmon.dll"); pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession"); pReleaseBindInfo = (void*) GetProcAddress(hurlmon, "ReleaseBindInfo"); Modified: branches/GSoC_2011/KMTestSuite/winetests/ws2_32/sock.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/ws2_32/sock.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/ws2_32/sock.c [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1310,7 +1310,7 @@ ok(ret != SOCKET_ERROR, "WSAEnumProtocolsA failed, last error is %d\n", WSAGetLastError()); - if (ret == 0) { + if (ret <= 0) { skip("No protocols enumerated.\n"); HeapFree(GetProcessHeap(), 0, pi); return; Modified: branches/GSoC_2011/KMTestSuite/winetests/xmllite/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/xmllite/CMakeLists.txt [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/xmllite/CMakeLists.txt [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -1,10 +1,13 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) add_executable(xmllite_winetest reader.c testlist.c) target_link_libraries(xmllite_winetest wine) + +if(MSVC) + target_link_libraries(xmllite_winetest uuid) +endif() + set_module_type(xmllite_winetest win32cui) add_importlibs(xmllite_winetest xmllite ole32 msvcrt kernel32 ntdll) add_cd_file(TARGET xmllite_winetest DESTINATION reactos/bin FOR all) Modified: branches/GSoC_2011/KMTestSuite/winetests/xmllite/reader.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/KMTestSuite/winetests…
============================================================================== --- branches/GSoC_2011/KMTestSuite/winetests/xmllite/reader.c [iso-8859-1] (original) +++ branches/GSoC_2011/KMTestSuite/winetests/xmllite/reader.c [iso-8859-1] Tue Aug 16 20:51:21 2011 @@ -32,8 +32,8 @@ DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda); -HRESULT WINAPI (*pCreateXmlReader)(REFIID riid, void **ppvObject, IMalloc *pMalloc); -HRESULT WINAPI (*pCreateXmlReaderInputWithEncodingName)(IUnknown *stream, +HRESULT (WINAPI *pCreateXmlReader)(REFIID riid, void **ppvObject, IMalloc *pMalloc); +HRESULT (WINAPI *pCreateXmlReaderInputWithEncodingName)(IUnknown *stream, IMalloc *pMalloc, LPCWSTR encoding, BOOL hint,
13 years, 3 months
1
0
0
0
[cgutman] 53272: [ACPI] - Fix massive memory corruption during FDO device relations handling
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Aug 16 20:48:18 2011 New Revision: 53272 URL:
http://svn.reactos.org/svn/reactos?rev=53272&view=rev
Log: [ACPI] - Fix massive memory corruption during FDO device relations handling Modified: trunk/reactos/drivers/bus/acpi/pnp.c Modified: trunk/reactos/drivers/bus/acpi/pnp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/pnp.c?rev…
============================================================================== --- trunk/reactos/drivers/bus/acpi/pnp.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/pnp.c [iso-8859-1] Tue Aug 16 20:48:18 2011 @@ -193,7 +193,7 @@ // length = sizeof(DEVICE_RELATIONS) + - ((numPdosPresent + prevcount) * sizeof (PDEVICE_OBJECT)) -1; + (((numPdosPresent + prevcount) - 1) * sizeof (DEVICE_OBJECT)); relations = (PDEVICE_RELATIONS) ExAllocatePoolWithTag (PagedPool, length, 'IPCA'); @@ -214,7 +214,7 @@ // if (prevcount) { RtlCopyMemory (relations->Objects, oldRelations->Objects, - prevcount * sizeof (PDEVICE_OBJECT)); + prevcount * sizeof (DEVICE_OBJECT)); } relations->Count = prevcount + numPdosPresent;
13 years, 3 months
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
50
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Results per page:
10
25
50
100
200