+ return TEST_SUCCESS;
+}
+
+static test_return_t gdb_wait_services_appliction_TEST(void *)
+{
+ test_skip(true, false);
+#if defined(__APPLE__) && __APPLE__
+ test_skip(0, __APPLE__);
+#endif
+
+ test_skip(0, access("/etc/services", R_OK ));
+ test_skip(0, access("/usr/bin/gdb", X_OK ));
+ test_skip(0, access("libtest/wait", X_OK ));
+
+ libtest::Application wait_app("libtest/wait", true);
+ wait_app.use_gdb(true);
+
+ const char *args[]= { "/etc/services", 0 };
+ ASSERT_EQ(Application::SUCCESS, wait_app.run(args));
+ ASSERT_EQ(Application::SUCCESS, wait_app.join());
+
+ return TEST_SUCCESS;
+}
+
+static test_return_t gdb_abort_services_appliction_TEST(void *)
+{
+ test_skip(0, access("/usr/bin/gdb", X_OK ));
+ test_skip(0, access("libtest/abort", X_OK ));
+ test_skip(true, false);
+
+#if defined(__APPLE__) && __APPLE__
+ test_skip(0, __APPLE__);
+#endif
+
+ libtest::Application abort_app("libtest/abort", true);
+ abort_app.use_gdb(true);
+
+ ASSERT_EQ(Application::SUCCESS, abort_app.run());
+ ASSERT_EQ(Application::SUCCESS, abort_app.join());
+
+ std::string gdb_filename= abort_app.gdb_filename();
+ test_skip(0, access(gdb_filename.c_str(), R_OK ));
+ const char *args[]= { "SIGABRT", gdb_filename.c_str(), 0 };
+ ASSERT_EQ(EXIT_SUCCESS, exec_cmdline("grep", args));
+
+ // Sanity test
+ args[0]= "THIS_WILL_NOT_BE_FOUND";
+ ASSERT_EQ(EXIT_FAILURE, exec_cmdline("grep", args));