Commit graph

190 commits

Author SHA1 Message Date
Thomas Faber a9805facab [KMTESTS:MM]
- Skip NtCreateSection tests since they hang on testbot.
ROSTESTS-248

svn path=/trunk/; revision=73227
2016-11-13 16:42:16 +00:00
Thomas Faber ce14a59aa5 [KMTESTS:RTL]
- Silence a GCC5+ warning
CORE-11794

svn path=/trunk/; revision=73224
2016-11-13 12:19:05 +00:00
Pierre Schweitzer 2fdacdbbd6 [KMTESTS:MM]
Bugfix for IRP_MJ_SET_INFORMATION/FileEndOfFileInformation: really set the information. The test still works fine in Windows and still fails hard in ReactOS.

svn path=/trunk/; revision=73200
2016-11-11 10:44:51 +00:00
Pierre Schweitzer 6db40277dc [KMTESTS:MM]
Add tests for the NtCreateSection functions which mimic some of the behavior that can be exposed by FSDs (late init, too small files, and so on).
It was designed in W2K3.

svn path=/trunk/; revision=73198
2016-11-10 21:02:48 +00:00
Thomas Faber 42ce59cdd2 [KMTESTS]
- Complete IRPs with STATUS_INVALID_DEVICE_REQUEST by default.
CORE-12295 #resolve

svn path=/trunk/; revision=73153
2016-11-06 15:26:39 +00:00
Thomas Faber 52adca06a9 [KMTESTS:RTL]
- Add a test checking stack frame correctness in a nested __finally handler
CORE-12283

svn path=/trunk/; revision=73148
2016-11-06 09:31:09 +00:00
Hermès Bélusca-Maïto 15d77be6fd [NTOS]
- accesschk.c: Remove redundant SepAccessCheck/SepAccessCheckEx pair of private functions; instead just rename SepAccessCheckEx into SepAccessCheck and use it directly in the code. NOTE: SepAccessCheck is *incomplete* (in particular it doesn't retrieve the information needed to initialize the 'Privileges' parameter).
- sid.c: Comments formatting fix.
- token.c:
  * Finish to implement SeQueryInformationToken . This function is really the same as NtQueryInformationToken but without all the stuff needed for user-mode buffer access protection.
  * Some code simplifications in NtQueryInformationToken.
  I need this to fix a "FIXME: Use SeQueryInformationToken" in some code I'm also fixing (& commit later).

[NDK]: Fix parameter types and add annotations to RtlCopySidAndAttributesArray.

[KMTESTS:NTOS_SE]
- Reenable the 'SeQueryInfoToken' test.
- Show that SeQueryInformationToken doesn't support 4 token information classes, which are supported only by NtQueryInformationToken.
- Fix calling of SeAccessCheck. In particular the 'Privileges' parameter is not allocated by the caller, but instead is allocated by SeAccessCheck *and* returned to the caller (who then must free the buffer using SeFreePrivileges). This fixes the encountered BSODs that leaded to disabling preventively the test in r59178.
- Minor code cleaning.

svn path=/trunk/; revision=73122
2016-11-04 17:52:32 +00:00
Thomas Faber ba1509ef9e [KMTESTS:IO]
- Add a test case for trying to open a file "inside" a file to IoFilesystem
ROSTESTS-135

svn path=/trunk/; revision=73058
2016-10-29 11:20:58 +00:00
Thomas Faber 14a0d23f4c [KMTESTS:OB]
- Add a test for the NT directory structure's ACLs
CORE-9184

svn path=/trunk/; revision=72976
2016-10-17 09:28:15 +00:00
Thomas Faber 6031bd0162 [KMTESTS:IO]
- Add a test for the maximum data length for MDLs
CORE-12132

svn path=/trunk/; revision=72964
2016-10-13 12:28:01 +00:00
Dmitry Chapyshev abdc65593f [KMTEST]
- Add null-pointer test for RtlIsValidOemCharacter

svn path=/trunk/; revision=72581
2016-09-04 23:15:08 +00:00
Dmitry Chapyshev 1a8c432587 [KMTEST]
- Implement tests for RtlIsValidOemCharacter function

svn path=/trunk/; revision=72579
2016-09-04 22:15:53 +00:00
Pierre Schweitzer 72eefb7a68 [KMTESTS:FSRTL]
Add a stress test for tunnel cache implementation, where we have fun adding duplicated entries.
It doesn't seem to go well.
These tests are also known as "Learn your English ordinals", or as "Learn how to count in English". My pleasure.

CORE-11819

svn path=/trunk/; revision=72192
2016-08-10 20:50:36 +00:00
Pierre Schweitzer f27ecf0960 [KMTESTS:CC]
New test case which is matching the MS FastFAT CcCopyRead (minus the offset) and shows clearly the issue in our Cc.
It also shows that my hack is utterly broken :-).

CORE-11003
CORE-11819

svn path=/trunk/; revision=72182
2016-08-10 07:39:20 +00:00
Pierre Schweitzer b7586c0478 [KMTESTS:CC]
It seems we're page-aligned.

CORE-11003

svn path=/trunk/; revision=72170
2016-08-09 20:52:38 +00:00
Pierre Schweitzer dfdbabb521 [KMTESTS:CC]
Modify a bit the read test so that it actually fails in ReactOS. It instructs us that when it comes to file boundaries, our Cc fails to properly align read (whereas it should!).
This is the behavior exposed by the MS FastFAT.

CORE-11003
CORE-11819

svn path=/trunk/; revision=72169
2016-08-09 20:46:00 +00:00
Pierre Schweitzer 22f90f2210 [KMTESTS:CC]
Complete the tests for Cc: not only check for alignment, but also check that expected data are returned.
Thanks to Thomas for his help on this :-).

CORE-11003

svn path=/trunk/; revision=72165
2016-08-09 12:43:18 +00:00
Pierre Schweitzer 9c749a7606 [KMTESTS]
Add missing dependency

svn path=/trunk/; revision=72019
2016-07-27 16:40:30 +00:00
Thomas Faber 31ac33cd43 [KMTESTS]
- Addendum to r71770
CORE-11509

svn path=/trunk/; revision=71773
2016-07-03 09:23:37 +00:00
Thomas Faber 8e4e756180 [KMTESTS:OB]
- Add a test for ZwCreateSymbolicLinkObject/ZwQuerySymbolicLinkObject
CORE-11509

svn path=/trunk/; revision=71770
2016-07-03 08:31:28 +00:00
Pierre Schweitzer 4de2debfbb [KMTESTS:CC]
Introduce tests for Cc :-)
Currently, we only test CcCopyRead for specific alignment matters. It shows that under certain conditions, our Cc doesn't align reads it does, leading to later failure in disk.sys.
This reproduces an error observed with MS FastFAT in ReactOS.

CORE-11003

svn path=/trunk/; revision=71445
2016-05-28 19:59:10 +00:00
Thomas Faber 412f0d26d0 [NTOS:EX]
- Use the calling thread instead of the passed-in thread to validate APC status in ExReleaseResourceForThreadLite. The latter can be user-set and might not be a KTHREAD at all.
CORE-11315 #resolve

svn path=/trunk/; revision=71398
2016-05-25 10:27:17 +00:00
Pierre Schweitzer fff779dd5b [KMTESTS]
Add test for ExSetResourceOwnerPointer() and ExReleaseResourceForThreadLite()

CORE-11310

svn path=/trunk/; revision=71395
2016-05-24 08:13:17 +00:00
Thomas Faber c2cc2ba3be [NTOS:SE]
- In SepPropagateAcl, gracefully handle unknown ACE types by simply copying them.
CORE-10694 #resolve

svn path=/trunk/; revision=71296
2016-05-09 08:49:18 +00:00
Amine Khaldi 248dcd328b * Addendum to r71184. CORE-9111
svn path=/trunk/; revision=71185
2016-04-20 12:39:37 +00:00
Pierre Schweitzer 909eb635f2 [KMTESTS:FSRTL]
Add more failing tests for MCB. These are pretty basics and deal with holes.
They are pretty handy to show how broken the current MCB implementation is, in regard to holes management: it fails at properly counting runs when there are holes and it creates virtual runs (hence the broken count) for each hole. This shouldn't happen.

CORE-11002

svn path=/trunk/; revision=71177
2016-04-17 21:17:49 +00:00
Pierre Schweitzer d814167aba [KMTESTS:FSRTL]
Add more non-failing tests

CORE-11002

svn path=/trunk/; revision=71162
2016-04-15 19:43:12 +00:00
Pierre Schweitzer 4d3121a2c1 [KMTESTS:FSRTL]
Add a simple test for FsRtlAddLargeMcbEntry() which shows how hard it's broken... Not only it doesn't support mismatching LBNs, but it also replaces current mapping with broken one

CORE-11002

svn path=/trunk/; revision=71141
2016-04-10 18:02:04 +00:00
Timo Kreuzer bb8967851b [KMTEST] Improve test output
svn path=/trunk/; revision=71094
2016-04-03 14:05:58 +00:00
Pierre Schweitzer b37377e363 [KMTESTS:FSRTL]
Add more tests for LargeMcb functions.

These are not invented but real cases: they are extracted from Ext2Fsd driver attempting to read a file from disk. The read file in ReactOS is totally corrupted.

This shows how broken our current MCB implementation is. And unfortunately confirms CORE-11002.
I recommend not to import any other FSDs relying on MCB as long as this is not fixed (eg. CORE-11040); it makes them pretty pointless.

CORE-11002

svn path=/trunk/; revision=71091
2016-04-03 10:25:32 +00:00
Pierre Schweitzer ef0b98d6fb [KMTESTS]
- Define a new macro function KmtGetSystemOrEmbeddedRoutineAddress() which is to be used to get a function address from Mm if it exists system-wide or to fallback to embedded function if it doesn't exist
- Use this mechanism to add tests for the newly implemented FsRtlRemoveDotsFromPath() which is Vista+.

That allows, with a single build (and thus, same binaries), testing a function in ReactOS and in Windows. 

svn path=/trunk/; revision=71046
2016-03-25 18:53:43 +00:00
Thomas Faber 7a677edbeb [KMTESTS:FSRTL]
- Add tests for FsRtlDissectName/FsRtlDissectDbcs and FsRtlIsFatDbcsLegal/FsRtlIsHpfsDbcsLegal

svn path=/trunk/; revision=70226
2015-12-01 14:22:17 +00:00
Thomas Faber 4cf4eebb95 [KMTESTS:IO]
- Add more path open tests
- Also test creating files
CORE-10483

svn path=/trunk/; revision=70209
2015-11-29 19:11:35 +00:00
Thomas Faber 187db82af7 [KMTESTS:IO]
- Add a test for FileAllInformation

svn path=/trunk/; revision=69897
2015-11-16 13:53:03 +00:00
Thomas Faber 57dd4b34c7 [KMTESTS:IO]
- Add a test trying assorted path variations to open files
CORE-10483

svn path=/trunk/; revision=69878
2015-11-12 13:13:54 +00:00
Thomas Faber 8160fdc383 [KMTESTS:IO]
- Add a test verifying that opening a file using different parent directories still yields handles to the same file
CORE-10483

svn path=/trunk/; revision=69877
2015-11-12 12:55:26 +00:00
Thomas Faber 28c1e663f3 [KMTESTS:IO]
- Add some basic parameter tests for IoSetDeviceInterfaceState
CORE-9456

svn path=/trunk/; revision=69722
2015-10-27 12:14:10 +00:00
Thomas Faber 44cc9aa006 [KMTESTS:OB]
- Add a test showing that I was wrong and ZwDuplicateObject can get you a kernel handle after all
CORE-10207

svn path=/trunk/; revision=69570
2015-10-17 17:41:43 +00:00
Thomas Faber 7983137edd [KMTESTS:OB]
- Move handle tests from ObReference to ObHandle where they belong

svn path=/trunk/; revision=69568
2015-10-17 16:11:12 +00:00
Thomas Faber 1ac16d7595 [KMTESTS]
- Sssh, these tests are secret

svn path=/trunk/; revision=69567
2015-10-17 15:56:52 +00:00
Thomas Faber 8661787353 [KMTESTS:OB]
- Add ObHandle test that verifies a couple ZwDuplicateObject behaviors 

svn path=/trunk/; revision=69566
2015-10-17 15:50:25 +00:00
Thomas Faber c0cd33da02 [NTOS:PO]
- Pass the correct DeviceObject to PoRequestPowerIrp's callback
- Use the IRP stack to store callback parameters instead of a pool allocation as shown by the test

svn path=/trunk/; revision=69503
2015-10-11 19:57:06 +00:00
Thomas Faber 5e05f2675b [KMTESTS:PO]
- Fix build

svn path=/trunk/; revision=69500
2015-10-11 17:11:53 +00:00
Thomas Faber 073a2904ca [KMTESTS:PO]
- Add a test for PoRequestPowerIrp

svn path=/trunk/; revision=69499
2015-10-11 17:06:14 +00:00
Pierre Schweitzer 5dc58d234a [KMTESTS:IO]
[KMTESTS:OB]
Simplify kernel mode thread creation

svn path=/trunk/; revision=69417
2015-09-29 18:43:35 +00:00
Thomas Faber 0f64d20e8a [CRT]
- Add "memcmp" library that is used by kernel drivers to get memcmp/RtlEqualMemory
CORE-10285 #resolve

svn path=/trunk/; revision=69413
2015-09-29 17:24:48 +00:00
Pierre Schweitzer 3ee5af9d50 [KMTESTS:OB]
Add a test dedicated to Stefan.

svn path=/trunk/; revision=69398
2015-09-28 12:25:38 +00:00
Pierre Schweitzer 549ecc5195 [KMTESTS:IO]
Add more tests for IoCreateFile(), this time purely dealing with symlinks reparse points.
They won't run on ReactOS (obviously) as we don't have RW NTFS support.

On Windows, they show interesting results....
With Windows 2003, creating the symlink is allowed and works, but then Windows is totally unable to deal with it and keeps complaining about an unhandled reparse tag.
The only way to open it is to open the reparse point itself. Not that working symlinks... Not sure which part is not able to handle the said reparse tag. NTFS? Io?
With Windows Vista+, it just works fine. Symlink is created & functionnal.

Broken logic!

svn path=/trunk/; revision=69353
2015-09-25 15:57:28 +00:00
Pierre Schweitzer f44942d42f [KMTESTS:IO]
- Properly free handles in driver (spotted by Thomas)
- Remove dead code in driver (spotted by Thomas)
- Send an IOCTL to stop on symlinks to allow more precise tests

svn path=/trunk/; revision=69336
2015-09-23 21:30:22 +00:00
Pierre Schweitzer 9e06c66b38 [KMTESTS:IO]
Extend the IoCreateFile tests with two parts tests.
First part properly checks for opening/reparse handling on mount points (and ideally on symlinks, see below).
The other part checks for proper handling of the IO_STOP_ON_SYMLINK parameter.

Regarding symlink, I'm clearly not convinced that what I did is correct (hence the failure on both W2K3 & ROS). It seems to me that symlink resolution is up to the FSD and not to IO which only handles mount point traversal.
If someone (Alex?) can confirm/infirm and give more insight, that's more than welcome.

svn path=/trunk/; revision=69322
2015-09-22 22:31:08 +00:00