1 #include <gtest/gtest.h> 2 #include <fortify/stat.h> 3 4 using namespace testing::ext; 5 6 class FortifyUmaskchkTest : public testing::Test { SetUp()7 void SetUp() override {} TearDown()8 void TearDown() override {} 9 }; 10 11 /** 12 * @tc.name: __umask_chk_001 13 * @tc.desc: Verify if the __umask_chk is functioning properly. 14 * @tc.type: FUNC 15 * */ 16 HWTEST_F(FortifyUmaskchkTest, __umask_chk_001, TestSize.Level1) 17 { 18 mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO; 19 mode_t result = __umask_chk(mode); 20 result = __umask_chk(result); 21 EXPECT_EQ(mode, result); 22 }