From 282dce564a6cd33469f6b82ce94582bc4d9121be Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 12 Feb 2020 21:42:20 +0300 Subject: Rename fdnull() to fdopen_null() --- tests/backtrace/driver.cxx | 2 +- tests/curl/driver.cxx | 8 ++++---- tests/process-run/driver.cxx | 6 +++--- tests/progress/driver.cxx | 5 +++-- 4 files changed, 11 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/backtrace/driver.cxx b/tests/backtrace/driver.cxx index 442d1e6..d998942 100644 --- a/tests/backtrace/driver.cxx +++ b/tests/backtrace/driver.cxx @@ -121,7 +121,7 @@ main (int argc, const char* argv[]) // Run as a parent. // - auto_fd null (fdnull ()); + auto_fd null (fdopen_null ()); process_exit pe1 (process_run (0 /* stdin */, 1 /* stdout */, quiet ? null.get () : 2 /* stderr */, diff --git a/tests/curl/driver.cxx b/tests/curl/driver.cxx index f2af782..18ed1e6 100644 --- a/tests/curl/driver.cxx +++ b/tests/curl/driver.cxx @@ -55,7 +55,7 @@ tftp () // GET non-existent. // { - curl c (p, nullfd, fdnull (), 2, curl::get, u + "/foo"); + curl c (p, nullfd, fdopen_null (), 2, curl::get, u + "/foo"); assert (!c.wait ()); } @@ -88,7 +88,7 @@ tftp () // GET to /dev/null. // { - curl c (p, nullfd, fdnull (), 2, curl::get, u + "/foo"); + curl c (p, nullfd, fdopen_null (), 2, curl::get, u + "/foo"); assert (c.wait ()); } } @@ -103,14 +103,14 @@ http () // GET non-existent. // { - curl c (p, nullfd, fdnull (), 2, curl::get, u + "/bogus"); + curl c (p, nullfd, fdopen_null (), 2, curl::get, u + "/bogus"); assert (!c.wait ()); } // GET to /dev/null. // { - curl c (p, nullfd, fdnull (), 2, curl::get, u); + curl c (p, nullfd, fdopen_null (), 2, curl::get, u); assert (c.wait ()); } diff --git a/tests/process-run/driver.cxx b/tests/process-run/driver.cxx index 14797c4..94b6e00 100644 --- a/tests/process-run/driver.cxx +++ b/tests/process-run/driver.cxx @@ -94,9 +94,9 @@ main (int argc, const char* argv[]) // Stream conversion and redirection. // - assert (run (fdnull (), 1, 2, p, "-c", "-i")); - assert (run (fdnull (), 2, 2, p, "-c", "-o", "abc")); - assert (run (fdnull (), 1, 1, p, "-c", "-e", "abc")); + assert (run (fdopen_null (), 1, 2, p, "-c", "-i")); + assert (run (fdopen_null (), 2, 2, p, "-c", "-o", "abc")); + assert (run (fdopen_null (), 1, 1, p, "-c", "-e", "abc")); { fdpipe pipe (fdopen_pipe ()); diff --git a/tests/progress/driver.cxx b/tests/progress/driver.cxx index 2ec310b..2a0b647 100644 --- a/tests/progress/driver.cxx +++ b/tests/progress/driver.cxx @@ -37,7 +37,7 @@ import butl.optional; // @@ MOD Clang should not be necessary. import butl.small_vector; // @@ MOD Clang should not be necessary. #else #include -#include // fdnull(), stderr_fd() +#include // fdopen_null(), stderr_fd() #include #endif @@ -112,7 +112,8 @@ main (int argc, const char* argv[]) } process pr (!no_child - ? process_start (fdnull (), fdnull (), 2, argv[0], "-c") + ? process_start (fdopen_null (), fdopen_null (), 2, + argv[0], "-c") : process (process_exit (0))); // Exited normally. for (size_t i (100); i != 0; --i) -- cgit v1.1