/freebsd/contrib/kyua/utils/process/ |
H A D | operations_test.cpp | 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() [all …]
|
H A D | child_test.cpp | 33 #include <sys/wait.h> 48 #include <atf-c++.hpp> 209 return fs::path(tc->get_config_var("srcdir")) / "helpers"; in get_helpers() 217 /// \return Always -1. 223 return -1; in fork_fail() 227 /// Mock open(2) that fails if the 'raise-error' file is opened. 234 /// \return The opened file handle or -1 on error. 239 if (std::strcmp(path, "raise-error") == 0) { in open_fail() 241 return -1; in open_fail() 256 /// \return Always -1. [all …]
|
H A D | deadline_killer_test.cpp | 38 #include <atf-c++.hpp> 73 process::deadline_killer killer(datetime::delta(1, 0), child->pid()); in ATF_TEST_CASE_BODY() 74 const process::status status = child->wait(); in ATF_TEST_CASE_BODY() 79 ATF_REQUIRE(end - start <= datetime::delta(10, 0)); in ATF_TEST_CASE_BODY() 92 process::deadline_killer killer(datetime::delta(60, 0), child->pid()); in ATF_TEST_CASE_BODY() 93 const process::status status = child->wait(); in ATF_TEST_CASE_BODY() 98 ATF_REQUIRE(end - start <= datetime::delta(10, 0)); in ATF_TEST_CASE_BODY() 104 ATF_INIT_TEST_CASES(tcs) in ATF_INIT_TEST_CASES() argument 106 ATF_ADD_TEST_CASE(tcs, activation); in ATF_INIT_TEST_CASES() 107 ATF_ADD_TEST_CASE(tcs, no_activation); in ATF_INIT_TEST_CASES()
|
H A D | status_test.cpp | 32 #include <sys/wait.h> 40 #include <atf-c++.hpp> 79 ATF_REQUIRE(pid != -1); in fork_and_wait() 85 ATF_REQUIRE(::waitpid(pid, &stat_loc, 0) != -1); in fork_and_wait() 100 ATF_REQUIRE_EQ(-1, fake.dead_pid()); in ATF_TEST_CASE_BODY() 111 ATF_REQUIRE_EQ(-1, fake.dead_pid()); in ATF_TEST_CASE_BODY() 197 ATF_INIT_TEST_CASES(tcs) in ATF_INIT_TEST_CASES() argument 199 ATF_ADD_TEST_CASE(tcs, fake_exited); in ATF_INIT_TEST_CASES() 200 ATF_ADD_TEST_CASE(tcs, fake_signaled); in ATF_INIT_TEST_CASES() 202 ATF_ADD_TEST_CASE(tcs, output__exitstatus); in ATF_INIT_TEST_CASES() [all …]
|
H A D | executor_test.cpp | 34 #include <sys/wait.h> 46 #include <atf-c++.hpp> 92 /// on-disk files and we want to leave them in place so that the parent process 152 const int exit_code = ::system("rm *") == -1 in child_delete_all() 260 if (pid == -1) { in child_spawn_blocking_child() 288 if (utils::getenv("HOME").get() == "fake-value") { in child_validate_isolation() 366 if (::kill(pid, SIGCONT) != -1 || errno != ESRCH) { in ensure_dead() 368 std::cout << "Subprocess not dead yet; retrying wait\n"; in ensure_dead() 369 --attempts; in ensure_dead() 426 const int exit_status = exp_exit_statuses.find(original_pid)->second; in ATF_TEST_CASE_BODY() [all …]
|
H A D | isolation_test.cpp | 44 #include <atf-c++.hpp> 83 const process::status status = child->wait(); in fork_and_run() 98 fs::mkdir(fs::path("some-directory"), 0755); in check_clean_environment() 99 process::isolate_child(none, fs::path("some-directory")); in check_clean_environment() 114 if (utils::getenv_with_default("HOME", "") != "some-directory") { in check_clean_environment() 119 if (utils::getenv_with_default("TMPDIR", "") != "some-directory") { in check_clean_environment() 129 if (utils::getenv_with_default("LEAVE_ME_ALONE", "") != "kill-some-day") { in check_clean_environment() 175 if (::getgroups(1, groups) == -1) { in operator ()() 259 "-i", in check_no_terminal() 260 "-c", in check_no_terminal() [all …]
|
/freebsd/contrib/kyua/utils/ |
H A D | stream_test.cpp | 34 #include <atf-c++.hpp> 52 atf::utils::wait(pid, EXIT_SUCCESS, "Message to stdout\n", ""); in ATF_TEST_CASE_BODY() 67 atf::utils::wait(pid, EXIT_SUCCESS, "", "Message to stderr\n"); in ATF_TEST_CASE_BODY() 77 fs::path("some-file.txt")); in ATF_TEST_CASE_BODY() 82 atf::utils::wait(pid, EXIT_SUCCESS, "", ""); in ATF_TEST_CASE_BODY() 83 atf::utils::compare_file("some-file.txt", "Message to other file\n"); in ATF_TEST_CASE_BODY() 143 ATF_INIT_TEST_CASES(tcs) in ATF_INIT_TEST_CASES() argument 145 ATF_ADD_TEST_CASE(tcs, open_ostream__stdout); in ATF_INIT_TEST_CASES() 146 ATF_ADD_TEST_CASE(tcs, open_ostream__stderr); in ATF_INIT_TEST_CASES() 147 ATF_ADD_TEST_CASE(tcs, open_ostream__other); in ATF_INIT_TEST_CASES() [all …]
|
H A D | stacktrace_test.cpp | 43 #include <atf-c++.hpp> 162 const fs::path helper = fs::path(test_case->get_config_var("srcdir")) / in generate_core() 167 fs::path("unused.out"), fs::path("unused.err"))->wait(); in generate_core() 196 const fs::path helper = fs::path(test_case->get_config_var("srcdir")) / in generate_core() 201 const executor::exit_handle exit_handle = executor_handle.wait(exec_handle); in generate_core() 222 ATF_REQUIRE(::chmod(script, 0755) != -1); in create_script() 237 if (::setrlimit(RLIMIT_CORE, &rl) == -1) in ATF_TEST_CASE_BODY() 246 fs::path("unused.out"), fs::path("unused.err"))->wait(); in ATF_TEST_CASE_BODY() 261 if (::setrlimit(RLIMIT_CORE, &rl) == -1) in ATF_TEST_CASE_BODY() 270 fs::path("unused.out"), fs::path("unused.err"))->wait(); in ATF_TEST_CASE_BODY() [all …]
|
H A D | passwd_test.cpp | 32 #include <sys/wait.h> 41 #include <atf-c++.hpp> 49 const passwd_ns::user user("the-name", 1, 2); in ATF_TEST_CASE_BODY() 50 ATF_REQUIRE_EQ("the-name", user.name); in ATF_TEST_CASE_BODY() 59 const passwd_ns::user user("i-am-root", 0, 10); in ATF_TEST_CASE_BODY() 67 const passwd_ns::user user("i-am-not-root", 123, 10); in ATF_TEST_CASE_BODY() 84 const passwd_ns::user new_user("someone-else", ::getuid() + 1, 0); in ATF_TEST_CASE_BODY() 99 const passwd_ns::user user = passwd_ns::find_user_by_name(pw->pw_name); in ATF_TEST_CASE_BODY() 102 ATF_REQUIRE_EQ(pw->pw_name, user.name); in ATF_TEST_CASE_BODY() 109 ATF_REQUIRE_THROW_RE(std::runtime_error, "Failed.*user 'i-do-not-exist'", in ATF_TEST_CASE_BODY() [all …]
|
H A D | sanity_test.cpp | 39 #include <atf-c++.hpp> 51 #define FILE_REGEXP __FILE__ ":[0-9]+: " 72 function, Stdout_File, Stderr_File)->wait(); in run_test() 260 utils::install_crash_handlers("test-log.txt"); in do_crash_handler_test() 278 ATF_REQUIRE(atf::utils::grep_file("Log file is test-log.txt", in crash_handler_test() 305 ATF_INIT_TEST_CASES(tcs) in ATF_INIT_TEST_CASES() argument 307 ATF_ADD_TEST_CASE(tcs, inv__holds); in ATF_INIT_TEST_CASES() 308 ATF_ADD_TEST_CASE(tcs, inv__triggers_default_message); in ATF_INIT_TEST_CASES() 309 ATF_ADD_TEST_CASE(tcs, inv__triggers_custom_message); in ATF_INIT_TEST_CASES() 310 ATF_ADD_TEST_CASE(tcs, pre__holds); in ATF_INIT_TEST_CASES() [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/interconnect/ |
H A D | qcom,bcm-voter.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/interconnect/qcom,bcm-voter.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Qualcomm BCM-Voter Interconnect 10 - Georgi Djakov <georgi.djakov@linaro.org> 22 - qcom,bcm-voter 24 qcom,tcs-wait: 26 Optional mask of which TCSs (Triggered Command Sets) wait for completion 27 upon triggering. If not specified, then the AMC and WAKE sets wait for [all …]
|
/freebsd/contrib/atf/atf-c++/ |
H A D | utils_test.cpp | 26 #include "atf-c++/utils.hpp" 30 #include <sys/wait.h> 43 #include <atf-c++.hpp> 51 if (fd == -1) in read_file() 53 const ssize_t length = read(fd, buffer, sizeof(buffer) - 1); in read_file() 55 ATF_REQUIRE(length != -1); in read_file() 56 if (length == sizeof(buffer) - 1) in read_file() 63 // ------------------------------------------------------------------------ 65 // ------------------------------------------------------------------------ 155 for (; i < sizeof(long_contents) - 1; i++) in ATF_TEST_CASE_BODY() [all …]
|
H A D | atf-c++.3 | 29 .Nm atf-c++ , 62 .Nm atf::utils::wait 63 .Nd C++ API to write ATF-based test programs 66 .Fn ATF_ADD_TEST_CASE "tcs" "name" 69 .Fn ATF_INIT_TEST_CASES "tcs" 137 .Fo atf::utils::wait 145 C++-based test programs follow this template: 146 .Bd -literal -offset indent 148 \&... C-specific includes go here ... 151 \&... C++-specific includes go here ... [all …]
|
H A D | tests.cpp | 26 #include "atf-c++/tests.hpp" 36 #include <sys/wait.h> 55 #include "atf-c/error.h" 56 #include "atf-c/tc.h" 57 #include "atf-c/utils.h" 60 #include "atf-c++/detail/application.hpp" 61 #include "atf-c++/detail/auto_array.hpp" 62 #include "atf-c++/detail/env.hpp" 63 #include "atf-c++/detail/exceptions.hpp" 64 #include "atf-c++/detail/fs.hpp" [all …]
|
/freebsd/contrib/kyua/utils/signals/ |
H A D | interrupts_test.cpp | 39 #include <atf-c++.hpp> 56 /// Set to the signal that fired; -1 if none. 57 static volatile int fired_signal = -1; 68 PRE(fired_signal == -1 || fired_signal == signo); in signal_handler() 80 // a SIGKILL that we cannot handle, not just any non-deadly signal. in pause_child() 100 fired_signal = -1; in check_interrupts_handler() 133 ATF_REQUIRE_EQ(-1, fired_signal); in check_interrupts_handler() 154 ATF_REQUIRE_EQ(-1, fired_signal); in check_interrupts_inhibiter() 157 ATF_REQUIRE_EQ(-1, fired_signal); in check_interrupts_inhibiter() 213 // ourselves will cause the signal to be re-delivered to our children due to in ATF_TEST_CASE_BODY() [all …]
|
H A D | misc_test.cpp | 38 #include <atf-c++.hpp> 71 if (::sigaction(SIGUSR1, &sa, NULL) == -1) in program_reset_raise() 104 process::status status = child->wait(); in ATF_TEST_CASE_BODY() 113 ATF_REQUIRE_THROW(signals::system_error, signals::reset(-1)); in ATF_TEST_CASE_BODY() 122 process::status status = child->wait(); in ATF_TEST_CASE_BODY() 128 ATF_INIT_TEST_CASES(tcs) in ATF_INIT_TEST_CASES() argument 130 ATF_ADD_TEST_CASE(tcs, reset__ok); in ATF_INIT_TEST_CASES() 131 ATF_ADD_TEST_CASE(tcs, reset__invalid); in ATF_INIT_TEST_CASES() 132 ATF_ADD_TEST_CASE(tcs, reset_all); in ATF_INIT_TEST_CASES()
|
H A D | timer_test.cpp | 40 #include <atf-c++.hpp> 95 /// \param timers Pointers to all the timers to wait for. 105 if (timer->fired()) in wait_timers() 167 ATF_REQUIRE(!timers[i]->fired()); in ATF_TEST_CASE_BODY() 189 ATF_REQUIRE(!timers[timers.size() - 1]->fired()); in ATF_TEST_CASE_BODY() 194 ATF_REQUIRE(!timers[timers.size() - 1]->fired()); in ATF_TEST_CASE_BODY() 199 ATF_REQUIRE(!timers[timers.size() - 1]->fired()); in ATF_TEST_CASE_BODY() 204 ATF_REQUIRE(!timers[timers.size() - 1]->fired()); in ATF_TEST_CASE_BODY() 244 timers[1]->unprogram(); delete timers[1]; timers.erase(timers.begin() + 1); in ATF_TEST_CASE_BODY() 247 timers[2]->unprogram(); delete timers[2]; timers.erase(timers.begin() + 2); in ATF_TEST_CASE_BODY() [all …]
|
/freebsd/lib/csu/tests/ |
H A D | cxx_constructors.cc | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 7 * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 33 #include <sys/wait.h> 40 #include <atf-c++.hpp> 82 case -1: in ATF_TEST_CASE_BODY() 88 while ((wpid = waitpid(pid, &status, 0)) == -1 && in ATF_TEST_CASE_BODY() 96 ATF_INIT_TEST_CASES(tcs) in ATF_INIT_TEST_CASES() argument 99 ATF_ADD_TEST_CASE(tcs, cxx_constructor); in ATF_INIT_TEST_CASES() 100 ATF_ADD_TEST_CASE(tcs, cxx_destructor); in ATF_INIT_TEST_CASES()
|
/freebsd/contrib/kyua/cli/ |
H A D | main_test.cpp | 37 #include <atf-c++.hpp> 153 ui->out("stdout message from subcommand"); in run() 154 ui->err("stderr message from subcommand"); in run() 172 fs::path("/home/fake/.kyua/logs/progname1.20110221-211030.log"), in ATF_TEST_CASE_BODY() 185 ATF_REQUIRE_EQ(fs::path("/a/b/c/progname2.20110221-211050.log"), in ATF_TEST_CASE_BODY() 198 ATF_REQUIRE_EQ(fs::path("/tmp/progname3.20110221-211500.log"), in ATF_TEST_CASE_BODY() 253 ".kyua/logs/progname.20110221-213000.log"))); in ATF_TEST_CASE_BODY() 256 ".kyua/logs/progname.20110221-213000.log"))); in ATF_TEST_CASE_BODY() 268 const char* const argv[] = {"progname", "--logfile=test.log", NULL}; in ATF_TEST_CASE_BODY() 274 ".kyua/logs/progname.20110221-213000.log"))); in ATF_TEST_CASE_BODY() [all …]
|
/freebsd/contrib/kyua/utils/fs/ |
H A D | operations_test.cpp | 34 #include <sys/wait.h> 49 #include <atf-c++.hpp> 89 if (std::strcmp(dp->d_name, name) == 0) { in lookup() 92 ATF_REQUIRE(::stat(lookup_path.c_str(), &s) != -1); in lookup() 140 ATF_REQUIRE(::chmod(target.c_str(), 0444) != -1); in ATF_TEST_CASE_BODY() 153 ATF_REQUIRE(::chdir("root") != -1); in ATF_TEST_CASE_BODY() 155 ATF_REQUIRE_EQ(cwd.str().length() - 5, cwd.str().find("/root")); in ATF_TEST_CASE_BODY() 165 ATF_REQUIRE(::chdir("root") != -1); in ATF_TEST_CASE_BODY() 166 ATF_REQUIRE(::rmdir("../root") != -1); in ATF_TEST_CASE_BODY() 241 ATF_REQUIRE(!fs::find_in_path("foo-bar")); in ATF_TEST_CASE_BODY() [all …]
|
/freebsd/libexec/bootpd/ |
H A D | dumptab.c | 2 * dumptab.c - handles dumping the database 50 #\tfirst field -- hostname (not indented)\n\ in dumptab() 51 #\tbf -- bootfile\n\ in dumptab() 52 #\tbs -- bootfile size in 512-octet blocks\n\ in dumptab() 53 #\tcs -- cookie servers\n\ in dumptab() 54 #\tdf -- dump file name\n\ in dumptab() 55 #\tdn -- domain name\n\ in dumptab() 56 #\tds -- domain name servers\n\ in dumptab() 57 #\tef -- extension file\n\ in dumptab() 58 #\tex -- exec file (YORK_EX_OPTION)\n\ in dumptab() [all …]
|
/freebsd/sys/cam/ctl/ |
H A D | ctl_frontend_iscsi.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 95 &ping_timeout, 5, "Interval between ping (NOP-Out) requests, in seconds"); 98 &login_timeout, 60, "Time to wait for ctld(8) to finish Login Phase, in seconds"); 123 __func__, S->cs_initiator_addr, \ 124 S->cs_initiator_name, ## __VA_ARGS__); \ 132 S->cs_initiator_addr, \ 133 S->cs_initiator_name, ## __VA_ARGS__); \ 137 #define CFISCSI_SESSION_LOCK(X) mtx_lock(&X->cs_lock) 138 #define CFISCSI_SESSION_UNLOCK(X) mtx_unlock(&X->cs_lock) [all …]
|
/freebsd/contrib/kyua/engine/ |
H A D | scheduler.cpp | 152 if (iter->name != "." && iter->name != "..") in append_files_listing() 153 names.insert(iter->name); in append_files_listing() 201 /// Test program-specific execution interface. 238 /// \param interface_ Test program-specific execution interface. 248 const model::test_case& test_case = test_program->find(test_case_name); in test_exec_data() 356 0, absolute.length() - relative.length()); in force_absolute_paths() 374 /// User-provided configuration variables. 382 /// \param user_config User-provided configuration variables. 399 _interface->exec_list(_test_program, vars); in operator ()() 415 /// User-provided configuration variables. [all …]
|
/freebsd/sys/dev/ice/ |
H A D | ice_lib.c | 1 /* SPDX-License-Identifier: BSD-3-Clause */ 267 * ice_map_bar - Map PCIe BAR memory in ice_map_bar() 278 if (bar->res != NULL) { in ice_map_bar() 283 bar->rid = PCIR_BAR(bar_num); 284 bar->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &bar->rid, 286 if (!bar->re [all...] |
/freebsd/contrib/atf/ |
H A D | NEWS | 8 DON'T FORGET TO BUMP THE -version-info PRE-RELEASE IF NECESSARY! 10 * Issue #23: Fix double-free triggered by atf_map_insert in low memory 18 * Added the atf_check_not_equal function to atf-sh to check for 30 * Added the -s flag to atf-sh to support specifying the shell interpreter 39 relevant manual pages. This information was lost with the atf-config(1) 46 * Renamed the atf-{c,c++,sh}-api(3) manual pages to atf-{c,c++,sh}(3) for 53 * Issue #7: Stopped catching unhandled exceptions in atf-c++ tests. This 58 * Issue #8: Fixed atf-c/macros_test:use test failures spotted by the clang 59 that ships with FreeBSD 11.0-CURRENT. 61 * Issue #12: Improved documentation of atf-sh(3) and atf-check(1) by better [all …]
|