From eeffb5aebb9d1a8b9ff45786b2b1f894d6829bf4 Mon Sep 17 00:00:00 2001 From: Bevan Weiss Date: Wed, 1 Jan 2025 15:41:46 +1100 Subject: [PATCH] Failures were seen in MSI Unit Tests around Firewall rules within Windows Sandbox. This is potentially a Windows OS bug (it was from a Windows Insider build), however shows that it's possible in the Firewall API to have multiple rules which differ only in their Grouping. So the testbench should consider different Grouping as making for a unique firewall rule. Signed-off-by: Bevan Weiss --- src/test/burn/WixTestTools/Firewall/UniqueCheck.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs b/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs index 598350f9c..7bc2e527e 100644 --- a/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs +++ b/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs @@ -23,6 +23,7 @@ public UniqueCheck(RuleDetails details) this.ApplicationName = details.ApplicationName; this.LocalUserOwner = details.LocalUserOwner; this.RemoteAddresses = details.RemoteAddresses; + this.Grouping = details.Grouping; } @@ -40,6 +41,8 @@ public UniqueCheck(RuleDetails details) public string RemoteAddresses { get; set; } + public string Grouping { get; set; } + public bool FirewallRuleIsUnique(INetFwRule3 rule) { if (this.Name != null && rule.Name != this.Name) @@ -77,6 +80,11 @@ public bool FirewallRuleIsUnique(INetFwRule3 rule) return false; } + if (this.Grouping != null && rule.Grouping != this.Grouping) + { + return false; + } + return true; } }