Fix Android directory CRC login crash and record Mi 8 Lite device tests

This commit is contained in:
shen
2026-09-30 17:54:11 -07:00
parent 059ceadec2
commit d45c5c6cf5
5 changed files with 60 additions and 4 deletions
+7
View File
@@ -111,6 +111,13 @@ int main()
check(GetHFILECRC32(fp) == 0xCBF43926u && ftell(fp) == 4, "GetHFILECRC32 whole file, position kept");
fclose(fp);
check(GetFileCRC32("/nonexistent/mt_crc32") == 0 && GetFileSize("/nonexistent/mt_crc32") == 0, "CRC32 missing file");
check(GetFileCRC32("/tmp") == 0, "CRC32 directory rejected without allocation");
fp = fopen("/tmp", "rb");
if (fp) {
check(GetHFILECRC32(fp) == 0, "CRC32 directory handle rejected");
fclose(fp);
}
check(GetHFILECRC32(nullptr) == 0, "CRC32 null handle rejected");
remove(path);
}