From fefc8873bb5a4f20b6be5679c745cde2cf6c3229 Mon Sep 17 00:00:00 2001 From: Nir Bar Date: Tue, 22 Oct 2024 08:37:42 +0300 Subject: [PATCH] UX monitor: test BA and BAF to disable re-acquiring UX payloads --- src/burn/engine/engine.mc | 2 +- src/test/burn/TestBA/TestBA.cs | 5 +++++ .../TestData/PrereqBaTests/PrereqBaf/PrereqBaf.cpp | 12 +++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/burn/engine/engine.mc b/src/burn/engine/engine.mc index 3fa54f0b4..bbe192d1c 100644 --- a/src/burn/engine/engine.mc +++ b/src/burn/engine/engine.mc @@ -1314,5 +1314,5 @@ MessageId=706 Severity=Warning SymbolicName=MSG_UX_PAYLOAD_MISSING Language=English -UX payload deletion was detected. Payload Id '%1!ls!'. Payload Path '%2!ls!'. action '%3!ls!'. +UX payload deletion was detected, Id: '%1!ls!', path: '%2!ls!', action: %3!ls!. . diff --git a/src/test/burn/TestBA/TestBA.cs b/src/test/burn/TestBA/TestBA.cs index 43c1584b6..99d2f590a 100644 --- a/src/test/burn/TestBA/TestBA.cs +++ b/src/test/burn/TestBA/TestBA.cs @@ -589,6 +589,11 @@ protected override void OnUnregisterBegin(UnregisterBeginEventArgs args) this.Log("OnUnregisterBegin, default: {0}, requested: {1}", args.RecommendedRegistrationType, args.RegistrationType); } + protected override void OnUxPayloadDeleted(UxPayloadDeletedEventArgs args) + { + args.Action = BOOTSTRAPPER_UXPAYLOADDELETED_ACTION.None; + } + private void TestVariables() { // First make sure we can check and get standard variables of each type. diff --git a/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.cpp b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.cpp index 35949eb92..8e0145864 100644 --- a/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.cpp +++ b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.cpp @@ -26,7 +26,17 @@ class CPrereqBaf : public CBalBaseBAFunctions return hr; } -private: + virtual STDMETHODIMP OnUxPayloadDeleted( + __in_z LPCWSTR /*wzPayloadId*/, + __in_z LPCWSTR /*wzPayloadPath*/, + __in BOOTSTRAPPER_UXPAYLOADDELETED_ACTION /*recommendation*/, + __inout BOOTSTRAPPER_UXPAYLOADDELETED_ACTION* pAction + ) + { + *pAction = BOOTSTRAPPER_UXPAYLOADDELETED_ACTION_NONE; + + return S_OK; + } public: //