!2992 resolve bug for heaptrackertest

Merge pull request !2992 from buzhuyu/master
This commit is contained in:
openharmony_ci 2022-11-18 10:58:49 +00:00 committed by Gitee
commit b67c35e3e8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -545,7 +545,7 @@ HWTEST_F_L0(HeapTrackerTest, FileDescriptorStreamWriteChunk)
std::string fileName = "test.StreamWriteChunk";
fd = open(fileName.c_str(), O_RDONLY);
if (fd < 0) {
fd = open(fileName.c_str(), O_RDWR | O_CREAT);
fd = open(fileName.c_str(), O_RDWR | O_CREAT, S_IRWXU | S_IRWXG | S_IROTH);
}
FileDescriptorStream fileStream(fd);
testString = "Hello!";