Changeset 104560 in vbox
- Timestamp:
- May 8, 2024 3:28:20 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp
r99775 r104560 420 420 bufferFromPath((char *)pvBuf, cbToRead, g_testRTFileRead_pszData); 421 421 if (pcbRead) 422 *pcbRead = RT_MIN(cbToRead, strlen(g_testRTFileRead_pszData) + 1); 422 { 423 size_t cchData = strlen(g_testRTFileRead_pszData) + 1; 424 *pcbRead = RT_MIN(cbToRead, cchData); 425 } 423 426 g_testRTFileRead_pszData = 0; 424 427 return VINF_SUCCESS; … … 433 436 bufferFromPath((char *)pvBuf, cbToRead, g_testRTFileRead_pszData); 434 437 if (pcbRead) 435 *pcbRead = RT_MIN(cbToRead, strlen(g_testRTFileRead_pszData) + 1); 438 { 439 size_t cchData = strlen(g_testRTFileRead_pszData) + 1; 440 *pcbRead = RT_MIN(cbToRead, cchData); 441 } 436 442 g_testRTFileRead_pszData = 0; 437 443 return VINF_SUCCESS; … … 688 694 689 695 initTable(psvcTable, psvcHelpers); 690 AssertReleaseRC(VBoxHGCMSvcLoad(psvcTable)); 696 rc = VBoxHGCMSvcLoad(psvcTable); 697 AssertReleaseRC(rc); 691 698 AssertRelease( psvcTable->pvService 692 699 = RTTestGuardedAllocTail(hTest, psvcTable->cbClient)); … … 916 923 (hTest, "Result=%d\n", (int) Result)); 917 924 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 918 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 919 AssertReleaseRC(svcTable.pfnUnload(NULL)); 925 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 926 AssertReleaseRC(rc); 927 rc = svcTable.pfnUnload(NULL); 928 AssertReleaseRC(rc); 920 929 RTTestGuardedFree(hTest, svcTable.pvService); 921 930 RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, … … 951 960 (hTest, "Result=%d\n", (int) Result)); 952 961 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 953 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 954 AssertReleaseRC(svcTable.pfnUnload(NULL)); 962 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 963 AssertReleaseRC(rc); 964 rc = svcTable.pfnUnload(NULL); 965 AssertReleaseRC(rc); 955 966 RTTestGuardedFree(hTest, svcTable.pvService); 956 967 RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, … … 987 998 (hTest, "Result=%d\n", (int) Result)); 988 999 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 989 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 990 AssertReleaseRC(svcTable.pfnUnload(NULL)); 1000 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 1001 AssertReleaseRC(rc); 1002 rc = svcTable.pfnUnload(NULL); 1003 AssertReleaseRC(rc); 991 1004 RTTestGuardedFree(hTest, svcTable.pvService); 992 1005 RTTEST_CHECK_MSG(hTest, g_testRTDirClose_hDir == hDir, (hTest, "hDir=%p\n", g_testRTDirClose_hDir)); … … 1024 1037 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 1025 1038 RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile)); 1026 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 1027 AssertReleaseRC(svcTable.pfnUnload(NULL)); 1039 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 1040 AssertReleaseRC(rc); 1041 rc = svcTable.pfnUnload(NULL); 1042 AssertReleaseRC(rc); 1028 1043 RTTestGuardedFree(hTest, svcTable.pvService); 1029 1044 } … … 1058 1073 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 1059 1074 RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile)); 1060 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 1061 AssertReleaseRC(svcTable.pfnUnload(NULL)); 1075 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 1076 AssertReleaseRC(rc); 1077 rc = svcTable.pfnUnload(NULL); 1078 AssertReleaseRC(rc); 1062 1079 RTTestGuardedFree(hTest, svcTable.pvService); 1063 1080 } … … 1083 1100 RTTEST_CHECK_MSG(hTest, g_testRTFileFlush_hFile == hFile, (hTest, "File=%u\n", g_testRTFileFlush_hFile)); 1084 1101 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 1085 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 1086 AssertReleaseRC(svcTable.pfnUnload(NULL)); 1102 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 1103 AssertReleaseRC(rc); 1104 rc = svcTable.pfnUnload(NULL); 1105 AssertReleaseRC(rc); 1087 1106 RTTestGuardedFree(hTest, svcTable.pvService); 1088 1107 RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile)); … … 1117 1136 (hTest, "cFiles=%llu\n", LLUIFY(cFiles))); 1118 1137 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 1119 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 1120 AssertReleaseRC(svcTable.pfnUnload(NULL)); 1138 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 1139 AssertReleaseRC(rc); 1140 rc = svcTable.pfnUnload(NULL); 1141 AssertReleaseRC(rc); 1121 1142 RTTestGuardedFree(hTest, svcTable.pvService); 1122 1143 RTTEST_CHECK_MSG(hTest, g_testRTDirClose_hDir == hDir, (hTest, "hDir=%p\n", g_testRTDirClose_hDir)); … … 1158 1179 (hTest, "Size=%llu\n", LLUIFY(g_testRTFileSet_fMode))); 1159 1180 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 1160 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 1161 AssertReleaseRC(svcTable.pfnUnload(NULL)); 1181 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 1182 AssertReleaseRC(rc); 1183 rc = svcTable.pfnUnload(NULL); 1184 AssertReleaseRC(rc); 1162 1185 RTTestGuardedFree(hTest, svcTable.pvService); 1163 1186 RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile)); … … 1201 1224 LLUIFY(RTTimeSpecGetNano(&g_testRTDirSetTimes_ATime)))); 1202 1225 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 1203 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 1204 AssertReleaseRC(svcTable.pfnUnload(NULL)); 1226 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 1227 AssertReleaseRC(rc); 1228 rc = svcTable.pfnUnload(NULL); 1229 AssertReleaseRC(rc); 1205 1230 RTTestGuardedFree(hTest, svcTable.pvService); 1206 1231 RTTEST_CHECK_MSG(hTest, g_testRTDirClose_hDir == hDir, (hTest, "hDir=%p\n", g_testRTDirClose_hDir)); … … 1244 1269 LLUIFY(RTTimeSpecGetNano(&g_testRTFileSetTimes_ATime)))); 1245 1270 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 1246 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 1247 AssertReleaseRC(svcTable.pfnUnload(NULL)); 1271 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 1272 AssertReleaseRC(rc); 1273 rc = svcTable.pfnUnload(NULL); 1274 AssertReleaseRC(rc); 1248 1275 RTTestGuardedFree(hTest, svcTable.pvService); 1249 1276 RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile)); … … 1277 1304 (hTest, "Size=%llu\n", LLUIFY(g_testRTFileSetSize_cbSize))); 1278 1305 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 1279 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 1280 AssertReleaseRC(svcTable.pfnUnload(NULL)); 1306 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 1307 AssertReleaseRC(rc); 1308 rc = svcTable.pfnUnload(NULL); 1309 AssertReleaseRC(rc); 1281 1310 RTTestGuardedFree(hTest, svcTable.pvService); 1282 1311 RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile)); … … 1323 1352 #endif 1324 1353 unmapAndRemoveMapping(hTest, &svcTable, Root, "testname"); 1325 AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService)); 1326 AssertReleaseRC(svcTable.pfnUnload(NULL)); 1354 rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService); 1355 AssertReleaseRC(rc); 1356 rc = svcTable.pfnUnload(NULL); 1357 AssertReleaseRC(rc); 1327 1358 RTTestGuardedFree(hTest, svcTable.pvService); 1328 1359 RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile));
Note:
See TracChangeset
for help on using the changeset viewer.