1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <errno.h>
6 #include <unistd.h>
7 #include <lib/fdio/limits.h>
8 
9 #include <unittest/unittest.h>
10 
sysconf_test(void)11 bool sysconf_test(void) {
12     BEGIN_TEST;
13 
14     int max = sysconf(_SC_OPEN_MAX);
15     ASSERT_EQ(max, FDIO_MAX_FD, "sysconf(_SC_OPEN_MAX) != FDIO_MAX_FD");
16 
17     END_TEST;
18 }
19 
20 BEGIN_TEST_CASE(fdio_open_max_test)
21 RUN_TEST(sysconf_test);
22 END_TEST_CASE(fdio_open_max_test)
23 
24