Changeset 103522 in vbox for trunk/src/VBox/Storage
- Timestamp:
- Feb 22, 2024 11:15:20 AM (12 months ago)
- svn:sync-xref-src-repo-rev:
- 161865
- Location:
- trunk/src/VBox/Storage/testcase
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/testcase/VDScript.cpp
r99739 r103522 650 650 651 651 vdScriptTokenizerSkipCh(pTokenizer); 652 fOpFound = true;653 652 break; 654 653 } … … 1577 1576 break; 1578 1577 1578 if (RT_FAILURE(rc)) 1579 break; 1580 1579 1581 pExprNew->BinaryOp.pLeftExpr = pExpr; 1580 1582 pExpr = pExprNew; … … 1637 1639 } 1638 1640 else 1641 break; 1642 1643 if (RT_FAILURE(rc)) 1639 1644 break; 1640 1645 … … 1719 1724 break; 1720 1725 1726 if (RT_FAILURE(rc)) 1727 break; 1728 1721 1729 pExprNew->BinaryOp.pLeftExpr = pExpr; 1722 1730 pExpr = pExprNew; … … 1779 1787 } 1780 1788 else 1789 break; 1790 1791 if (RT_FAILURE(rc)) 1781 1792 break; 1782 1793 … … 2195 2206 } 2196 2207 else 2208 break; 2209 2210 if (RT_SUCCESS(rc)) 2197 2211 break; 2198 2212 -
trunk/src/VBox/Storage/testcase/tstVDIo.cpp
r103005 r103522 1556 1556 if (RT_SUCCESS(rc)) 1557 1557 { 1558 #ifdef RT_STRICT 1558 1559 pEvtDesc = RTTraceLogRdrEvtGetDesc(hEvt); 1559 1560 AssertMsg(!RTStrCmp(pEvtDesc->pszId, "Complete"), 1560 1561 ("Expected a completion event but got: %s\n", pEvtDesc->pszId)); 1562 #endif 1561 1563 } 1562 1564 } … … 1617 1619 1618 1620 if (RT_SUCCESS(rc)) 1619 rc = VDIoRndCreate(&pGlob->pIoRnd, cbPattern, uSeed );1621 rc = VDIoRndCreate(&pGlob->pIoRnd, cbPattern, uSeedToUse); 1620 1622 } 1621 1623 … … 1771 1773 RTPrintf("Dumping memory file %s to %s, this might take some time\n", pcszFile, pcszPathToDump); 1772 1774 rc = VDIoBackendDumpToFile(pIt->pIoStorage, pcszPathToDump); 1773 rc = VERR_NOT_IMPLEMENTED;1774 1775 } 1775 1776 else … … 2483 2484 && cSectorsLeft) 2484 2485 { 2485 uint32_t cThisSectors = VDIoRndGetU32Ex(pIoTest->pIoRnd, 1, (uint32_t)cSectorsLeft / 2);2486 size_t cThisSectors = VDIoRndGetU32Ex(pIoTest->pIoRnd, 1, (uint32_t)cSectorsLeft / 2); 2486 2487 size_t cbThisBuf = cThisSectors * 512; 2487 2488 … … 2847 2848 } 2848 2849 else 2850 { 2849 2851 rc = VDScriptCtxCallFn(hScriptCtx, "main", NULL, 0); 2852 if (RT_FAILURE(rc)) 2853 RTPrintf("Executing the script failed rc=%Rrc\n", rc); 2854 } 2855 2850 2856 VDScriptCtxDestroy(hScriptCtx); 2851 2857 } -
trunk/src/VBox/Storage/testcase/tstVDSnap.cpp
r98103 r103522 260 260 /* Create the virtual disk test data */ 261 261 pbTestPattern = (uint8_t *)RTMemAlloc(pTest->cbTestPattern); 262 if (!pbTestPattern) 263 { 264 RTPrintf("Failed to allocate memory for test pattern\n"); 265 g_cErrors++; 266 return VERR_NO_MEMORY; 267 } 262 268 263 269 RTRandAdvBytes(g_hRand, pbTestPattern, pTest->cbTestPattern); … … 409 415 410 416 VDDestroy(pVD); 411 if (paDiskSeg) 412 RTMemFree(paDiskSeg); 413 if (pbTestPattern) 414 RTMemFree(pbTestPattern); 417 RTMemFree(paDiskSeg); 418 RTMemFree(pbTestPattern); 415 419 416 420 RTFileDelete(pTest->pcszBaseImage); -
trunk/src/VBox/Storage/testcase/vbox-img.cpp
r103005 r103522 826 826 PFILEIOSTATE pFS = (PFILEIOSTATE)pStorage; 827 827 AssertReturn(uOffset >= pFS->off, VERR_INVALID_PARAMETER); 828 int rc;829 828 830 829 /* Write the data to the buffer, flushing as required. */ … … 835 834 while (uOffset > pFS->offBuffer + sizeof(pFS->abBuffer) - 1) 836 835 { 837 rc = RTFileWrite(pFS->file, &pFS->abBuffer[0], 838 sizeof(pFS->abBuffer), NULL); 836 int rc = RTFileWrite(pFS->file, &pFS->abBuffer[0], 837 sizeof(pFS->abBuffer), NULL); 838 if (RT_FAILURE(rc)) 839 return rc; 840 839 841 RT_ZERO(pFS->abBuffer); 840 842 pFS->offBuffer += sizeof(pFS->abBuffer); … … 966 968 if (RT_SUCCESS(rc)) 967 969 pFS->cb = cbSize; 968 return VINF_SUCCESS;970 return rc; 969 971 } 970 972 … … 989 991 PFILEIOSTATE pFS = (PFILEIOSTATE)pStorage; 990 992 AssertReturn(uOffset >= pFS->off, VERR_INVALID_PARAMETER); 991 int rc;992 993 993 994 /* Write the data to the buffer, flushing as required. */ … … 999 1000 { 1000 1001 if (!ASMMemIsZero(pFS->abBuffer, sizeof(pFS->abBuffer))) 1001 rc = RTFileWriteAt(pFS->file, pFS->offBuffer, 1002 &pFS->abBuffer[0], 1003 sizeof(pFS->abBuffer), NULL); 1002 { 1003 int rc = RTFileWriteAt(pFS->file, pFS->offBuffer, 1004 &pFS->abBuffer[0], 1005 sizeof(pFS->abBuffer), NULL); 1006 if (RT_FAILURE(rc)) 1007 return rc; 1008 } 1004 1009 RT_ZERO(pFS->abBuffer); 1005 1010 pFS->offBuffer += sizeof(pFS->abBuffer);
Note:
See TracChangeset
for help on using the changeset viewer.