diff options
author | Lukas Larsson <[email protected]> | 2019-04-23 12:14:08 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2019-04-23 13:49:21 +0200 |
commit | 4ffb28fa775daf7e157031654bcf7712cce6d0f1 (patch) | |
tree | 56840155a339aad7d29dc5bd8040d30710973930 /lib/kernel/test/erl_distribution_SUITE.erl | |
parent | d0d4f2be1ebfe8293a627531b65819e85482c1d9 (diff) | |
download | otp-4ffb28fa775daf7e157031654bcf7712cce6d0f1.tar.gz otp-4ffb28fa775daf7e157031654bcf7712cce6d0f1.tar.bz2 otp-4ffb28fa775daf7e157031654bcf7712cce6d0f1.zip |
kernel: Multiple -sname or -name would be ignored
If 'erl -sname 1 -sname 2' is run the node is not started
in distribution mode at all. This fix makes the last sname
be used.
Diffstat (limited to 'lib/kernel/test/erl_distribution_SUITE.erl')
-rw-r--r-- | lib/kernel/test/erl_distribution_SUITE.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl index 8dd4ef1987..c3a022df0a 100644 --- a/lib/kernel/test/erl_distribution_SUITE.erl +++ b/lib/kernel/test/erl_distribution_SUITE.erl @@ -205,6 +205,9 @@ nodenames(Config) when is_list(Config) -> legal("a-1@b"), legal("a_1@b"), + %% Test that giving two -sname works as it should + test_node("a_1@b", false, long_or_short() ++ "a_0@b"), + illegal("cdé@a"), illegal("te欢st@a"). @@ -258,8 +261,11 @@ illegal(Name) -> test_node(Name) -> test_node(Name, false). test_node(Name, Illigal) -> + test_node(Name, Illigal, ""). +test_node(Name, Illigal, ExtraArgs) -> ProgName = ct:get_progname(), - Command = ProgName ++ " -noinput " ++ long_or_short() ++ Name ++ + Command = ProgName ++ " -noinput " ++ ExtraArgs ++ + long_or_short() ++ Name ++ " -eval \"net_adm:ping('" ++ atom_to_list(node()) ++ "')\"" ++ case Illigal of true -> |