Commit 200e0d85 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

test: add test-case for starting servers

With the SIGUSR1 patch, an XOpenDisplay() after XServer::Start() should
always succeed.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
Reviewed-by: Chase Douglas's avatarChase Douglas <>
parent 18e69a49
...@@ -55,6 +55,22 @@ TEST(XServer, LogRemoval) ...@@ -55,6 +55,22 @@ TEST(XServer, LogRemoval)
file.close(); file.close();
} }
TEST(XServer, WaitForSIGUSR1)
SCOPED_TRACE("TESTCASE: XOpenDisplay() following server.Start() must\n"
"succeed as we wait for the SIGUSR1 signal\n");
for (int i = 0; i < 20; i++) {
XServer server;
server.SetOption("-logfile", "/tmp/xorg-testing-xserver-sigusr1.log");
server.SetOption("-noreset", "");
ASSERT_EQ(server.GetState(), Process::RUNNING);
Display *dpy = XOpenDisplay(server.GetDisplayString().c_str());
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment