diff --git a/test/fuzztest/accesstokenid/src/accesstokenidcommon.cpp b/test/fuzztest/accesstokenid/src/accesstokenidcommon.cpp index fc35c97e216920cab3f9db9a097e4cf4854b5d20..5fa30eaf77434bf02c9f0d08c75f297259181666 100644 --- a/test/fuzztest/accesstokenid/src/accesstokenidcommon.cpp +++ b/test/fuzztest/accesstokenid/src/accesstokenidcommon.cpp @@ -21,11 +21,11 @@ namespace OHOS { namespace Kernel { namespace AccessToken { -const char *DEVACCESSTOKENID = "/dev/access_token_id"; +const char *g_devaccesstokenid = "/dev/access_token_id"; int GetTokenid(unsigned long long *token) { - int fd = open(DEVACCESSTOKENID, O_RDWR); + int fd = open(g_devaccesstokenid, O_RDWR); if (fd < 0) { return -1; } @@ -40,7 +40,7 @@ int GetTokenid(unsigned long long *token) int SetTokenid(unsigned long long *token) { - int fd = open(DEVACCESSTOKENID, O_RDWR); + int fd = open(g_devaccesstokenid, O_RDWR); if (fd < 0) { return -1; } @@ -182,7 +182,7 @@ int AccessTokenidGrpTestOther(uint8_t *dataToken) int GetfTokenid(unsigned long long *ftoken) { - int fd = open(DEVACCESSTOKENID, O_RDWR); + int fd = open(g_devaccesstokenid, O_RDWR); if (fd < 0) { return -1; } @@ -199,7 +199,7 @@ int GetfTokenid(unsigned long long *ftoken) int SetfTokenid(unsigned long long *ftoken) { - int fd = open(DEVACCESSTOKENID, O_RDWR); + int fd = open(g_devaccesstokenid, O_RDWR); if (fd < 0) { return -1; } diff --git a/test/fuzztest/hc_node/hcenable_fuzzer/hcenable_fuzzer.cpp b/test/fuzztest/hc_node/hcenable_fuzzer/hcenable_fuzzer.cpp index 2668d4c90f9ead896f7ae7fccbeca438d71b9289..dc502cbe89d03c9bd84a59db880d098872031196 100644 --- a/test/fuzztest/hc_node/hcenable_fuzzer/hcenable_fuzzer.cpp +++ b/test/fuzztest/hc_node/hcenable_fuzzer/hcenable_fuzzer.cpp @@ -13,12 +13,12 @@ #include #include "hccommon.h" -const char *HC_ENABLE = "/sys/fs/f2fs/loop1/hc_enable"; +const char *g_hcEnable = "/sys/fs/f2fs/loop1/hc_enable"; namespace OHOS { bool HcEnableFuzzer(const uint8_t *data, size_t size) { - bool ret = HcFuzzTest(data, HC_ENABLE, size); + bool ret = HcFuzzTest(data, g_hcEnable, size); return ret; } } // namespace OHOS diff --git a/test/fuzztest/hc_node/hchotdatalowerlimit_fuzzer/hchotdatalowerlimit_fuzzer.cpp b/test/fuzztest/hc_node/hchotdatalowerlimit_fuzzer/hchotdatalowerlimit_fuzzer.cpp index 49d7010db4578274cc542d2f5b010d18a80d4aaa..11b331f85737c23ff2c907bb73d9237d092fd3df 100644 --- a/test/fuzztest/hc_node/hchotdatalowerlimit_fuzzer/hchotdatalowerlimit_fuzzer.cpp +++ b/test/fuzztest/hc_node/hchotdatalowerlimit_fuzzer/hchotdatalowerlimit_fuzzer.cpp @@ -13,12 +13,12 @@ #include #include "hccommon.h" -const char *HC_HOT_DATA_LOWER_LIMIT = "/sys/fs/f2fs/loop1/hc_hot_data_lower_limit"; +const char *g_hcHotDataLowerLimit = "/sys/fs/f2fs/loop1/hc_hot_data_lower_limit"; namespace OHOS { bool HcHotDataLowerLimitFuzzer(const uint8_t *data, size_t size) { - bool ret = HcFuzzTest(data, HC_HOT_DATA_LOWER_LIMIT, size); + bool ret = HcFuzzTest(data, g_hcHotDataLowerLimit, size); return ret; } } // namespace OHOS diff --git a/test/fuzztest/hc_node/hchotdatawaterline_fuzzer/hchotdatawaterline_fuzzer.cpp b/test/fuzztest/hc_node/hchotdatawaterline_fuzzer/hchotdatawaterline_fuzzer.cpp index f40fa837d5a469d7fe5ce187d2952aea58688318..96df8a21096cd085c675506c308be7e4b2a33e29 100644 --- a/test/fuzztest/hc_node/hchotdatawaterline_fuzzer/hchotdatawaterline_fuzzer.cpp +++ b/test/fuzztest/hc_node/hchotdatawaterline_fuzzer/hchotdatawaterline_fuzzer.cpp @@ -13,12 +13,12 @@ #include #include "hccommon.h" -const char *HC_HOT_DATA_WATERLINE = "/sys/fs/f2fs/loop1/hc_hot_data_waterline"; +const char *g_hcHotDataWaterline = "/sys/fs/f2fs/loop1/hc_hot_data_waterline"; namespace OHOS { bool HcHotDataWaterlineFuzzer(const uint8_t *data, size_t size) { - bool ret = HcFuzzTest(data, HC_HOT_DATA_WATERLINE, size); + bool ret = HcFuzzTest(data, g_hcHotDataWaterline, size); return ret; } } // namespace OHOS diff --git a/test/fuzztest/hc_node/hchotnodelowerlimit_fuzzer/hchotnodelowerlimit_fuzzer.cpp b/test/fuzztest/hc_node/hchotnodelowerlimit_fuzzer/hchotnodelowerlimit_fuzzer.cpp index 923339e3f7f40977555f314bfd01548961867a23..b2ea4c7a4fd56389c70b56205b425cfe6ce0eb1d 100644 --- a/test/fuzztest/hc_node/hchotnodelowerlimit_fuzzer/hchotnodelowerlimit_fuzzer.cpp +++ b/test/fuzztest/hc_node/hchotnodelowerlimit_fuzzer/hchotnodelowerlimit_fuzzer.cpp @@ -13,12 +13,12 @@ #include #include "hccommon.h" -const char *HC_HOT_NODE_LOWER_LIMIT = "/sys/fs/f2fs/loop1/hc_hot_node_lower_limit"; +const char *g_hcHotNodeLowerLimit = "/sys/fs/f2fs/loop1/hc_hot_node_lower_limit"; namespace OHOS { bool HcHotNodeLowerLimitFuzzTest(const uint8_t *data, size_t size) { - bool ret = HcFuzzTest(data, HC_HOT_NODE_LOWER_LIMIT, size); + bool ret = HcFuzzTest(data, g_hcHotNodeLowerLimit, size); return ret; } } // namespace OHOS diff --git a/test/fuzztest/hc_node/hchotnodewaterline_fuzzer/hchotnodewaterline_fuzzer.cpp b/test/fuzztest/hc_node/hchotnodewaterline_fuzzer/hchotnodewaterline_fuzzer.cpp index 868f6dbd1cc12eb23ab60344cee58c248e57615a..53abec06783490086a5d8c35089d30b2da9cb5a2 100644 --- a/test/fuzztest/hc_node/hchotnodewaterline_fuzzer/hchotnodewaterline_fuzzer.cpp +++ b/test/fuzztest/hc_node/hchotnodewaterline_fuzzer/hchotnodewaterline_fuzzer.cpp @@ -13,12 +13,12 @@ #include #include "hccommon.h" -const char *HC_HOT_NODE_WATERLINE = "/sys/fs/f2fs/loop1/hc_hot_node_waterline"; +const char *g_hcHotNodeWaterline = "/sys/fs/f2fs/loop1/hc_hot_node_waterline"; namespace OHOS { bool HcHotNodeWaterlineFuzzTest(const uint8_t *data, size_t size) { - bool ret = HcFuzzTest(data, HC_HOT_NODE_WATERLINE, size); + bool ret = HcFuzzTest(data, g_hcHotNodeWaterline, size); return ret; } } // namespace OHOS diff --git a/test/fuzztest/hc_node/hcwarmdatalowerlimit_fuzzer/hcwarmdatalowerlimit_fuzzer.cpp b/test/fuzztest/hc_node/hcwarmdatalowerlimit_fuzzer/hcwarmdatalowerlimit_fuzzer.cpp index b4a59bc5074602a281ab9080b5f29c1ed089c1eb..e1bceafaadd19b7e3b2967785566ea6bf84d126b 100644 --- a/test/fuzztest/hc_node/hcwarmdatalowerlimit_fuzzer/hcwarmdatalowerlimit_fuzzer.cpp +++ b/test/fuzztest/hc_node/hcwarmdatalowerlimit_fuzzer/hcwarmdatalowerlimit_fuzzer.cpp @@ -13,12 +13,12 @@ #include #include "hccommon.h" -const char *HC_WARM_DATA_LOWER_LIMIT = "/sys/fs/f2fs/loop1/hc_warm_data_lower_limit"; +const char *g_hcWarmDataLowerLimit = "/sys/fs/f2fs/loop1/hc_warm_data_lower_limit"; namespace OHOS { bool HcWarmDataLowerLimitFuzzTest(const uint8_t *data, size_t size) { - bool ret = HcFuzzTest(data, HC_WARM_DATA_LOWER_LIMIT, size); + bool ret = HcFuzzTest(data, g_hcWarmDataLowerLimit, size); return ret; } } // namespace OHOS diff --git a/test/fuzztest/hc_node/hcwarmdatawaterline_fuzzer/hcwarmdatawaterline_fuzzer.cpp b/test/fuzztest/hc_node/hcwarmdatawaterline_fuzzer/hcwarmdatawaterline_fuzzer.cpp index 30014636a72972a384affc118dc65f669eedca47..48b8334e3ca7fc6d44311b82f9e1dd4658aeb6cc 100644 --- a/test/fuzztest/hc_node/hcwarmdatawaterline_fuzzer/hcwarmdatawaterline_fuzzer.cpp +++ b/test/fuzztest/hc_node/hcwarmdatawaterline_fuzzer/hcwarmdatawaterline_fuzzer.cpp @@ -13,12 +13,12 @@ #include #include "hccommon.h" -const char *HC_WARM_DATA_WATERLINE = "/sys/fs/f2fs/loop1/hc_warm_data_waterline"; +const char *g_hcWarmDataWaterline = "/sys/fs/f2fs/loop1/hc_warm_data_waterline"; namespace OHOS { bool HcWarmDataWaterLineFuzzTest(const uint8_t *data, size_t size) { - bool ret = HcFuzzTest(data, HC_WARM_DATA_WATERLINE, size); + bool ret = HcFuzzTest(data, g_hcWarmDataWaterline, size); return ret; } } // namespace OHOS diff --git a/test/fuzztest/hc_node/hcwarmnodelowerlimit_fuzzer/hcwarmnodelowerlimit_fuzzer.cpp b/test/fuzztest/hc_node/hcwarmnodelowerlimit_fuzzer/hcwarmnodelowerlimit_fuzzer.cpp index d5ec6193c2a5231c4fa029f5877cc133fb647de9..443a12769a43b7a9beccac90e9dd4d57f51a4183 100644 --- a/test/fuzztest/hc_node/hcwarmnodelowerlimit_fuzzer/hcwarmnodelowerlimit_fuzzer.cpp +++ b/test/fuzztest/hc_node/hcwarmnodelowerlimit_fuzzer/hcwarmnodelowerlimit_fuzzer.cpp @@ -13,12 +13,12 @@ #include #include "hccommon.h" -const char *HC_WARM_NODE_LOWER_LIMIT = "/sys/fs/f2fs/loop1/hc_warm_node_lower_limit"; +const char *g_hcWarmNodeLowerLimit = "/sys/fs/f2fs/loop1/hc_warm_node_lower_limit"; namespace OHOS { bool HcWarmNodeLowerLimit(const uint8_t *data, size_t size) { - bool ret = HcFuzzTest(data, HC_WARM_NODE_LOWER_LIMIT, size); + bool ret = HcFuzzTest(data, g_hcWarmNodeLowerLimit, size); return ret; } } // namespace OHOS diff --git a/test/fuzztest/hc_node/hcwarmnodewaterline_fuzzer/hcwarmnodewaterline_fuzzer.cpp b/test/fuzztest/hc_node/hcwarmnodewaterline_fuzzer/hcwarmnodewaterline_fuzzer.cpp index e13cde71b970124a67452b162bac5afbdd9292ec..f54a3219834c6d2f077271bc4271c1e039edc520 100644 --- a/test/fuzztest/hc_node/hcwarmnodewaterline_fuzzer/hcwarmnodewaterline_fuzzer.cpp +++ b/test/fuzztest/hc_node/hcwarmnodewaterline_fuzzer/hcwarmnodewaterline_fuzzer.cpp @@ -13,12 +13,12 @@ #include #include "hccommon.h" -const char *HC_WARM_NODE_WATERLINE = "/sys/fs/f2fs/loop1/hc_warm_node_waterline"; +const char *g_hcWarmNodeWaterline = "/sys/fs/f2fs/loop1/hc_warm_node_waterline"; namespace OHOS { bool HcWarmNodeLowerWaterLine(const uint8_t *data, size_t size) { - bool ret = HcFuzzTest(data, HC_WARM_NODE_WATERLINE, size); + bool ret = HcFuzzTest(data, g_hcWarmNodeWaterline, size); return ret; } } // namespace OHOS diff --git a/test/tracepointtest/emmc.h b/test/tracepointtest/emmc.h index 166c6861fbfc869f103655765059e4f332e75cc4..5f11f460436fa80712f235fed518905fcca08bdf 100644 --- a/test/tracepointtest/emmc.h +++ b/test/tracepointtest/emmc.h @@ -13,8 +13,8 @@ #define TRACE_SYSTEM emmc #define TRACE_INCLUDE_PATH trace/hooks -#if !defined(_TRACE_HOOKS_EMMC_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_HOOKS_EMMC_H +#if !defined(TRACE_HOOKS_EMMC_H) || defined(TRACE_HEADER_MULTI_READ) +#define TRACE_HOOKS_EMMC_H #include #include diff --git a/test/tracepointtest/tracepoint_test/tracepoint_test.c b/test/tracepointtest/tracepoint_test/tracepoint_test.c index 2510ee08a4dafc3c3c708c3febef7b514b497116..158ad023f351e92196b3bd5c62a5747b3d143f53 100644 --- a/test/tracepointtest/tracepoint_test/tracepoint_test.c +++ b/test/tracepointtest/tracepoint_test/tracepoint_test.c @@ -33,4 +33,4 @@ static void tracepoint_test_exit_module(void) /* module entry points */ module_init(tracepoint_test_init_module); module_exit(tracepoint_test_exit_module); -MODULE_LICENSE ("GPL v2"); +MODULE_LICENSE("GPL v2"); diff --git a/test/tracepointtest/vendoramlemmcpartition_test/vendoramlemmcpartition_test.c b/test/tracepointtest/vendoramlemmcpartition_test/vendoramlemmcpartition_test.c index a2e0b243b580b9488e1e0f12b1e4febf10bb1ef4..b0cc4efaf6a74e6f296c84d2d67cfae9cb739602 100644 --- a/test/tracepointtest/vendoramlemmcpartition_test/vendoramlemmcpartition_test.c +++ b/test/tracepointtest/vendoramlemmcpartition_test/vendoramlemmcpartition_test.c @@ -32,4 +32,4 @@ static void aml_emmc_partition_test_exit_module(void) /* module entry points */ module_init(aml_emmc_partition_test_init_module); module_exit(aml_emmc_partition_test_exit_module); -MODULE_LICENSE ("GPL v2"); +MODULE_LICENSE("GPL v2"); diff --git a/test/tracepointtest/vendordommap_test/vendordommap_test.c b/test/tracepointtest/vendordommap_test/vendordommap_test.c index e109b62146bbada835531ceb890306b7b1e2f1f8..720343ba9fe96df14a3b53ab62150401ab9ed054 100644 --- a/test/tracepointtest/vendordommap_test/vendordommap_test.c +++ b/test/tracepointtest/vendordommap_test/vendordommap_test.c @@ -32,4 +32,4 @@ static void mmap_test_exit_module(void) /* module entry points */ module_init(mmap_test_init_module); module_exit(mmap_test_exit_module); -MODULE_LICENSE ("GPL v2"); +MODULE_LICENSE("GPL v2"); diff --git a/test/tracepointtest/vendordomprotectpkey_test/vendordomprotectpkey_test.c b/test/tracepointtest/vendordomprotectpkey_test/vendordomprotectpkey_test.c index 4f67eb568a89a92731e7e96d91528768f5e828fe..1ebf548d53af338bd142d0051c784d37fbfb13c3 100644 --- a/test/tracepointtest/vendordomprotectpkey_test/vendordomprotectpkey_test.c +++ b/test/tracepointtest/vendordomprotectpkey_test/vendordomprotectpkey_test.c @@ -32,4 +32,4 @@ static void mprotect_pkey_test_exit_module(void) /* module entry points */ module_init(mprotect_pkey_test_init_module); module_exit(mprotect_pkey_test_exit_module); -MODULE_LICENSE ("GPL v2"); +MODULE_LICENSE("GPL v2"); diff --git a/test/tracepointtest/vendorfakebootpartition_test/vendorfakebootpartition_test.c b/test/tracepointtest/vendorfakebootpartition_test/vendorfakebootpartition_test.c index 8cbbb85050ebf275d2bb3214fb0b636b25084293..5776e80a8624b2c32450d2407b36ab1aa43f3f7c 100644 --- a/test/tracepointtest/vendorfakebootpartition_test/vendorfakebootpartition_test.c +++ b/test/tracepointtest/vendorfakebootpartition_test/vendorfakebootpartition_test.c @@ -32,4 +32,4 @@ static void fake_boot_partition_test_exit_module(void) /* module entry points */ module_init(fake_boot_partition_test_init_module); module_exit(fake_boot_partition_test_exit_module); -MODULE_LICENSE ("GPL v2"); +MODULE_LICENSE("GPL v2"); diff --git a/test/unittest/accesstokenid/accesstokenid_test.cpp b/test/unittest/accesstokenid/accesstokenid_test.cpp index 00f6898be583b0acaecaa9741437d6bb8f7ce36d..f867bbf818ce5eff3127917533088e16e72fac4e 100644 --- a/test/unittest/accesstokenid/accesstokenid_test.cpp +++ b/test/unittest/accesstokenid/accesstokenid_test.cpp @@ -55,9 +55,9 @@ constexpr unsigned int ACCESS_TOKEN_GRPID = 3020; constexpr unsigned int ACCESS_TOKEN_OTHER_UID = 1234; constexpr unsigned int ACCESS_TOKEN_OTHER_GRPID = 1234; -const char dev_accesstokenid[] = "/dev/access_token_id"; +const char DEV_ACCESSTOKENID[] = "/dev/access_token_id"; -struct tokeninfo { +struct Tokeninfo { pid_t pid; pid_t tid; unsigned long long tokenid; @@ -85,9 +85,9 @@ static unsigned long long GenRand64(void) static int GetTokenid(unsigned long long *token) { - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return -1; } @@ -104,9 +104,9 @@ static int GetTokenid(unsigned long long *token) static int SetTokenid(unsigned long long *token) { - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return -1; } @@ -123,9 +123,9 @@ static int SetTokenid(unsigned long long *token) static int GetfTokenid(unsigned long long *ftoken) { - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return -1; } @@ -142,9 +142,9 @@ static int GetfTokenid(unsigned long long *ftoken) static int SetfTokenid(unsigned long long *ftoken) { - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return -1; } @@ -169,7 +169,7 @@ static void GetCurToken(unsigned long long *token, unsigned long long *ftoken) static void *CheckChildThreadInheritance(void *args) { - struct tokeninfo *tinfo = static_cast (args); + struct Tokeninfo *tinfo = static_cast(args); tinfo->pid = getpid(); tinfo->tid = gettid(); @@ -182,7 +182,7 @@ static void *CheckChildThreadInheritance(void *args) static void *CheckChildThreadSetIndepent(void *args) { - struct tokeninfo *tinfo = static_cast (args); + struct Tokeninfo *tinfo = static_cast(args); unsigned long long tokenSet = GenRand64(); unsigned long long ftokenSet = GenRand64(); unsigned long long tokenidGet = INVAL_TOKEN; @@ -288,7 +288,7 @@ HWTEST_F(AccesstokenidTest, CheckChildThreadInheritance, Function | MediumTest | unsigned long long tokenSet = GenRand64(); unsigned long long ftokenSet = GenRand64(); - struct tokeninfo tinfo; + struct Tokeninfo tinfo; tinfo.pid = getpid(); tinfo.tid = gettid(); tinfo.tokenid = INVAL_TOKEN; @@ -330,7 +330,7 @@ HWTEST_F(AccesstokenidTest, CheckChildThreadSetIndepent, Function | MediumTest | unsigned long long tokenSet = GenRand64(); unsigned long long ftokenSet = GenRand64(); - struct tokeninfo tinfo; + struct Tokeninfo tinfo; tinfo.pid = getpid(); tinfo.tid = gettid(); tinfo.tokenid = INVAL_TOKEN; @@ -365,9 +365,9 @@ HWTEST_F(AccesstokenidTest, CheckChildThreadSetIndepent, Function | MediumTest | */ HWTEST_F(AccesstokenidTest, AbnormalGetTokenid, Function | MediumTest | Level1) { - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; } @@ -385,9 +385,9 @@ HWTEST_F(AccesstokenidTest, AbnormalGetTokenid, Function | MediumTest | Level1) */ HWTEST_F(AccesstokenidTest, AbnormalSetTokenid, Function | MediumTest | Level1) { - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; } @@ -405,9 +405,9 @@ HWTEST_F(AccesstokenidTest, AbnormalSetTokenid, Function | MediumTest | Level1) */ HWTEST_F(AccesstokenidTest, AbnormalGetfTokenid, Function | MediumTest | Level1) { - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; } @@ -425,9 +425,9 @@ HWTEST_F(AccesstokenidTest, AbnormalGetfTokenid, Function | MediumTest | Level1) */ HWTEST_F(AccesstokenidTest, AbnormalSetfTokenid, Function | MediumTest | Level1) { - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; } @@ -447,9 +447,9 @@ HWTEST_F(AccesstokenidTest, AbnormalIoctlCmd, Function | MediumTest | Level1) { unsigned long long token; - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; } @@ -477,9 +477,9 @@ HWTEST_F(AccesstokenidTest, OtherUidSetTokenid, Function | MediumTest | Level1) printf("setuid error %d \r\n", ret); } - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; } @@ -505,9 +505,9 @@ HWTEST_F(AccesstokenidTest, OtherUidGetTokenid, Function | MediumTest | Level1) printf("setuid error %d \r\n", ret); } - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; } @@ -535,9 +535,9 @@ HWTEST_F(AccesstokenidTest, WithoutGrpSetfTokenid, Function | MediumTest | Level printf("setgroups error %d \r\n", ret); } - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; } @@ -565,9 +565,9 @@ HWTEST_F(AccesstokenidTest, WithoutGrpGetfTokenid, Function | MediumTest | Level printf("setgroups error %d \r\n", ret); } - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; } @@ -595,9 +595,9 @@ HWTEST_F(AccesstokenidTest, WithGrpSetfTokenid, Function | MediumTest | Level1) printf("setgroups error %d \r\n", ret); } - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; } @@ -625,9 +625,9 @@ HWTEST_F(AccesstokenidTest, WithGrpGetfTokenid, Function | MediumTest | Level1) printf("setgroups error %d \r\n", ret); } - int fd = open(dev_accesstokenid, O_RDWR); + int fd = open(DEV_ACCESSTOKENID, O_RDWR); if (fd < 0) { - printf("open %s failed\r\n", dev_accesstokenid); + printf("open %s failed\r\n", DEV_ACCESSTOKENID); return; }