projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Catch up with Gearman's libtest
[m6w6/libmemcached]
/
libtest
/
server.cc
diff --git
a/libtest/server.cc
b/libtest/server.cc
index 726a01ba61f015637ae3d0f082892f0348491db5..78b729f96cb473faeeef973e325865cb0a28689f 100644
(file)
--- a/
libtest/server.cc
+++ b/
libtest/server.cc
@@
-164,7
+164,9
@@
bool Server::start()
// If we find that we already have a pid then kill it.
if (has_pid() == true)
{
// If we find that we already have a pid then kill it.
if (has_pid() == true)
{
+#if 0
fatal_message("has_pid() failed, programer error");
fatal_message("has_pid() failed, programer error");
+#endif
}
// This needs more work.
}
// This needs more work.
@@
-190,6
+192,7
@@
bool Server::start()
return false;
}
return false;
}
+ libtest::release_port(_port);
Application::error_t ret;
if (Application::SUCCESS != (ret= _app.run()))
{
Application::error_t ret;
if (Application::SUCCESS != (ret= _app.run()))
{
@@
-262,28
+265,29
@@
bool Server::start()
if (kill_file(pid_file()) == false)
{
throw libtest::fatal(LIBYATL_DEFAULT_PARAM,
if (kill_file(pid_file()) == false)
{
throw libtest::fatal(LIBYATL_DEFAULT_PARAM,
- "Failed to kill off server, waited: %u after startup occurred, when pinging failed: %
s stderr:%
s",
+ "Failed to kill off server, waited: %u after startup occurred, when pinging failed: %
.*s stderr:%.*
s",
this_wait,
this_wait,
-
pid_file()
.c_str(),
- _app.stderr_c_str());
+
int(_running.size()), _running
.c_str(),
+
int(_app.stderr_result_length()),
_app.stderr_c_str());
}
throw libtest::fatal(LIBYATL_DEFAULT_PARAM,
}
throw libtest::fatal(LIBYATL_DEFAULT_PARAM,
- "Failed native ping(), pid: %d is alive: %s waited: %u server started, having pid_file. exec: %
s stderr:%
s",
+ "Failed native ping(), pid: %d is alive: %s waited: %u server started, having pid_file. exec: %
.*s stderr:%.*
s",
int(_app.pid()),
_app.check() ? "true" : "false",
int(_app.pid()),
_app.check() ? "true" : "false",
- this_wait, _running.c_str(),
- _app.stderr_c_str());
+ this_wait,
+ int(_running.size()), _running.c_str(),
+ int(_app.stderr_result_length()), _app.stderr_c_str());
}
else
{
throw libtest::fatal(LIBYATL_DEFAULT_PARAM,
}
else
{
throw libtest::fatal(LIBYATL_DEFAULT_PARAM,
- "Failed native ping(), pid: %d is alive: %s waited: %u server started. exec: %
s stderr:%
s",
+ "Failed native ping(), pid: %d is alive: %s waited: %u server started. exec: %
.*s stderr:%.*
s",
int(_app.pid()),
_app.check() ? "true" : "false",
this_wait,
int(_app.pid()),
_app.check() ? "true" : "false",
this_wait,
- _running.c_str(),
- _app.stderr_c_str());
+
int(_running.size()),
_running.c_str(),
+
int(_app.stderr_result_length()),
_app.stderr_c_str());
}
_running.clear();
return false;
}
_running.clear();
return false;