File 0919-erlexec-Fix-running-of-argument-test-with-asan.patch of Package erlang
From 69fea5513ad2daa85d4aa0dda1ca54b3bdfe7ecf Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Thu, 17 Feb 2022 12:48:06 +0100
Subject: [PATCH 2/4] erlexec: Fix running of argument test with asan
---
erts/test/erlexec_SUITE.erl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/erts/test/erlexec_SUITE.erl b/erts/test/erlexec_SUITE.erl
index 28fcbd8c11..0c78ebbe7a 100644
--- a/erts/test/erlexec_SUITE.erl
+++ b/erts/test/erlexec_SUITE.erl
@@ -64,7 +64,10 @@ end_per_testcase(_Case, Config) ->
%% Test that plain first argument does not
%% destroy -home switch [OTP-8209] or interact with environments
argument_separation(Config) when is_list(Config) ->
- {ok,[[PName]]} = init:get_argument(progname),
+ {ok,[[FullPName]]} = init:get_argument(progname),
+ %% progname can be either "erl" or "cerl -asan", so we remove anything after the first space.
+ %% This will break if tests are run with an erlang that has a space in the path...
+ [PName | _ ] = string:lexemes(FullPName," "),
SNameS = "erlexec_test_01",
SName = list_to_atom(SNameS++"@"++
hd(tl(string:lexemes(atom_to_list(node()),"@")))),
--
2.34.1