Lines Matching +full:tcs +full:- +full:wait

33 #include <sys/wait.h>
42 #include <atf-c++.hpp>
73 return fs::path(tc->get_config_var("srcdir")) / "helpers"; in get_helpers()
167 const process::status status = child->wait(); in check_exec_no_args()
182 args.push_back("print-args"); in check_exec_some_args()
189 const process::status status = child->wait(); in check_exec_some_args()
192 ATF_REQUIRE(atf::utils::grep_file("argv\\[1\\] = print-args", "stdout")); in check_exec_some_args()
218 child_exec(process::exec, fs::path("non-existent"), in ATF_TEST_CASE_BODY()
221 const process::status status = child->wait(); in ATF_TEST_CASE_BODY()
224 ATF_REQUIRE(atf::utils::grep_file("Failed to execute non-existent", in ATF_TEST_CASE_BODY()
247 process::system_error, "Failed to execute missing-program", in ATF_TEST_CASE_BODY()
248 process::exec_unsafe(fs::path("missing-program"), in ATF_TEST_CASE_BODY()
257 ATF_REQUIRE(::pipe(first_fds) != -1); in ATF_TEST_CASE_BODY()
258 ATF_REQUIRE(::pipe(second_fds) != -1); in ATF_TEST_CASE_BODY()
261 ATF_REQUIRE(pid != -1); in ATF_TEST_CASE_BODY()
265 if (pid2 == -1) { in ATF_TEST_CASE_BODY()
285 // Wait for children to come up. in ATF_TEST_CASE_BODY()
292 // Wait for children to terminate. If they don't, then the test case in ATF_TEST_CASE_BODY()
297 ATF_REQUIRE(::wait(&status) != -1); in ATF_TEST_CASE_BODY()
307 ATF_REQUIRE(pid != -1); in ATF_TEST_CASE_BODY()
318 ATF_REQUIRE(::wait(&status) != -1); in ATF_TEST_CASE_BODY()
328 ATF_REQUIRE(pid != -1); in ATF_TEST_CASE_BODY()
335 ATF_REQUIRE(::wait(&status) != -1); in ATF_TEST_CASE_BODY()
345 ATF_REQUIRE(pid != -1); in ATF_TEST_CASE_BODY()
353 ATF_REQUIRE(::wait(&status) != -1); in ATF_TEST_CASE_BODY()
366 ATF_REQUIRE(pid != -1); in ATF_TEST_CASE_BODY()
374 ATF_REQUIRE(::wait(&status) != -1); in ATF_TEST_CASE_BODY()
386 const pid_t pid = child->pid(); in ATF_TEST_CASE_BODY()
387 child.reset(); // Ensure there is no conflict between destructor and wait. in ATF_TEST_CASE_BODY()
389 const process::status status = process::wait(pid); in ATF_TEST_CASE_BODY()
398 ATF_REQUIRE_THROW(process::system_error, process::wait(1)); in ATF_TEST_CASE_BODY()
442 ATF_REQUIRE(atf::utils::grep_string("Failed to wait", e.what())); in ATF_TEST_CASE_BODY()
448 ATF_INIT_TEST_CASES(tcs) in ATF_INIT_TEST_CASES() argument
450 ATF_ADD_TEST_CASE(tcs, exec__no_args); in ATF_INIT_TEST_CASES()
451 ATF_ADD_TEST_CASE(tcs, exec__some_args); in ATF_INIT_TEST_CASES()
452 ATF_ADD_TEST_CASE(tcs, exec__fail); in ATF_INIT_TEST_CASES()
454 ATF_ADD_TEST_CASE(tcs, exec_unsafe__no_args); in ATF_INIT_TEST_CASES()
455 ATF_ADD_TEST_CASE(tcs, exec_unsafe__some_args); in ATF_INIT_TEST_CASES()
456 ATF_ADD_TEST_CASE(tcs, exec_unsafe__fail); in ATF_INIT_TEST_CASES()
458 ATF_ADD_TEST_CASE(tcs, terminate_group__setpgrp_executed); in ATF_INIT_TEST_CASES()
459 ATF_ADD_TEST_CASE(tcs, terminate_group__setpgrp_not_executed); in ATF_INIT_TEST_CASES()
461 ATF_ADD_TEST_CASE(tcs, terminate_self_with__exitstatus); in ATF_INIT_TEST_CASES()
462 ATF_ADD_TEST_CASE(tcs, terminate_self_with__termsig); in ATF_INIT_TEST_CASES()
463 ATF_ADD_TEST_CASE(tcs, terminate_self_with__termsig_and_core); in ATF_INIT_TEST_CASES()
465 ATF_ADD_TEST_CASE(tcs, wait__ok); in ATF_INIT_TEST_CASES()
466 ATF_ADD_TEST_CASE(tcs, wait__fail); in ATF_INIT_TEST_CASES()
468 ATF_ADD_TEST_CASE(tcs, wait_any__one); in ATF_INIT_TEST_CASES()
469 ATF_ADD_TEST_CASE(tcs, wait_any__many); in ATF_INIT_TEST_CASES()
470 ATF_ADD_TEST_CASE(tcs, wait_any__none_is_failure); in ATF_INIT_TEST_CASES()