From 78125b7c4bd59468275d65b63860bdb68b1bc6f1 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 13 Mar 2022 23:47:55 -0500 Subject: Log rest of plan and add testing of registration actions to PlanTest. --- src/burn/engine/plan.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'src/burn/engine/plan.cpp') diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index d3cc60f1..dcb919c7 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp @@ -2786,6 +2786,36 @@ static BOOL ForceCache( } } +static void DependentRegistrationActionLog( + __in DWORD iAction, + __in BURN_DEPENDENT_REGISTRATION_ACTION* pAction, + __in BOOL fRollback + ) +{ + LPCWSTR wzBase = fRollback ? L" Rollback dependent registration" : L" Dependent registration"; + LPCWSTR wzType = NULL; + + switch (pAction->type) + { + case BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_REGISTER: + wzType = L"REGISTER"; + break; + + case BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_UNREGISTER: + wzType = L"UNREGISTER"; + break; + + default: + AssertSz(FALSE, "Unknown cache action type."); + break; + } + + if (wzType) + { + LogStringLine(PlanDumpLevel, "%ls action[%u]: %ls bundle id: %ls, provider key: %ls", wzBase, iAction, wzType, pAction->sczBundleId, pAction->sczDependentProviderKey); + } +} + static void CacheActionLog( __in DWORD iAction, __in BURN_CACHE_ACTION* pAction, @@ -2974,14 +3004,30 @@ extern "C" void PlanDump( LogStringLine(PlanDumpLevel, "--- Begin plan dump ---"); LogStringLine(PlanDumpLevel, "Plan action: %hs", LoggingBurnActionToString(pPlan->action)); + LogStringLine(PlanDumpLevel, " bundle id: %ls", pPlan->wzBundleId); + LogStringLine(PlanDumpLevel, " bundle provider key: %ls", pPlan->wzBundleProviderKey); + LogStringLine(PlanDumpLevel, " use-forward-compatible: %hs", LoggingTrueFalseToString(pPlan->fEnabledForwardCompatibleBundle)); LogStringLine(PlanDumpLevel, " per-machine: %hs", LoggingTrueFalseToString(pPlan->fPerMachine)); + LogStringLine(PlanDumpLevel, " can affect machine state: %hs", LoggingTrueFalseToString(pPlan->fCanAffectMachineState)); LogStringLine(PlanDumpLevel, " disable-rollback: %hs", LoggingTrueFalseToString(pPlan->fDisableRollback)); + LogStringLine(PlanDumpLevel, " disallow-removal: %hs", LoggingTrueFalseToString(pPlan->fDisallowRemoval)); + LogStringLine(PlanDumpLevel, " registration options: %hs", LoggingRegistrationOptionsToString(pPlan->dwRegistrationOperations)); LogStringLine(PlanDumpLevel, " estimated size: %llu", pPlan->qwEstimatedSize); if (pPlan->sczLayoutDirectory) { LogStringLine(PlanDumpLevel, " layout directory: %ls", pPlan->sczLayoutDirectory); } + for (DWORD i = 0; i < pPlan->cRegistrationActions; ++i) + { + DependentRegistrationActionLog(i, pPlan->rgRegistrationActions + i, FALSE); + } + + for (DWORD i = 0; i < pPlan->cRollbackRegistrationActions; ++i) + { + DependentRegistrationActionLog(i, pPlan->rgRollbackRegistrationActions + i, TRUE); + } + LogStringLine(PlanDumpLevel, "Plan cache size: %llu", pPlan->qwCacheSizeTotal); for (DWORD i = 0; i < pPlan->cCacheActions; ++i) { -- cgit v1.2.3-55-g6feb