summaryrefslogtreecommitdiff
path: root/src/test/test-fd-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-05 15:21:47 +0200
committerLennart Poettering <lennart@poettering.net>2018-06-06 14:39:15 +0200
commit9264cc39ce9da6f6cdf675a7b3bb3ef9e8f97cbb (patch)
treefa7090786fc73ef0c7e7a539f50094bd3ba1478e /src/test/test-fd-util.c
parent0e37c169fbacf3b447aa97eac459c29537c34263 (diff)
downloadsystemd-9264cc39ce9da6f6cdf675a7b3bb3ef9e8f97cbb.tar.gz
main: split out reading of /proc/sys/fs/nr_open into its own function
This doesn't really reduce the code size over all, but it does make main.c shorter and more readable, and that's always a good thing.
Diffstat (limited to 'src/test/test-fd-util.c')
-rw-r--r--src/test/test-fd-util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test-fd-util.c b/src/test/test-fd-util.c
index fc3c463385..b1de8aca5c 100644
--- a/src/test/test-fd-util.c
+++ b/src/test/test-fd-util.c
@@ -315,7 +315,14 @@ static void test_fd_duplicate_data_fd(void) {
assert_se(read(fd2, &j, sizeof(j)) == 0);
}
+static void test_read_nr_open(void) {
+ log_info("nr-open: %i", read_nr_open());
+}
+
int main(int argc, char *argv[]) {
+
+ log_set_max_level(LOG_DEBUG);
+
test_close_many();
test_close_nointr();
test_same_fd();
@@ -324,6 +331,7 @@ int main(int argc, char *argv[]) {
test_fd_move_above_stdio();
test_rearrange_stdio();
test_fd_duplicate_data_fd();
+ test_read_nr_open();
return 0;
}