File 0394-check-profile-diffs-a-bit-better.patch of Package erlang

From 5899443d067050a5d79b5e49f70f10c273ff2d26 Mon Sep 17 00:00:00 2001
From: ruslandoga <ruslandoga+gh@icloud.com>
Date: Wed, 26 Mar 2025 21:12:20 +0300
Subject: [PATCH 4/5] check profile diffs a bit better

---
 lib/tools/test/tprof_SUITE.erl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/tools/test/tprof_SUITE.erl b/lib/tools/test/tprof_SUITE.erl
index 5f91345a35..a461bf5534 100644
--- a/lib/tools/test/tprof_SUITE.erl
+++ b/lib/tools/test/tprof_SUITE.erl
@@ -319,15 +319,15 @@ separate_sessions(Config) when is_list(Config) ->
     lists:reverse([1, 2, 3, 4, 5]),
     lists:map(fun(X) -> X * 2 end, [1, 2, 3, 4, 5]),
 
-    Profile1 = tprof:collect(Srv1),
-    Profile2 = tprof:collect(Srv2),
-    ProcInspected1 = tprof:inspect(Profile1),
-    ProcInspected2 = tprof:inspect(Profile2),
+    {call_memory, Profile1} = tprof:collect(Srv1),
+    {call_memory, Profile2} = tprof:collect(Srv2),
 
     tprof:stop(Srv1),
     tprof:stop(Srv2),
 
-    ?assertNotEqual(ProcInspected1, ProcInspected2).    
+    ?assertNotEqual(Profile1, Profile2),
+    ?assert(lists:all(fun({lists, reverse, 1, _}) -> true; (_) -> false end, Profile1)),
+    ?assert(lists:all(fun({lists, map, 2, _}) -> true; (_) -> false end, Profile2)).
 
 live_trace() ->
     [{doc, "Tests memory tracing for pre-existing processes"}].
-- 
2.43.0

openSUSE Build Service is sponsored by