File 5351-erts-Filter-ERL-env-flags-to-old-test-nodes.patch of Package erlang

From 23d7a7df0ca43d496a0cef884398a31aa2c25b2a Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Fri, 1 Oct 2021 09:39:21 +0200
Subject: [PATCH 05/11] erts: Filter ERL env flags to old test nodes

---
 erts/emulator/test/hash_property_test_SUITE.erl | 13 ++++++++++++-
 erts/emulator/test/process_SUITE.erl            | 12 ++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/erts/emulator/test/hash_property_test_SUITE.erl b/erts/emulator/test/hash_property_test_SUITE.erl
index b4c7810a52..83f1158a5d 100644
--- a/erts/emulator/test/hash_property_test_SUITE.erl
+++ b/erts/emulator/test/hash_property_test_SUITE.erl
@@ -84,7 +84,18 @@ test_phash2_no_diff_between_versions(Config) when is_list(Config) ->
     case test_server:is_release_available(R) of
         true ->
             Rel = {release,R},
-            case test_server:start_node(rel21,peer,[{erl,[Rel]}]) of
+            %% We clear all ERL_FLAGS for the old node as all options may not
+            %% be supported.
+            ClearEnv = lists:foldl(
+                         fun({Key,_Value}, Acc) ->
+                                 case re:run(Key,"^ERL_.*FLAGS$") of
+                                     {match,_} ->
+                                         [{Key,""}|Acc];
+                                     nomatch ->
+                                         Acc
+                                 end
+                         end, [], os:env()),
+            case test_server:start_node(rel21,peer,[{erl,[Rel]},{env,ClearEnv}]) of
                 {error, Reason} -> {skip, io_lib:format("Could not start node: ~p~n", [Reason])};
                 {ok, Node} ->
                     try
-- 
2.31.1

openSUSE Build Service is sponsored by