提交 c7c7dc87 编写于 作者: X xionglei6

init: add fuzztest code

Signed-off-by: Nxionglei6 <xionglei6@huawei.com>
上级 f31018a5
......@@ -31,10 +31,10 @@ namespace OHOS {
}
if (reinterpret_cast<int>(fwrite(data, 1, size, pFile)) != size) {
std::cout << "[fuzz] write data to fstab.test failed";
fclose(pFile);
(void)fclose(pFile);
return false;
}
fclose(pFile);
(void)fclose(pFile);
CloseStdout();
if (!MountAllWithFstabFile("fstab.test", false)) {
result = true;
......
......@@ -49,10 +49,10 @@ namespace OHOS {
}
if (reinterpret_cast<int>(fwrite(data, 1, size, pFile)) != size) {
std::cout << "[fuzz] write data to ReadFileInDir.test failed";
fclose(pFile);
(void)fclose(pFile);
return false;
}
fclose(pFile);
(void)fclose(pFile);
if (!ReadFileInDir("/data", ".test", FakeParser, NULL)) {
result = true;
}
......
......@@ -31,10 +31,10 @@ namespace OHOS {
}
if (reinterpret_cast<int>(fwrite(data, 1, size, pFile)) != size) {
std::cout << "[fuzz] write data to fstab.test failed";
fclose(pFile);
(void)fclose(pFile);
return false;
}
fclose(pFile);
(void)fclose(pFile);
CloseStdout();
if (!UmountAllWithFstabFile("fstab.test")) {
result = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册