Finally merge my branch "colins-printing-for-freedom", giving us an initial implementation of a Win32-compatible Printing Stack (localmon, localspl, spoolss, spoolsv, winspool)
You can now send raw data to parallel port printers using documented Win32 API. An example application is in my "winspool_print" commandline tool merged to rosapps.
ReactOS folks, thanks for your support during the development of this, making my bachelor's thesis a reality! :)
Documentation/Thesis: https://svn.reactos.org/reactos/trunk/documentation/articles/Printing%20Stack%20Thesis/thesis.pdf
Video: https://www.youtube.com/watch?v=cNzePucTOLY
CORE-10489
svn path=/trunk/; revision=73039
- Improve the checks done for the tests;
- Add a new test (Test7) that tests the allowed console window sizes wrt. the csbi.dwMaximumWindowSize size.
svn path=/trunk/; revision=72985
- Extend GetUserObjectInformation tests by adding tests for UOI_NAME on the default as well as custom window stations/desktops.
CORE-12073
svn path=/trunk/; revision=72900
- Add a test for RegEnumKeyExW showing that it should return ERROR_MORE_DATA instead of ERROR_BUFFER_OVERFLOW when the name buffer is too small. Based on a patch by Doug Lyons.
CORE-12030
svn path=/trunk/; revision=72876
Most of the code is from Katayama Hirofumi MZ, the placement new / delete is written by me, based on a hint from Giannis.
svn path=/trunk/; revision=72688
RtlGenerate8dot3Name: show that we don't deal correctly with checksums while generating short names.
Dedicated to Christoph
svn path=/trunk/; revision=72666
- Fix copypasta
[NTUSER]
- User's buffer has to be checked before check of size parameters, differently we cannot safely check the sizes of structures
svn path=/trunk/; revision=72636
- SdbGetMatchingExe, SdbInitDatabase partial implementation by Mislav Blažević
- Tests by me, they pass on vista - win10. (Win2k3 has another struct layout)
- Move shared test functions to a common header
- SdbTagRefToTagID misses functionality related to multiple databases, but that is not supported anywhere yet.
svn path=/trunk/; revision=72549
- Implement IS_TEXT_UNICODE_ILLEGAL_CHARS and IS_TEXT_UNICODE_ASCII16 flags
* It fixes 7 tests for the IsTextUnicode function in advapi32_apitest. All tests passed now
svn path=/trunk/; revision=72486
- Tests focus mainly on loading + saving images.
- The implementation is not perfect yet, see CImage_WIP.txt for test results.
- The GDI+ functions should be fixed before this test can pass fully, MS' ATL fails in ReactOS, but passes on Windows.
svn path=/trunk/; revision=72332
- Fix the tests so that they test what they have to test, on ReactOS & Windows 2k3/XP. (Note that here, ReactOS used the more restrained event size limitations of Vista+ compared to those of Win2k3. I choose to test, and will implement, the size limitations of Win2k3.)
- Choose a different name for the test such that it doesn't collide with the 'eventlog' test from advapi32_winetest.
CORE-11838 CORE-11839
svn path=/trunk/; revision=72209
- Add a test for DnsQuery. Patch by Víctor Martínez Calvo, with additional tests and fixes by me.
ROSTESTS-226 #resolve
svn path=/trunk/; revision=71709
- Add a test for CShellLink GetPath/SetPath behavior with environment variables. Patch by Andreas Maier.
ROSTESTS-229 #resolve
svn path=/trunk/; revision=71672
- Implement VersionLie shims
- Add tests for the VersionLie shims
- update get_host_winver prototype (thanks to Thomas for pointing out my err)
We cannot apply this shim yet, since a required part of the infrastructure is missing.
svn path=/trunk/; revision=71442
- Add tests for ACListISF.
- Change the SHExplorerParseCmdLine test to use GetProcAddress instead of relying on the import (it's not there anymore in NT 6.0+)
svn path=/trunk/; revision=71345
- Add a list of hardcoded tags, for all versions up to win7 they are checked against windows.
- Update SdbTagToString with a few missing strings
- Hardcode the used version to Win7 for now, as backporting these strings would not make much sense.
svn path=/trunk/; revision=71200
- Add an apitest for our delayload functions.
- Improve the delayload (mainly the failure cases, throw exceptions where expected etc).
- Add some tests for advanced delayload features (currently blocked on CORE-6504 and CORE-10957)
svn path=/trunk/; revision=71190
- Add tests for IShellFolder::CompareIDs. Patch by Mark Jansen, with additional test cases by Sylvain Deverre.
CORE-10747
svn path=/trunk/; revision=71064
Set correct locale in RtlGenerate8dot3Name test.
This makes the test reproducible on every target plateform.
Patch by Mark Jansen.
ROSTESTS-218 #resolve #comment Patch commited in r71027. Thanks!
svn path=/trunk/; revision=71027
Additional tests show that IsValidDevmodeA/W actually does a lot more than I previously thought.
Implement the missing known features and test this little function to death in winspool_apitest to cover each and every possible call.
They pass on ReactOS, Windows Server 2003 and Windows 8.1.
Credits and many thanks go to Mark Jansen for the additional tests!
svn path=/branches/colins-printing-for-freedom/; revision=70595
Add and fully implement IsValidDevmodeA and IsValidDevmodeW.
[WINSPOOL_APITEST]
Add tests for IsValidDevmodeA and IsValidDevmodeW covering the entire functions.
svn path=/branches/colins-printing-for-freedom/; revision=70503
Export NtUserGetClassInfoEx (as it's called in 2k3) both as NtUserGetClassInfo (as it's called on XP) and NtUserGetClassInfo. They have the same prototype.
svn path=/trunk/; revision=70463
- "Fix" an export name: NtUserGetClassInfoEx on 2k3 is the same as NtUserGetClassInfo on XP (note that we currently use the default, aka ros specific, win32kdll on the WHS testbot, but it's mostly identical.
[WIN32KNT_APITEST]
- Fix a typo
- add missing tests to testlist.c
svn path=/trunk/; revision=70462
- Convert win32k native api test to actual wine style api-tests
- Hack around a bit with the win32k dlls, some renaming, etc.
- Delete old apitest stuff
svn path=/trunk/; revision=70458
Add another test for strlen, that tests, whether the direction flag in ELFAGS has been modified. While clearing it is legitimate to do according to the ABI, the native implementation does not change it, so we don't want to do it either.
svn path=/trunk/; revision=70429
- disable GCC builtins
- Add simple tests for strlen, showing that a NULL pointer will cause an access violation, which is broken in our asm implementation
svn path=/trunk/; revision=70427
Rewrite the two existing tests for ICMP and add a third one (for IPv6).
Patch by Tim Crawford.
ROSTESTS-212 #resolve #comment Commited in r70367. Thanks!
svn path=/trunk/; revision=70367
Add another check that shows that data returned by GetAdaptersAddresses() are incomplete and thus broken...
"This isn't the type you're looking for." would say an old man
svn path=/trunk/; revision=70290
Add a new apitest for iphlpapi.dll.
It includes tests for testing the SendARP() and its underlying IOCTL.
Tested against W2K3.
Obviously, most of these tests fail on ReactOS.
svn path=/trunk/; revision=70210
Add more tests for RtlGenerate8dot3Name().
Not sure how many more are failing in ReactOS: they all pass in my WC (teasing :-))
CORE-10223
svn path=/trunk/; revision=69388
Add a test for CORE-10188 (which was fixed by Thomas in r69236).
It is based on Nikita Pechenkin's patch with a few modifications by me to avoid race condition on start (and avoid flappy test) and to match more closely our coding style
ROSTESTS-190 #resolve #comment Committed in r69351. Thanks!
svn path=/trunk/; revision=69351
-include the testdata in all targets
-load it from the correct path even when the application is using a different working directory
svn path=/trunk/; revision=68623
- Add a test for SystemFlagsInformation that demonstrates the parameter checks performed by NtQuerySystemInformation/NtSetSystemInformation
CORE-9849
svn path=/trunk/; revision=68225
- Add a test showing that repeated calls to SHGetDesktopFolder return pointers to the same object, and that its CreateViewObject method instead creates new objects.
CORE-9839
svn path=/trunk/; revision=68200
Put the calls that eventually give us the function pointers to localspl into a separate procedure GetLocalsplFuncs to enable further tests easily.
svn path=/branches/colins-printing-for-freedom/; revision=68194
It's only the second disabled test, which is causing trouble for us, so reactivate the first one.
This also confirms that the problem is not related to SEH.
svn path=/branches/colins-printing-for-freedom/; revision=68104
- Add more tests for fpEnumPrinters.
For some reason, using SEH here works only once. We experience a hang in the testing process when you run the test again for a second time without restarting spoolsv. Needs more investigation.
- Ensure that the spooler service is running before starting any testing.
- Do proper cleanup in every case.
[LOCALSPL]
- Implement LocalEnumPrinters level 1 based on the API-Tests.
- Use DllAllocSplMem/DllFreeSplMem instead of HeapAlloc/HeapFree.
- Use AllocSplStr with DllFreeSplStr now that DuplicateStringW is gone.
- Use _countof where applicable.
[SPOOLSS]
- Found out that I was not the only one needing a wcsdup equivalent. My DuplicateStringW from localspl is actually exported as AllocSplStr in spoolss.
This is actually part of a range of undocumented memory functions in spoolss, so implement and document AllocSplStr, DllAllocSplMem, DllFreeSplMem, DllFreeSplStr, ReallocSplMem and ReallocSplStr.
Information about some of them was gathered through black box testing and DDK samples (down to Win95 DDK), which at least contained prototypes of them.
- Implement SplInitializeWinSpoolDrv based on the API-Test and simply return FALSE for SplIsUpgrade.
[SPOOLSS_APITEST]
- Add a test for ReallocSplStr, which was actually the most undocumented function of spoolss' memory functions.
[WINSPOOL]
SplInitializeWinSpoolDrv shows that we can't just auto-assign an ordinal to all winspool.drv functions. We even need to export some nameless functions by ordinal only.
Redo the whole .spec file based on the ordinals found in Windows Server 2003's winspool.drv. Trust WINE for the nameless stubs.
svn path=/branches/colins-printing-for-freedom/; revision=68089
Write an API-Test for localspl.dll. As the original localspl.dll from Windows Server 2003 relies on proper initialization inside spoolsv.exe, we cannot test it standalone as usual.
To make testing possible anyway, this program basically does four things:
- Injecting our testing code into spoolsv.exe.
- Registering and running us as a service in the SYSTEM security context like spoolsv.exe, so that injection is possible at all.
- Sending the test name and receiving the console output over named pipes.
- Redirecting the received console output to stdout again, so it looks and feels like a standard API-Test.
Nevertheless, the testing code in fpEnumPrinters.c is still written like a usual test. The known ok(), skip(), etc. macros can be used as usual, their output is just redirected through the named pipes.
Thanks to Thomas for giving me the tip about injecting code into spoolsv! :)
svn path=/branches/colins-printing-for-freedom/; revision=68080