sys: rename DEBUGRANDTEST to DEBUGTEST

This commit is contained in:
Bill Zissimopoulos 2016-03-04 15:41:53 -08:00
parent 84be6692b8
commit b4160f4aac
7 changed files with 13 additions and 13 deletions

View File

@ -165,7 +165,7 @@ static VOID FspFsvolCleanupRequestFini(FSP_FSCTL_TRANSACT_REQ *Request, PVOID Co
/* FileNode is Shared Full; reacquire as Exclusive Main for CcUnitializeCacheMap */
FspFileNodeReleaseOwner(FileNode, Full, Request);
Success = DEBUGRANDTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Main);
Success = DEBUGTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Main);
if (!Success)
{
/* oh, maaan! we now have to do delayed uninitialize! */

View File

@ -425,7 +425,7 @@ NTSTATUS FspFsvolCreatePrepare(
FileObject = FspIopRequestContext(Request, RequestFileObject);
/* lock the FileNode for overwriting */
Success = DEBUGRANDTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Full);
Success = DEBUGTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Full);
if (!Success)
{
FspIopRetryPrepareIrp(Irp, &Result);
@ -698,7 +698,7 @@ static NTSTATUS FspFsvolCreateTryOpen(PIRP Irp, const FSP_FSCTL_TRANSACT_RSP *Re
FSP_FSCTL_TRANSACT_REQ *Request = FspIrpRequest(Irp);
BOOLEAN Success;
Success = DEBUGRANDTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Main);
Success = DEBUGTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Main);
if (!Success)
{
/* repost the IRP to retry later */

View File

@ -71,13 +71,13 @@ extern __declspec(selectany) int fsp_bp = 1;
#define DEBUGBREAK() do {} while (0,0)
#endif
/* DEBUGRANDTEST */
/* DEBUGTEST */
#if DBG
extern __declspec(selectany) int fsp_dt = 1;
#define DEBUGRANDTEST(Percent, Default) \
#define DEBUGTEST(Percent, Default) \
(!fsp_dt || DebugRandom() <= (Percent) * 0x7fff / 100 ? (Default) : !(Default))
#else
#define DEBUGRANDTEST(Percent, Default) (Default)
#define DEBUGTEST(Percent, Default) (Default)
#endif
/* FSP_ENTER/FSP_LEAVE */

View File

@ -497,7 +497,7 @@ NTSTATUS FspFsvolQueryInformationComplete(
FspFileNodeReleaseOwner(FileNode, Full, Request);
}
Success = DEBUGRANDTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Main);
Success = DEBUGTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Main);
if (!Success)
{
FspIopRetryCompleteIrp(Irp, Response, &Result);

View File

@ -135,7 +135,7 @@ NTSTATUS FspFsvolQuerySecurityComplete(
FspFileNodeReleaseOwner(FileNode, Full, Request);
}
Success = DEBUGRANDTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Main);
Success = DEBUGTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Main);
if (!Success)
{
FspIopRetryCompleteIrp(Irp, Response, &Result);

View File

@ -78,7 +78,7 @@ PVOID FspAllocatePoolMustSucceed(POOL_TYPE PoolType, SIZE_T Size, ULONG Tag)
for (ULONG i = 0, n = sizeof(Delays) / sizeof(Delays[0]);; i++)
{
Result = DEBUGRANDTEST(95, TRUE) ? ExAllocatePoolWithTag(PoolType, Size, Tag) : 0;
Result = DEBUGTEST(95, TRUE) ? ExAllocatePoolWithTag(PoolType, Size, Tag) : 0;
if (0 != Result)
return Result;
@ -96,7 +96,7 @@ PVOID FspAllocateIrpMustSucceed(CCHAR StackSize)
for (ULONG i = 0, n = sizeof(Delays) / sizeof(Delays[0]);; i++)
{
Result = DEBUGRANDTEST(95, TRUE) ? IoAllocateIrp(StackSize, FALSE) : 0;
Result = DEBUGTEST(95, TRUE) ? IoAllocateIrp(StackSize, FALSE) : 0;
if (0 != Result)
return Result;

View File

@ -111,7 +111,7 @@ static NTSTATUS FspFsvolWriteCached(
ASSERT(FileNode == FileDesc->FileNode);
/* should we defer the write? */
Success = DEBUGRANDTEST(90, TRUE) && CcCanIWrite(FileObject, WriteLength, CanWait, Retrying);
Success = DEBUGTEST(90, TRUE) && CcCanIWrite(FileObject, WriteLength, CanWait, Retrying);
if (!Success)
{
Result = FspWqCreateIrpWorkItem(Irp, FspFsvolWriteCached, 0);
@ -127,7 +127,7 @@ static NTSTATUS FspFsvolWriteCached(
}
/* try to acquire the FileNode Main exclusive */
Success = DEBUGRANDTEST(90, TRUE) &&
Success = DEBUGTEST(90, TRUE) &&
FspFileNodeTryAcquireExclusiveF(FileNode, FspFileNodeAcquireMain, CanWait);
if (!Success)
return FspWqRepostIrpWorkItem(Irp, FspFsvolWriteCached, 0);
@ -320,7 +320,7 @@ NTSTATUS FspFsvolWritePrepare(
PEPROCESS Process;
BOOLEAN Success;
Success = DEBUGRANDTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Full);
Success = DEBUGTEST(90, TRUE) && FspFileNodeTryAcquireExclusive(FileNode, Full);
if (!Success)
{
FspIopRetryPrepareIrp(Irp, &Result);