ci: cram: 038-lcm-pcm: ignore LPM Action runtime params

038-lcm-pcm compares data model snapshots taken before and after
fake_fw_upgrade. It filters runtime-only parameters through a
runtime_params ignore list before checking the diffs.

After commit 84d5923af0 ("profiles: lcm.yml: feed_lcm:
cthulhu-lpm: policy: fix malformed default policy file"), the
post-upgrade snapshot contains LocalPolicyManager.Action.1 runtime
entries. Because those parameters are not in the ignore list, the
test reports false runtime parameter mismatches.

Instead of extending the inline here-document again, move the ignore
list into ${TESTDIR}/lcm-pcm_runtime_params so it is easier to
review and maintain. Add the LocalPolicyManager.Action.1 parameters
there and copy the file into /tmp/lcm-pcm/runtime_params before
running the diff checks.

Fixes: PPW-1797
References: PPW-1637, PPW-1638
Fixes: 84d5923af0 ("profiles: lcm.yml: feed_lcm: cthulhu-lpm: policy: fix malformed default policy file")
Signed-off-by: Nabil BIZID <nabil.bizid@softathome.com>
This commit is contained in:
Nabil BIZID 2026-04-08 22:15:38 +02:00 committed by Hela Saadani
parent 88e371def5
commit fff0bbe4f9
2 changed files with 37 additions and 26 deletions

View File

@ -67,32 +67,7 @@ Compare the data models before and after the firmware upgrade:
$ diff /tmp/lcm-pcm/rlyeh_before.dm /tmp/lcm-pcm/rlyeh_after.dm
$ sed -i -e "s/\(Sandbox\.Instances\)\.2/\1\.1/g" /tmp/lcm-pcm/cthulhu_after.dm
$ sed -i -e "s/\(Sandbox\.Instances\)\.3/\1\.2/g" /tmp/lcm-pcm/cthulhu_after.dm
$ cat > /tmp/lcm-pcm/runtime_params << EOF
> Cthulhu.Container.Instances.1.RootfsIsMounted
> Cthulhu.Container.Instances.1.Pid
> Cthulhu.Container.Instances.1.StartTime
> Cthulhu.Container.Instances.1.AutoRestart.RunningSince
> Cthulhu.Container.Instances.1.Interfaces.6.Addresses.1.Address
> Cthulhu.Container.Instances.1.PluginsPrivate.NetworkConfig.FirewallRules.1.Path
> Cthulhu.Container.Instances.1.PluginsPrivate.NetworkConfig.FirewallRules.2.Path
> Cthulhu.Container.Instances.1.Resources.Stats.DiskSpace.Free
> Cthulhu.Container.Instances.1.Resources.Stats.DiskSpace.Used
> Cthulhu.Container.Instances.1.Resources.Stats.Memory.Used
> Cthulhu.Sandbox.Instances.1.Pid
> Cthulhu.Sandbox.Instances.1.Stats.DiskSpace.Free
> Cthulhu.Sandbox.Instances.1.Stats.DiskSpace.Used
> Cthulhu.Sandbox.Instances.1.Stats.Memory.Used
> Cthulhu.Sandbox.Instances.2.Created
> Cthulhu.Sandbox.Instances.2.Pid
> Cthulhu.Sandbox.Instances.2.Stats.DiskSpace.Free
> Cthulhu.Sandbox.Instances.2.Stats.DiskSpace.Used
> Cthulhu.Sandbox.Instances.2.Stats.Memory.Used
> SoftwareModules.ExecEnv.1.AvailableDiskSpace
> SoftwareModules.ExecutionUnit.1.AvailableDiskSpace
> SoftwareModules.ExecutionUnit.1.DiskSpaceInUse
> SoftwareModules.ExecutionUnit.1.MemoryInUse
> SoftwareModules.ExecutionUnit.1.Uptime
> EOF
$ cp ${TESTDIR}/lcm-pcm_runtime_params /tmp/lcm-pcm/runtime_params
$ cthulhu_diff_params=$(diff -n /tmp/lcm-pcm/cthulhu_before.dm /tmp/lcm-pcm/cthulhu_after.dm | grep -o '^Cthulhu[^=]\+')
$ for param in ${cthulhu_diff_params}; do grep -Fxq "${param}" /tmp/lcm-pcm/runtime_params || echo "ERROR: runtime parameter mismatch - ${param}"; done
$ timingila_diff_params=$(diff -n /tmp/lcm-pcm/timingila_before.dm /tmp/lcm-pcm/timingila_after.dm | grep -o '^SoftwareModules[^=]\+')

View File

@ -0,0 +1,36 @@
Cthulhu.Container.Instances.1.RootfsIsMounted
Cthulhu.Container.Instances.1.Pid
Cthulhu.Container.Instances.1.StartTime
Cthulhu.Container.Instances.1.AutoRestart.RunningSince
Cthulhu.Container.Instances.1.Interfaces.6.Addresses.1.Address
Cthulhu.Container.Instances.1.PluginsPrivate.NetworkConfig.FirewallRules.1.Path
Cthulhu.Container.Instances.1.PluginsPrivate.NetworkConfig.FirewallRules.2.Path
Cthulhu.Container.Instances.1.Resources.Stats.DiskSpace.Free
Cthulhu.Container.Instances.1.Resources.Stats.DiskSpace.Used
Cthulhu.Container.Instances.1.Resources.Stats.Memory.Used
Cthulhu.Sandbox.Instances.1.Pid
Cthulhu.Sandbox.Instances.1.Stats.DiskSpace.Free
Cthulhu.Sandbox.Instances.1.Stats.DiskSpace.Used
Cthulhu.Sandbox.Instances.1.Stats.Memory.Used
Cthulhu.Sandbox.Instances.2.Created
Cthulhu.Sandbox.Instances.2.Pid
Cthulhu.Sandbox.Instances.2.Stats.DiskSpace.Free
Cthulhu.Sandbox.Instances.2.Stats.DiskSpace.Used
Cthulhu.Sandbox.Instances.2.Stats.Memory.Used
SoftwareModules.ExecEnv.1.AvailableDiskSpace
SoftwareModules.ExecutionUnit.1.AvailableDiskSpace
SoftwareModules.ExecutionUnit.1.DiskSpaceInUse
SoftwareModules.ExecutionUnit.1.MemoryInUse
SoftwareModules.ExecutionUnit.1.Uptime
Cthulhu.Information.LocalPolicyManager.Action.1.
Cthulhu.Information.LocalPolicyManager.Action.1.Action
Cthulhu.Information.LocalPolicyManager.Action.1.Alias
Cthulhu.Information.LocalPolicyManager.Action.1.CurrentModuleVersion
Cthulhu.Information.LocalPolicyManager.Action.1.Date
Cthulhu.Information.LocalPolicyManager.Action.1.Event
Cthulhu.Information.LocalPolicyManager.Action.1.ExecEnvName
Cthulhu.Information.LocalPolicyManager.Action.1.FaultMessage
Cthulhu.Information.LocalPolicyManager.Action.1.PolicyScope
Cthulhu.Information.LocalPolicyManager.Action.1.PreviousModuleVersion
Cthulhu.Information.LocalPolicyManager.Action.1.Status
Cthulhu.Information.LocalPolicyManager.Action.1.UUID