aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/gen_tcp_echo_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-12-07 14:20:55 +0100
committerSverker Eriksson <[email protected]>2011-12-07 14:20:55 +0100
commitf7241e210c333b088210a138c0880aa93d1f7780 (patch)
treea8c4620af57b908468881864b48866f5c71500c5 /lib/kernel/test/gen_tcp_echo_SUITE.erl
parent2e5639155e153ba4869d7671d1a7becd5e07dc1a (diff)
parentdc5f7190f16cf4552db74fba3f4e0f2d654e2594 (diff)
downloadotp-f7241e210c333b088210a138c0880aa93d1f7780.tar.gz
otp-f7241e210c333b088210a138c0880aa93d1f7780.tar.bz2
otp-f7241e210c333b088210a138c0880aa93d1f7780.zip
Merge branch 'sverk/packet_size-http/OTP-9389'
* sverk/packet_size-http/OTP-9389: erts: Remove truncation of http packet parsing and return error instead honor packet_size for http packet parsing to fix OTP-9389
Diffstat (limited to 'lib/kernel/test/gen_tcp_echo_SUITE.erl')
-rw-r--r--lib/kernel/test/gen_tcp_echo_SUITE.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/kernel/test/gen_tcp_echo_SUITE.erl b/lib/kernel/test/gen_tcp_echo_SUITE.erl
index fffaaf4c45..5bbaeb02ad 100644
--- a/lib/kernel/test/gen_tcp_echo_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_echo_SUITE.erl
@@ -167,8 +167,12 @@ echo_test_1(SockOpts, EchoFun, Config0) ->
[{type, {cdr, little}}|Config]),
?line case lists:keymember(packet_size, 1, SockOpts) of
false ->
- ?line echo_packet([{packet, line}|SockOpts],
- EchoFun, Config);
+ % This is cheating, we should test that packet_size
+ % also works for line and http.
+ echo_packet([{packet, line}|SockOpts], EchoFun, Config),
+ echo_packet([{packet, http}|SockOpts], EchoFun, Config),
+ echo_packet([{packet, http_bin}|SockOpts], EchoFun, Config);
+
true -> ok
end,
?line echo_packet([{packet, tpkt}|SockOpts], EchoFun, Config),
@@ -183,9 +187,6 @@ echo_test_1(SockOpts, EchoFun, Config0) ->
[{type, {asn1, short, LongTag}}|Config]),
?line echo_packet([{packet, asn1}|SockOpts], EchoFun,
[{type, {asn1, long, LongTag}}|Config]),
-
- ?line echo_packet([{packet, http}|SockOpts], EchoFun, Config),
- ?line echo_packet([{packet, http_bin}|SockOpts], EchoFun, Config),
ok.
echo_packet(SockOpts, EchoFun, Opts) ->