[PATCH xorg-gtest 5/8] test: add test for termination exit status
Peter Hutterer
peter.hutterer at who-t.net
Tue Oct 9 22:14:30 PDT 2012
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
test/process-test.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
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();
--
1.7.11.4
More information about the xorg-devel
mailing list