• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <fcntl.h>
2 #include <gtest/gtest.h>
3 #include <unistd.h>
4 using namespace testing::ext;
5 
6 class ConfConfstrTest : public testing::Test {
SetUp()7     void SetUp() override {}
TearDown()8     void TearDown() override {}
9 };
10 
11 /**
12  * @tc.name: confstr_001
13  * @tc.desc: Test the usage of confstr to determine the required size for a specific configuration option,
14  *           in this case, the maximum length of a pathname.
15  * @tc.type: FUNC
16  **/
17 HWTEST_F(ConfConfstrTest, confstr_001, TestSize.Level1)
18 {
19     long pathMax;
20     pathMax = confstr(_CS_PATH, nullptr, 0);
21     EXPECT_LE(0, pathMax);
22 }