aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/ftp_suite_lib.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2011-06-22 14:16:22 +0200
committerErlang/OTP <[email protected]>2011-06-22 14:16:22 +0200
commit9cb4040e4aeed40a52f174a7c4d9106e38572605 (patch)
treeb0d3caca47d76422becf4c1a2a82d687191e0b9c /lib/inets/test/ftp_suite_lib.erl
parent5eec30647ab41ad9a0c9911d2e4e300ecb501333 (diff)
parente2249b9878d396663a115628de16b1b1efde0afc (diff)
downloadotp-9cb4040e4aeed40a52f174a7c4d9106e38572605.tar.gz
otp-9cb4040e4aeed40a52f174a7c4d9106e38572605.tar.bz2
otp-9cb4040e4aeed40a52f174a7c4d9106e38572605.zip
Merge branch 'bmk/inets/inets57_integration2' into maint-r14
* bmk/inets/inets57_integration2: Fixed non-related test case (ticket_6035). Corrected appup-file (missing ','). Fixed ipv6 support detection. (httpc) test case cleanups. Uppdated appup-file. Fixed IPv6 test case selection. That is if a IPv6 test case should be run or not. Stopping httpc client... Added test cases for httpd. Clients started stand-alone not properly handled. Clients started stand-alone not properly handled. Temporary solution for profile_name stuff. What about Pids??? SSL with IPv6 now works "in principle". [httpc] Remove unnecessary usage of iolist_to_binary when processing body (for PUT and POST). Filipe David Manana OTP-9317 Set proper version (5.7). Set proper version (5.7). Updated release notes. Peer/sockname resolv doesn't work with IPv6 addrs in HTTP. OTP-9343 OTP-9342: FTP client doesn't work with IPv6 OTP-9342: IpFamily config option was not handled OTP-9342: Release notes remain... OTP-9342: <credit>attila rajmund nohl</credit>
Diffstat (limited to 'lib/inets/test/ftp_suite_lib.erl')
-rw-r--r--lib/inets/test/ftp_suite_lib.erl35
1 files changed, 23 insertions, 12 deletions
diff --git a/lib/inets/test/ftp_suite_lib.erl b/lib/inets/test/ftp_suite_lib.erl
index d0d07a8358..3ebd02229e 100644
--- a/lib/inets/test/ftp_suite_lib.erl
+++ b/lib/inets/test/ftp_suite_lib.erl
@@ -1129,10 +1129,16 @@ ticket_6035(Config) ->
LogFile = filename:join([PrivDir,"ticket_6035.log"]),
try
begin
+ p("ticket_6035 -> select ftpd host"),
Host = dirty_select_ftpd_host(Config),
+ p("ticket_6035 -> ftpd host selected (~p) => now spawn ftp owner", [Host]),
Pid = spawn(?MODULE, open_wait_6035, [Host, self()]),
+ p("ticket_6035 -> waiter spawned: ~p => now open error logfile (~p)",
+ [Pid, LogFile]),
error_logger:logfile({open, LogFile}),
- ok = kill_ftp_proc_6035(Pid,LogFile),
+ p("ticket_6035 -> error logfile open => now kill waiter process"),
+ true = kill_ftp_proc_6035(Pid, LogFile),
+ p("ticket_6035 -> waiter process killed => now close error logfile"),
error_logger:logfile(close),
p("ticket_6035 -> done", []),
ok
@@ -1146,7 +1152,7 @@ kill_ftp_proc_6035(Pid, LogFile) ->
p("kill_ftp_proc_6035 -> entry"),
receive
open ->
- p("kill_ftp_proc_6035 -> received open: send shutdown"),
+ p("kill_ftp_proc_6035 -> received open => now issue shutdown"),
exit(Pid, shutdown),
kill_ftp_proc_6035(Pid, LogFile);
{open_failed, Reason} ->
@@ -1159,11 +1165,11 @@ kill_ftp_proc_6035(Pid, LogFile) ->
is_error_report_6035(LogFile)
end.
-open_wait_6035(FtpServer, From) ->
- p("open_wait_6035 -> try connect to ~s", [FtpServer]),
+open_wait_6035({Tag, FtpServer}, From) ->
+ p("open_wait_6035 -> try connect to [~p] ~s for ~p", [Tag, FtpServer, From]),
case ftp:open(FtpServer, [{timeout, timer:seconds(15)}]) of
{ok, Pid} ->
- p("open_wait_6035 -> connected, now login"),
+ p("open_wait_6035 -> connected (~p), now login", [Pid]),
LoginResult = ftp:user(Pid,"anonymous","kldjf"),
p("open_wait_6035 -> login result: ~p", [LoginResult]),
From ! open,
@@ -1191,22 +1197,27 @@ is_error_report_6035(LogFile) ->
Res =
case file:read_file(LogFile) of
{ok, Bin} ->
- p("is_error_report_6035 -> logfile read"),
- read_log_6035(binary_to_list(Bin));
+ Txt = binary_to_list(Bin),
+ p("is_error_report_6035 -> logfile read: ~n~p", [Txt]),
+ read_log_6035(Txt);
_ ->
- ok
+ false
end,
p("is_error_report_6035 -> logfile read result: "
"~n ~p", [Res]),
- file:delete(LogFile),
+ %% file:delete(LogFile),
Res.
read_log_6035("=ERROR REPORT===="++_Rest) ->
- error_report;
-read_log_6035([_H|T]) ->
+ p("read_log_6035 -> ERROR REPORT detected"),
+ true;
+read_log_6035([H|T]) ->
+ p("read_log_6035 -> OTHER: "
+ "~p", [H]),
read_log_6035(T);
read_log_6035([]) ->
- ok.
+ p("read_log_6035 -> done"),
+ false.
%%--------------------------------------------------------------------