aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2018-05-02 15:53:28 +0200
committerErlang/OTP <[email protected]>2018-05-02 15:53:28 +0200
commit6faad4dd9c202931469bc25cea5a0e47aa0000dc (patch)
treede6dfc83a928aaf5410fc7ae736ad601916b7347 /lib/kernel/test
parentf2c1d537dc28ffbde5d42aedec70bf4c6574c3ea (diff)
parent05b1c13e36ec49891e89593b25e668e983a4fc41 (diff)
downloadotp-6faad4dd9c202931469bc25cea5a0e47aa0000dc.tar.gz
otp-6faad4dd9c202931469bc25cea5a0e47aa0000dc.tar.bz2
otp-6faad4dd9c202931469bc25cea5a0e47aa0000dc.zip
Merge branch 'john/erts/fix-heart-command-overflow/OTP-15034/ERIERL-166' into maint-20
* john/erts/fix-heart-command-overflow/OTP-15034/ERIERL-166: heart: Use ntohs instead of manual conversion # Conflicts: # lib/kernel/test/heart_SUITE.erl
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/heart_SUITE.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/kernel/test/heart_SUITE.erl b/lib/kernel/test/heart_SUITE.erl
index 45032faf6d..22db24de5f 100644
--- a/lib/kernel/test/heart_SUITE.erl
+++ b/lib/kernel/test/heart_SUITE.erl
@@ -346,9 +346,16 @@ clear_cmd(Config) when is_list(Config) ->
get_cmd(Config) when is_list(Config) ->
{ok, Node} = start_check(slave, ?UNIQ_NODE_NAME),
- Cmd = "test",
- ok = rpc:call(Node, heart, set_cmd, [Cmd]),
- {ok, Cmd} = rpc:call(Node, heart, get_cmd, []),
+
+ ShortCmd = "test",
+ ok = rpc:call(Node, heart, set_cmd, [ShortCmd]),
+ {ok, ShortCmd} = rpc:call(Node, heart, get_cmd, []),
+
+ %% This would hang prior to OTP-15024 being fixed.
+ LongCmd = [$a || _ <- lists:seq(1, 160)],
+ ok = rpc:call(Node, heart, set_cmd, [LongCmd]),
+ {ok, LongCmd} = rpc:call(Node, heart, get_cmd, []),
+
stop_node(Node),
ok.