summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-10-10 09:28:48 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-10-10 15:12:23 +1000
commitb9312e5abac029d7011db2b93e30bbb65dba6e5b (patch)
tree56314e83524baf44e5f5ac11213eca5c184669e0
parent502af315a6be1eadf405da0a3e4ff2de7ae92a39 (diff)
test: add test for termination exit status
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
-rw-r--r--test/process-test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/process-test.cpp b/test/process-test.cpp
index 964a97d..0ed47aa 100644
--- a/test/process-test.cpp
+++ b/test/process-test.cpp
@@ -133,6 +133,16 @@ TEST(Process, TerminationFailure)
ASSERT_TRUE(p.Kill(100));
}
+TEST(Process, KillExitStatus)
+{
+ SCOPED_TRACE("TESTCASE: a child process killed must have a state of\n"
+ "FINISHED_FAILURE");
+ Process p;
+ p.Start(TEST_ROOT_DIR "process-test-helper", NULL);
+ p.Kill(1000);
+ ASSERT_EQ(p.GetState(), Process::FINISHED_FAILURE);
+}
+
int main(int argc, char *argv[]) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();