Changeset 103262 in vbox
- Timestamp:
- Feb 8, 2024 12:00:32 AM (12 months ago)
- Location:
- trunk
- Files:
-
- 16 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VMMDevTesting.h
r98103 r103262 128 128 /** Start a new sub-test, sending name (zero terminated string). (RTTestSub) */ 129 129 #define VMMDEV_TESTING_CMD_SUB_NEW UINT32_C(0xcab1e002) 130 /** Sub-test is done, sending 32-bit error count for it. (RTTest Done) */130 /** Sub-test is done, sending 32-bit error count for it. (RTTestSubDone) */ 131 131 #define VMMDEV_TESTING_CMD_SUB_DONE UINT32_C(0xcab1e003) 132 132 /** Report a failure, sending reason (zero terminated string). (RTTestFailed) */ … … 145 145 * DATA port and reading back the result. */ 146 146 #define VMMDEV_TESTING_CMD_QUERY_CFG UINT32_C(0xcab1e009) 147 /** Start a new sub-sub-test, sending name (zero terminated string). (RTTestSubSub) */ 148 #define VMMDEV_TESTING_CMD_SUBSUB_NEW UINT32_C(0xcab1e00a) 149 /** Sub-sub-test is done, sending 32-bit error count for it. (RTTestSubSubDone) */ 150 #define VMMDEV_TESTING_CMD_SUBSUB_DONE UINT32_C(0xcab1e00b) 147 151 148 152 /** The magic part of the command. */ -
trunk/include/iprt/mangling.h
r103252 r103262 2537 2537 # define RTTestISubF RT_MANGLER(RTTestISubF) 2538 2538 # define RTTestISubV RT_MANGLER(RTTestISubV) 2539 # define RTTestISubSub RT_MANGLER(RTTestISubSub) 2540 # define RTTestISubSubDone RT_MANGLER(RTTestISubSubDone) 2541 # define RTTestISubSubF RT_MANGLER(RTTestISubSubF) 2542 # define RTTestISubSubV RT_MANGLER(RTTestISubSubV) 2539 2543 # define RTTestIValue RT_MANGLER(RTTestIValue) 2540 2544 # define RTTestIValueF RT_MANGLER(RTTestIValueF) … … 2557 2561 # define RTTestSubF RT_MANGLER(RTTestSubF) 2558 2562 # define RTTestSubV RT_MANGLER(RTTestSubV) 2563 # define RTTestSubSub RT_MANGLER(RTTestSubSub) 2564 # define RTTestSubSubDone RT_MANGLER(RTTestSubSubDone) 2565 # define RTTestSubSubErrorCount RT_MANGLER(RTTestSubSubErrorCount) 2566 # define RTTestSubSubF RT_MANGLER(RTTestSubSubF) 2567 # define RTTestSubSubV RT_MANGLER(RTTestSubSubV) 2559 2568 # define RTTestSummaryAndDestroy RT_MANGLER(RTTestSummaryAndDestroy) 2560 2569 # define RTTestValue RT_MANGLER(RTTestValue) -
trunk/include/iprt/test.h
r98103 r103262 421 421 422 422 /** 423 * Starts a sub-sub-test. 424 * 425 * This will perform an implicit RTTestSubSubDone() call if that has not been 426 * done since the last RTTestSubSub() call. 427 * 428 * @returns Number of chars printed. 429 * @param hTest The test handle. If NIL_RTTEST we'll use the one 430 * associated with the calling thread. 431 * @param pszSubSubTest The sub-sub-test name. 432 */ 433 RTR3DECL(int) RTTestSubSub(RTTEST hTest, const char *pszSubSubTest); 434 435 /** 436 * Format string version of RTTestSubSub(). 437 * 438 * See RTTestSubSub() for details. 439 * 440 * @returns Number of chars printed. 441 * @param hTest The test handle. If NIL_RTTEST we'll use the one 442 * associated with the calling thread. 443 * @param pszSubSubTestFmt The sub-sub-test name format string. 444 * @param ... Arguments. 445 */ 446 RTR3DECL(int) RTTestSubSubF(RTTEST hTest, const char *pszSubSubTestFmt, ...) RT_IPRT_FORMAT_ATTR(2, 3); 447 448 /** 449 * Format string version of RTTestSubSub(). 450 * 451 * See RTTestSubSub() for details. 452 * 453 * @returns Number of chars printed. 454 * @param hTest The test handle. If NIL_RTTEST we'll use the one 455 * associated with the calling thread. 456 * @param pszSubSubTestFmt The sub-sub-test name format string. 457 * @param va Arguments. 458 */ 459 RTR3DECL(int) RTTestSubSubV(RTTEST hTest, const char *pszSubSubTestFmt, va_list va) RT_IPRT_FORMAT_ATTR(2, 0); 460 461 /** 462 * Completes a sub-sub-test. 463 * 464 * @returns Number of chars printed, negative numbers are IPRT error codes. 465 * @param hTest The test handle. If NIL_RTTEST we'll use the one 466 * associated with the calling thread. 467 */ 468 RTR3DECL(int) RTTestSubSubDone(RTTEST hTest); 469 470 /** 423 471 * Prints an extended PASSED message, optional. 424 472 * 425 * This does not conclude the sub-test, it could be used to report the passing426 * of a sub-sub-to-the-power-of-N-test.473 * This does not conclude the (sub-)sub-test, it could be used to report the 474 * passing of a sub-sub-to-the-power-of-N-test. 427 475 * 428 476 * @returns Number of chars printed, negative numbers are IPRT error codes. … … 437 485 * Prints an extended PASSED message, optional. 438 486 * 439 * This does not conclude the sub-test, it could be used to report the passing440 * of a sub-sub-to-the-power-of-N-test.487 * This does not conclude the (sub-)sub-test, it could be used to report the 488 * passing of a sub-sub-to-the-power-of-N-test. 441 489 * 442 490 * @returns Number of chars printed, negative numbers are IPRT error codes. … … 556 604 * This is typically used for benchmarking but can be used for other purposes 557 605 * like reporting limits of some implementation. The value gets associated with 558 * the current sub test, the name must be unique within the sub test. 606 * the current (sub-)sub-test, the name must be unique within the 607 * (sub-)sub-test. 559 608 * 560 609 * @returns IPRT status code. … … 617 666 618 667 /** 619 * Get the error count of the current sub 668 * Get the error count of the current sub-test. 620 669 * 621 670 * @returns The error counter, UINT32_MAX if no valid test handle. … … 624 673 */ 625 674 RTR3DECL(uint32_t) RTTestSubErrorCount(RTTEST hTest); 675 676 /** 677 * Get the error count of the current sub-sub-test. 678 * 679 * @returns The error counter, UINT32_MAX if no valid test handle. 680 * @param hTest The test handle. If NIL_RTTEST we'll use the one 681 * associated with the calling thread. 682 */ 683 RTR3DECL(uint32_t) RTTestSubSubErrorCount(RTTEST hTest); 626 684 627 685 /** … … 1024 1082 1025 1083 /** 1026 * Completes a sub-test .1084 * Completes a sub-test (and any outstanding sub-sub-test). 1027 1085 * 1028 1086 * @returns Number of chars printed. … … 1031 1089 1032 1090 /** 1091 * Starts a sub-sub-test. 1092 * 1093 * This will perform an implicit RTTestSubSubDone() call if that has not been 1094 * done since the last RTTestSubSub call. 1095 * 1096 * @returns Number of chars printed. 1097 * @param pszSubSubTest The sub-sub-test name. 1098 */ 1099 RTR3DECL(int) RTTestISubSub(const char *pszSubSubTest); 1100 1101 /** 1102 * Format string version of RTTestSubSub. 1103 * 1104 * See RTTestSubSub for details. 1105 * 1106 * @returns Number of chars printed. 1107 * @param pszSubSubTestFmt The sub-sub-test name format string. 1108 * @param ... Arguments. 1109 */ 1110 RTR3DECL(int) RTTestISubSubF(const char *pszSubSubTestFmt, ...) RT_IPRT_FORMAT_ATTR(1, 2); 1111 1112 /** 1113 * Format string version of RTTestSubSub. 1114 * 1115 * See RTTestSubSub for details. 1116 * 1117 * @returns Number of chars printed. 1118 * @param pszSubSubTestFmt The sub-sub-test name format string. 1119 * @param va Arguments. 1120 */ 1121 RTR3DECL(int) RTTestISubSubV(const char *pszSubSubTestFmt, va_list va) RT_IPRT_FORMAT_ATTR(1, 0); 1122 1123 /** 1124 * Completes a sub-sub-test. 1125 * 1126 * @returns Number of chars printed. 1127 */ 1128 RTR3DECL(int) RTTestISubSubDone(void); 1129 1130 /** 1033 1131 * Prints an extended PASSED message, optional. 1034 1132 * 1035 * This does not conclude the sub-test, it could be used to report the passing1036 * of a sub-sub-to-the-power-of-N-test.1133 * This does not conclude the (sub-)sub-test, it could be used to report the 1134 * passing of a sub-sub-to-the-power-of-N-test. 1037 1135 * 1038 1136 * @returns IPRT status code. … … 1045 1143 * Prints an extended PASSED message, optional. 1046 1144 * 1047 * This does not conclude the sub-test, it could be used to report the passing1048 * of a sub-sub-to-the-power-of-N-test.1145 * This does not conclude the (sub-)sub-test, it could be used to report the 1146 * passing of a sub-sub-to-the-power-of-N-test. 1049 1147 * 1050 1148 * @returns IPRT status code. … … 1059 1157 * This is typically used for benchmarking but can be used for other purposes 1060 1158 * like reporting limits of some implementation. The value gets associated with 1061 * the current sub test, the name must be unique within the sub test. 1159 * the current (sub-)sub-test, the name must be unique within the 1160 * (sub-)sub-test. 1062 1161 * 1063 1162 * @returns IPRT status code. -
trunk/src/VBox/Devices/VMMDev/VMMDevTesting.cpp
r103245 r103262 384 384 case VMMDEV_TESTING_CMD_INIT: 385 385 case VMMDEV_TESTING_CMD_SUB_NEW: 386 case VMMDEV_TESTING_CMD_SUBSUB_NEW: 386 387 case VMMDEV_TESTING_CMD_FAILED: 387 388 case VMMDEV_TESTING_CMD_SKIPPED: … … 413 414 if (pThisCC->hTestingTest != NIL_RTTEST) 414 415 RTTestSub(pThisCC->hTestingTest, pThis->TestingData.String.sz); 416 break; 417 case VMMDEV_TESTING_CMD_SUBSUB_NEW: 418 VMMDEV_TESTING_OUTPUT(("testing: SUBSUB_NEW '%s'\n", pThis->TestingData.String.sz)); 419 if (pThisCC->hTestingTest != NIL_RTTEST) 420 RTTestSubSub(pThisCC->hTestingTest, pThis->TestingData.String.sz); 415 421 break; 416 422 case VMMDEV_TESTING_CMD_FAILED: … … 445 451 case VMMDEV_TESTING_CMD_TERM: 446 452 case VMMDEV_TESTING_CMD_SUB_DONE: 453 case VMMDEV_TESTING_CMD_SUBSUB_DONE: 447 454 if (cb == 2) 448 455 { … … 469 476 #ifdef IN_RING3 470 477 pThis->TestingData.Error.c = u32; 478 479 /* Bring the error count up to the right level (a bit stupid way 480 to do it, but it gets the job done). */ 481 if (pThisCC->hTestingTest != NIL_RTTEST) 482 { 483 uint32_t cShort = uCmd == VMMDEV_TESTING_CMD_TERM ? RTTestErrorCount(pThisCC->hTestingTest) 484 : uCmd == VMMDEV_TESTING_CMD_SUB_DONE ? RTTestSubErrorCount(pThisCC->hTestingTest) 485 : RTTestSubSubErrorCount(pThisCC->hTestingTest); 486 cShort = u32 > cShort ? u32 - cShort : 0; 487 while (cShort-- > 0) 488 RTTestErrorInc(pThisCC->hTestingTest); 489 } 490 471 491 if (uCmd == VMMDEV_TESTING_CMD_TERM) 472 492 { 473 493 if (pThisCC->hTestingTest != NIL_RTTEST) 474 494 { 475 while (RTTestErrorCount(pThisCC->hTestingTest) < u32)476 RTTestErrorInc(pThisCC->hTestingTest); /* A bit stupid, but does the trick. */477 495 RTTestSubDone(pThisCC->hTestingTest); 478 496 RTTestSummaryAndDestroy(pThisCC->hTestingTest); … … 481 499 VMMDEV_TESTING_OUTPUT(("testing: TERM - %u errors\n", u32)); 482 500 } 501 else if (uCmd == VMMDEV_TESTING_CMD_SUBSUB_DONE) 502 { 503 if (pThisCC->hTestingTest != NIL_RTTEST) 504 RTTestSubSubDone(pThisCC->hTestingTest); 505 VMMDEV_TESTING_OUTPUT(("testing: SUBSUB_DONE - %u errors\n", u32)); 506 } 483 507 else 484 508 { 485 509 if (pThisCC->hTestingTest != NIL_RTTEST) 486 {487 while (RTTestSubErrorCount(pThisCC->hTestingTest) < u32)488 RTTestErrorInc(pThisCC->hTestingTest); /* A bit stupid, but does the trick. */489 510 RTTestSubDone(pThisCC->hTestingTest); 490 }491 511 VMMDEV_TESTING_OUTPUT(("testing: SUB_DONE - %u errors\n", u32)); 492 512 } -
trunk/src/VBox/Runtime/VBox/VBoxRTImp.def
r103014 r103262 1974 1974 RTTestISubF 1975 1975 RTTestISubV 1976 RTTestISubSub 1977 RTTestISubSubDone 1978 RTTestISubSubF 1979 RTTestISubSubV 1976 1980 RTTestIValue 1977 1981 RTTestIValueF … … 1989 1993 RTTestSub 1990 1994 RTTestSubDone 1995 RTTestSubErrorCount 1991 1996 RTTestSubF 1992 1997 RTTestSubV 1998 RTTestSubSub 1999 RTTestSubSubDone 2000 RTTestSubSubErrorCount 2001 RTTestSubSubF 2002 RTTestSubSubV 1993 2003 RTTestSummaryAndDestroy 1994 2004 RTTestValue -
trunk/src/VBox/Runtime/r3/test.cpp
r103005 r103262 122 122 PRTTESTGUARDEDMEM pGuardedMem; 123 123 124 /** The current sub-test. */ 125 const char *pszSubTest; 126 /** The length of the sub-test name. */ 127 size_t cchSubTest; 128 /** Whether the current subtest should figure as 'SKIPPED'. */ 129 bool fSubTestSkipped; 130 /** Whether we've reported the sub-test result or not. */ 131 bool fSubTestReported; 132 /** The start error count of the current subtest. */ 133 uint32_t cSubTestAtErrors; 134 135 /** The number of sub tests. */ 136 uint32_t cSubTests; 137 /** The number of sub tests that failed. */ 138 uint32_t cSubTestsFailed; 124 struct RTTESTINTSUBTRACKER 125 { 126 /** The current (sub-)sub-test. */ 127 const char *pszName; 128 /** The length of the (sub-)sub-test name. */ 129 size_t cchName; 130 /** Whether the current (sub-)sub-test should figure as 'SKIPPED'. */ 131 bool fSkipped; 132 /** Whether we've reported the (sub-)sub-test result or not. */ 133 bool fReported; 134 /** The start error count of the current (sub-)sub-test. */ 135 uint32_t cErrorsAtStart; 136 /** The number of (sub-)sub-tests. */ 137 uint32_t cTests; 138 /** The number of (sub-)sub-tests that failed. */ 139 uint32_t cFailedTests; 140 } 141 /** sub-test tracker. */ 142 Sub, 143 /** sub-sub-test tracker. */ 144 SubSub; 139 145 140 146 /** Error context message. */ … … 243 249 244 250 251 /** RTTestCreateEx helpers. */ 252 DECL_FORCE_INLINE(void) rtTestInitSubTracking(struct RTTESTINT::RTTESTINTSUBTRACKER *pTracker) 253 { 254 pTracker->pszName = NULL; 255 pTracker->cchName = 0; 256 pTracker->fSkipped = false; 257 pTracker->fReported = true; 258 pTracker->cErrorsAtStart = 0; 259 pTracker->cTests = 0; 260 pTracker->cFailedTests = 0; 261 } 262 263 245 264 RTR3DECL(int) RTTestCreateEx(const char *pszTest, uint32_t fFlags, RTTESTLVL enmMaxLevel, 246 265 RTHCINTPTR iNativeTestPipe, const char *pszXmlFile, PRTTEST phTest) … … 277 296 pTest->pGuardedMem = NULL; 278 297 279 pTest->pszSubTest = NULL; 280 pTest->cchSubTest = 0; 281 pTest->fSubTestSkipped = false; 282 pTest->fSubTestReported = true; 283 pTest->cSubTestAtErrors = 0; 284 pTest->cSubTests = 0; 285 pTest->cSubTestsFailed = 0; 298 rtTestInitSubTracking(&pTest->Sub); 299 rtTestInitSubTracking(&pTest->SubSub); 286 300 287 301 pTest->fXmlEnabled = false; … … 525 539 } 526 540 527 RTStrFree((char *)pTest->pszSubTest); 528 pTest->pszSubTest = NULL; 541 RTStrFree((char *)pTest->SubSub.pszName); 542 pTest->SubSub.pszName = NULL; 543 RTStrFree((char *)pTest->Sub.pszName); 544 pTest->Sub.pszName = NULL; 529 545 RTStrFree((char *)pTest->pszTest); 530 546 pTest->pszTest = NULL; … … 944 960 { 945 961 rtTestXmlElem(pTest, "End", "SubTests=\"%u\" SubTestsFailed=\"%u\" errors=\"%u\"", 946 pTest-> cSubTests, pTest->cSubTestsFailed, pTest->cErrors);962 pTest->Sub.cTests, pTest->Sub.cFailedTests, pTest->cErrors); 947 963 rtTestXmlOutput(pTest, "</Test>\n"); 948 964 } … … 1120 1136 1121 1137 /** 1122 * Prints the result of a sub-test if necessary.1138 * Prints the result of a sub-test or sub-sub-test if necessary. 1123 1139 * 1124 1140 * @returns Number of chars printed. 1125 1141 * @param pTest The test instance. 1142 * @param pTracker The sub-test or sub-sub-test tracker. 1143 * @param cchIndent Result indent. 1126 1144 * @remarks Caller own the test Lock. 1127 1145 */ 1128 static int rtTestSubTestReport (PRTTESTINT pTest)1146 static int rtTestSubTestReportWorker(PRTTESTINT pTest, struct RTTESTINT::RTTESTINTSUBTRACKER *pTracker, unsigned cchIndent) 1129 1147 { 1130 1148 int cch = 0; 1131 if ( !pTest->fSubTestReported 1132 && pTest->pszSubTest) 1133 { 1134 pTest->fSubTestReported = true; 1135 uint32_t cErrors = ASMAtomicUoReadU32(&pTest->cErrors) - pTest->cSubTestAtErrors; 1149 if ( !pTracker->fReported 1150 && pTracker->pszName) 1151 { 1152 unsigned const cchNameWidth = 60 - cchIndent; 1153 pTracker->fReported = true; 1154 uint32_t const cErrors = ASMAtomicUoReadU32(&pTest->cErrors) - pTracker->cErrorsAtStart; 1136 1155 if (!cErrors) 1137 1156 { 1138 if (!pT est->fSubTestSkipped)1157 if (!pTracker->fSkipped) 1139 1158 { 1140 1159 rtTestXmlElem(pTest, "Passed", NULL); 1141 1160 rtTestXmlElemEnd(pTest, "Test"); 1142 cch += RTTestPrintfNl(pTest, RTTESTLVL_SUB_TEST, "%-60s: PASSED\n", pTest->pszSubTest); 1161 cch += RTTestPrintfNl(pTest, RTTESTLVL_SUB_TEST, "%*s%-*s: PASSED\n", 1162 cchIndent, "", cchNameWidth, pTracker->pszName); 1143 1163 } 1144 1164 else … … 1146 1166 rtTestXmlElem(pTest, "Skipped", NULL); 1147 1167 rtTestXmlElemEnd(pTest, "Test"); 1148 cch += RTTestPrintfNl(pTest, RTTESTLVL_SUB_TEST, "%-60s: SKIPPED\n", pTest->pszSubTest); 1168 cch += RTTestPrintfNl(pTest, RTTESTLVL_SUB_TEST, "%*s%-60s: SKIPPED\n", 1169 cchIndent, "", cchNameWidth, pTracker->pszName); 1149 1170 } 1150 1171 } 1151 1172 else 1152 1173 { 1153 pT est->cSubTestsFailed++;1174 pTracker->cFailedTests++; 1154 1175 rtTestXmlElem(pTest, "Failed", "errors=\"%u\"", cErrors); 1155 1176 rtTestXmlElemEnd(pTest, "Test"); 1156 cch += RTTestPrintfNl(pTest, RTTESTLVL_SUB_TEST, "% -60s: FAILED (%u errors)\n",1157 pTest->pszSubTest, cErrors);1177 cch += RTTestPrintfNl(pTest, RTTESTLVL_SUB_TEST, "%*s%-60s: FAILED (%u errors)\n", 1178 cchIndent, "", cchNameWidth, pTracker->pszName, cErrors); 1158 1179 } 1159 1180 } … … 1162 1183 1163 1184 1164 /** 1165 * RTTestSub and RTTestSubDone worker that cleans up the current (if any) 1166 * sub test. 1185 /** Worker for rtTestSubSubCleanup and rtTestSubCleanup. */ 1186 static int rtTestSubCleanupWorker(PRTTESTINT pTest, struct RTTESTINT::RTTESTINTSUBTRACKER *pTracker, unsigned cchIndent) 1187 { 1188 int cch = rtTestSubTestReportWorker(pTest, pTracker, cchIndent); 1189 RTStrFree((char *)pTracker->pszName); 1190 pTracker->pszName = NULL; 1191 pTracker->fReported = true; 1192 return cch; 1193 } 1194 1195 1196 /** 1197 * RTTestSubSub and RTTestSubSubDone worker that cleans up the current (if any) 1198 * sub-sub-test. 1167 1199 * 1168 1200 * @returns Number of chars printed. … … 1170 1202 * @remarks Caller own the test Lock. 1171 1203 */ 1204 static int rtTestSubSubCleanup(PRTTESTINT pTest) 1205 { 1206 return rtTestSubCleanupWorker(pTest, &pTest->SubSub, 2); 1207 } 1208 1209 1210 /** 1211 * RTTestSub and RTTestSubDone worker that cleans up the current (if any) 1212 * sub test. 1213 * 1214 * @returns Number of chars printed. 1215 * @param pTest The test instance. 1216 * @remarks Caller own the test Lock. 1217 */ 1172 1218 static int rtTestSubCleanup(PRTTESTINT pTest) 1173 1219 { 1174 int cch = 0; 1175 if (pTest->pszSubTest) 1176 { 1177 cch += rtTestSubTestReport(pTest); 1178 1179 RTStrFree((char *)pTest->pszSubTest); 1180 pTest->pszSubTest = NULL; 1181 pTest->fSubTestReported = true; 1182 } 1220 int cch = rtTestSubCleanupWorker(pTest, &pTest->SubSub, 2); 1221 cch += rtTestSubCleanupWorker(pTest, &pTest->Sub, 0); 1222 1183 1223 RTStrFree(pTest->pszErrCtx); 1184 1224 pTest->pszErrCtx = NULL; … … 1193 1233 1194 1234 RTCritSectEnter(&pTest->Lock); 1195 rtTestSubTestReport(pTest); 1235 rtTestSubTestReportWorker(pTest, &pTest->SubSub, 2); 1236 rtTestSubTestReportWorker(pTest, &pTest->Sub, 0); 1196 1237 RTCritSectLeave(&pTest->Lock); 1197 1238 … … 1219 1260 1220 1261 RTCritSectEnter(&pTest->Lock); 1221 rtTestSubTestReport(pTest); 1262 rtTestSubTestReportWorker(pTest, &pTest->SubSub, 2); 1263 rtTestSubTestReportWorker(pTest, &pTest->Sub, 0); 1222 1264 RTCritSectLeave(&pTest->Lock); 1223 1265 … … 1251 1293 1252 1294 1295 /** Worker for RTTestSub and RTTestSubSub. */ 1296 static void rtTestSubNew(PRTTESTINT pTest, struct RTTESTINT::RTTESTINTSUBTRACKER *pTracker, const char *pszName) 1297 { 1298 pTracker->cTests++; 1299 pTracker->cErrorsAtStart = ASMAtomicUoReadU32(&pTest->cErrors); 1300 pTracker->pszName = RTStrDup(pszName); 1301 pTracker->cchName = strlen(pszName); 1302 AssertMsg(pTracker->cchName < 64 /* See g_kcchMaxTestResultName in testmanager/config.py. */, 1303 ("cchSubTest=%u: '%s'\n", pTracker->cchName, pTracker->pszName)); 1304 pTracker->fSkipped = false; 1305 pTracker->fReported = false; 1306 } 1307 1308 1253 1309 RTR3DECL(int) RTTestSub(RTTEST hTest, const char *pszSubTest) 1254 1310 { … … 1261 1317 rtTestSubCleanup(pTest); 1262 1318 1319 pTest->SubSub.cTests = 0; 1320 pTest->SubSub.cFailedTests = 0; 1321 1263 1322 /* Start new sub test. */ 1264 pTest->cSubTests++; 1265 pTest->cSubTestAtErrors = ASMAtomicUoReadU32(&pTest->cErrors); 1266 pTest->pszSubTest = RTStrDup(pszSubTest); 1267 pTest->cchSubTest = strlen(pszSubTest); 1268 AssertMsg(pTest->cchSubTest < 64 /* See g_kcchMaxTestResultName in testmanager/config.py. */, 1269 ("cchSubTest=%u: '%s'\n", pTest->cchSubTest, pTest->pszSubTest)); 1270 pTest->fSubTestSkipped = false; 1271 pTest->fSubTestReported = false; 1323 rtTestSubNew(pTest, &pTest->Sub, pszSubTest); 1272 1324 1273 1325 int cch = 0; … … 1326 1378 1327 1379 1380 RTR3DECL(int) RTTestSubSub(RTTEST hTest, const char *pszSubSubTest) 1381 { 1382 PRTTESTINT pTest = hTest; 1383 RTTEST_GET_VALID_RETURN_RC(pTest, -1); 1384 AssertReturn(pTest->Sub.pszName, -1); 1385 AssertReturn(!pTest->Sub.fReported, -1); 1386 AssertReturn(!pTest->Sub.fSkipped, -1); 1387 1388 RTCritSectEnter(&pTest->Lock); 1389 1390 /* Cleanup, reporting if necessary previous sub-sub-test. */ 1391 rtTestSubSubCleanup(pTest); 1392 1393 /* Start new sub-sub-test. */ 1394 rtTestSubNew(pTest, &pTest->SubSub, pszSubSubTest); 1395 1396 int cch = 0; 1397 if (pTest->enmMaxLevel >= RTTESTLVL_DEBUG) 1398 cch = RTTestPrintfNl(hTest, RTTESTLVL_DEBUG, "debug: Starting sub-sub-test '%s'\n", pszSubSubTest); 1399 1400 Assert(pTest->fXmlTopTestDone); 1401 rtTestXmlElemStart(pTest, "Test", "name=%RMas", pszSubSubTest); 1402 1403 RTCritSectLeave(&pTest->Lock); 1404 1405 return cch; 1406 } 1407 1408 1409 RTR3DECL(int) RTTestSubSubF(RTTEST hTest, const char *pszSubSubTestFmt, ...) 1410 { 1411 va_list va; 1412 va_start(va, pszSubSubTestFmt); 1413 int cch = RTTestSubSubV(hTest, pszSubSubTestFmt, va); 1414 va_end(va); 1415 return cch; 1416 } 1417 1418 1419 RTR3DECL(int) RTTestSubSubV(RTTEST hTest, const char *pszSubSubTestFmt, va_list va) 1420 { 1421 char *pszSubSubTest; 1422 RTStrAPrintfV(&pszSubSubTest, pszSubSubTestFmt, va); 1423 if (pszSubSubTest) 1424 { 1425 int cch = RTTestSubSub(hTest, pszSubSubTest); 1426 RTStrFree(pszSubSubTest); 1427 return cch; 1428 } 1429 return 0; 1430 } 1431 1432 1433 RTR3DECL(int) RTTestSubSubDone(RTTEST hTest) 1434 { 1435 PRTTESTINT pTest = hTest; 1436 RTTEST_GET_VALID_RETURN_RC(pTest, VERR_INVALID_HANDLE); 1437 1438 RTCritSectEnter(&pTest->Lock); 1439 int cch = rtTestSubSubCleanup(pTest); 1440 RTCritSectLeave(&pTest->Lock); 1441 1442 return cch; 1443 } 1444 1328 1445 RTR3DECL(int) RTTestPassedV(RTTEST hTest, const char *pszFormat, va_list va) 1329 1446 { … … 1367 1484 RTTEST_GET_VALID_RETURN_RC(pTest, VERR_INVALID_HANDLE); 1368 1485 1369 pTest->fSubTestSkipped = true; 1486 if (pTest->SubSub.pszName) 1487 pTest->SubSub.fSkipped = true; 1488 else 1489 pTest->Sub.fSkipped = true; 1370 1490 1371 1491 int cch = 0; … … 1533 1653 RTTEST_GET_VALID_RETURN_RC(pTest, UINT32_MAX); 1534 1654 1535 return ASMAtomicReadU32(&pTest->cErrors) - pTest->cSubTestAtErrors; 1655 return ASMAtomicReadU32(&pTest->cErrors) - pTest->Sub.cErrorsAtStart; 1656 } 1657 1658 1659 RTR3DECL(uint32_t) RTTestSubSubErrorCount(RTTEST hTest) 1660 { 1661 PRTTESTINT pTest = hTest; 1662 RTTEST_GET_VALID_RETURN_RC(pTest, UINT32_MAX); 1663 1664 return ASMAtomicReadU32(&pTest->cErrors) - pTest->SubSub.cErrorsAtStart; 1536 1665 } 1537 1666 -
trunk/src/VBox/Runtime/r3/testi.cpp
r98103 r103262 87 87 88 88 89 RTR3DECL(int) RTTestISubSub(const char *pszSubSubTest) 90 { 91 return RTTestSubSub(NIL_RTTEST, pszSubSubTest); 92 } 93 94 95 RTR3DECL(int) RTTestISubSubF(const char *pszSubSubTestFmt, ...) 96 { 97 va_list va; 98 va_start(va, pszSubSubTestFmt); 99 int cch = RTTestSubSubV(NIL_RTTEST, pszSubSubTestFmt, va); 100 va_end(va); 101 return cch; 102 } 103 104 105 RTR3DECL(int) RTTestISubSubV(const char *pszSubSubTestFmt, va_list va) 106 { 107 return RTTestSubSubV(NIL_RTTEST, pszSubSubTestFmt, va); 108 } 109 110 111 RTR3DECL(int) RTTestISubSubDone(void) 112 { 113 return RTTestSubSubDone(NIL_RTTEST); 114 } 115 116 89 117 RTR3DECL(int) RTTestIPassedV(const char *pszFormat, va_list va) 90 118 { -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c
r103216 r103262 5648 5648 pThis->pResultExtCtx = NULL; 5649 5649 pThis->pInitialExtCtx = NULL; 5650 5651 Bs3TestSubDone(); 5650 5652 } 5651 5653 … … 5680 5682 pThis->pabOpcodes = g_abBs3Cg1Opcodes; 5681 5683 pThis->fAdvanceMnemonic = 1; 5684 5685 /* Start the mode sub-test before we start reporting errors against it. */ 5686 Bs3TestSub(pThis->pszModeShort); 5682 5687 5683 5688 /* Allocate extended context structures. */ … … 5916 5921 pThis->cchMnemonic = pInstr->cchMnemonic; 5917 5922 if (pThis->fAdvanceMnemonic) 5918 Bs3TestSub F("%s / %.*s", pThis->pszModeShort, pThis->cchMnemonic, pThis->pchMnemonic);5923 Bs3TestSubSubF("%.*s", pThis->cchMnemonic, pThis->pchMnemonic); 5919 5924 pThis->fAdvanceMnemonic = pInstr->fAdvanceMnemonic; 5920 5925 pThis->uOpcodeMap = pInstr->uOpcodeMap; … … 6133 6138 6134 6139 if (BS3_CMN_NM(Bs3Cg1Init)(&This, bMode)) 6135 {6136 6140 bRet = BS3_CMN_NM(Bs3Cg1WorkerInner)(&This); 6137 Bs3TestSubDone();6138 }6139 6141 Bs3Cg1Destroy(&This); 6140 6142 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r102157 r103262 231 231 bs3-cmn-TestSubDone.c \ 232 232 bs3-cmn-TestSubErrorCount.c \ 233 bs3-cmn-TestSubSub.c \ 234 bs3-cmn-TestSubSubDone.c \ 235 bs3-cmn-TestSubSubErrorCount.c \ 233 236 bs3-cmn-TestTerm.c \ 234 237 bs3-cmn-TestSendCmdWithStr.asm \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestData.c
r98103 r103262 46 46 * Global Variables * 47 47 *********************************************************************************************************************************/ 48 /** The test name. */ 49 const char BS3_FAR *BS3_CMN_NM(g_pszBs3Test) = NULL; 50 48 51 #if ARCH_BITS == 16 49 52 … … 57 60 uint16_t g_cusBs3TestErrors = 0; 58 61 62 /** The start error count of the current sub-sub-test. */ 63 uint16_t g_cusBs3SubSubTestAtErrors = 0; 64 /** Whether we've reported the sub-sub-test result or not. */ 65 bool g_fbBs3SubSubTestReported = true; 66 /** Whether the sub-sub-test has been skipped or not. */ 67 bool g_fbBs3SubSubTestSkipped = false; 68 /** The number of sub-sub-tests. */ 69 uint16_t g_cusBs3SubSubTests = 0; 70 /** The number of sub-sub-tests that failed. */ 71 uint16_t g_cusBs3SubSubTestsFailed = 0; 72 59 73 /** The start error count of the current subtest. */ 60 74 uint16_t g_cusBs3SubTestAtErrors = 0; 61 62 75 /** Whether we've reported the sub-test result or not. */ 63 76 bool g_fbBs3SubTestReported = true; 64 77 /** Whether the sub-test has been skipped or not. */ 65 78 bool g_fbBs3SubTestSkipped = false; 79 /** The number of sub-tests. */ 80 uint16_t g_cusBs3SubTests = 0; 81 /** The number of sub-tests that failed. */ 82 uint16_t g_cusBs3SubTestsFailed = 0; 66 83 67 /** The number of sub tests. */ 68 uint16_t g_cusBs3SubTests = 0; 69 70 /** The number of sub tests that failed. */ 71 uint16_t g_cusBs3SubTestsFailed = 0; 84 /** The current test step. */ 85 uint16_t g_usBs3TestStep; 72 86 73 87 /** VMMDEV_TESTING_UNIT_XXX -> string */ … … 125 139 /** The subtest name. */ 126 140 char g_szBs3SubTest[64]; 127 128 /** The current test step. */ 129 uint16_t g_usBs3TestStep; 141 /** The subsubtest name. */ 142 char g_szBs3SubSubTest[64]; 130 143 131 144 #endif /* ARCH_BITS == 16 */ 132 145 133 /** The test name. */134 const char BS3_FAR *BS3_CMN_NM(g_pszBs3Test) = NULL;135 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestSubSub.c
r103261 r103262 1 1 /* $Id$ */ 2 2 /** @file 3 * BS3Kit - Bs3TestSub , Bs3TestSubF, Bs3TestSubV.3 * BS3Kit - Bs3TestSubSub, Bs3TestSubSubF, Bs3TestSubSubV. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2007-202 3Oracle and/or its affiliates.7 * Copyright (C) 2007-2024 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 45 45 46 46 /** 47 * Equivalent to RTTestISub V.47 * Equivalent to RTTestISubSubV. 48 48 */ 49 #undef Bs3TestSub V50 BS3_CMN_DEF(void, Bs3TestSub V,(const char *pszFormat, va_list BS3_FAR va))49 #undef Bs3TestSubSubV 50 BS3_CMN_DEF(void, Bs3TestSubSubV,(const char *pszFormat, va_list BS3_FAR va)) 51 51 { 52 52 size_t cch; 53 53 54 BS3_ASSERT(g_szBs3SubTest[0] != '\0'); 55 54 56 /* 55 * Cleanup any previous sub- test.57 * Cleanup any previous sub-sub-test. 56 58 */ 57 bs3TestSub Cleanup();59 bs3TestSubSubCleanup(); 58 60 59 61 /* 60 62 * Format the sub-test name and update globals. 61 63 */ 62 cch = Bs3StrPrintfV(g_szBs3Sub Test, sizeof(g_szBs3SubTest), pszFormat, va);63 g_cusBs3Sub TestAtErrors = g_cusBs3TestErrors;64 BS3_ASSERT(!g_fbBs3Sub TestSkipped);65 g_cusBs3Sub Tests++;64 cch = Bs3StrPrintfV(g_szBs3SubSubTest, sizeof(g_szBs3SubSubTest), pszFormat, va); 65 g_cusBs3SubSubTestAtErrors = g_cusBs3TestErrors; 66 BS3_ASSERT(!g_fbBs3SubSubTestSkipped); 67 g_cusBs3SubSubTests++; 66 68 67 69 /* 68 70 * Tell VMMDev and output to the console. 69 71 */ 70 bs3TestSendCmdWithStr(VMMDEV_TESTING_CMD_SUB _NEW, g_szBs3SubTest);72 bs3TestSendCmdWithStr(VMMDEV_TESTING_CMD_SUBSUB_NEW, g_szBs3SubSubTest); 71 73 72 74 Bs3PrintStr(g_szBs3SubTest); 75 cch += Bs3StrLen(g_szBs3SubTest) + 3; 76 Bs3PrintStr(" / "); 77 Bs3PrintStr(g_szBs3SubSubTest); 73 78 Bs3PrintChr(':'); 74 79 do … … 77 82 Bs3PrintStr(" TESTING\n"); 78 83 79 /* The sub- test result is not yet reported. */80 g_fbBs3Sub TestReported = false;84 /* The sub-sub-test result is not yet reported. */ 85 g_fbBs3SubSubTestReported = false; 81 86 } 82 87 83 88 84 89 /** 85 * Equivalent to RTTestI FailedF.90 * Equivalent to RTTestISubSubF. 86 91 */ 87 #undef Bs3TestSub F88 BS3_CMN_DEF(void, Bs3TestSub F,(const char *pszFormat, ...))92 #undef Bs3TestSubSubF 93 BS3_CMN_DEF(void, Bs3TestSubSubF,(const char *pszFormat, ...)) 89 94 { 90 95 va_list va; 91 96 va_start(va, pszFormat); 92 BS3_CMN_NM(Bs3TestSub V)(pszFormat, va);97 BS3_CMN_NM(Bs3TestSubSubV)(pszFormat, va); 93 98 va_end(va); 94 99 } … … 96 101 97 102 /** 98 * Equivalent to RTTestISub .103 * Equivalent to RTTestISubSub. 99 104 */ 100 #undef Bs3TestSub 101 BS3_CMN_DEF(void, Bs3TestSub ,(const char *pszMessage))105 #undef Bs3TestSubSub 106 BS3_CMN_DEF(void, Bs3TestSubSub,(const char *pszMessage)) 102 107 { 103 BS3_CMN_NM(Bs3TestSub F)("%s", pszMessage);108 BS3_CMN_NM(Bs3TestSubSubF)("%s", pszMessage); 104 109 } 105 110 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestSubSubDone.c
r103261 r103262 1 1 /* $Id$ */ 2 2 /** @file 3 * BS3Kit - Bs3TestSub Done.3 * BS3Kit - Bs3TestSubSubDone. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2007-202 3Oracle and/or its affiliates.7 * Copyright (C) 2007-2024 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 45 45 46 46 /** 47 * Equivalent to RTTestISub Done.47 * Equivalent to RTTestISubSubDone. 48 48 */ 49 #undef Bs3TestSub Done50 BS3_CMN_DEF(void, Bs3TestSub Done,(void))49 #undef Bs3TestSubSubDone 50 BS3_CMN_DEF(void, Bs3TestSubSubDone,(void)) 51 51 { 52 bs3TestSub Cleanup();52 bs3TestSubSubCleanup(); 53 53 } 54 54 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestSubSubErrorCount.c
r103261 r103262 1 1 /* $Id$ */ 2 2 /** @file 3 * BS3Kit - Bs3TestSub ErrorCount.3 * BS3Kit - Bs3TestSubSubErrorCount. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2007-202 3Oracle and/or its affiliates.7 * Copyright (C) 2007-2024 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 45 45 46 46 /** 47 * Equivalent to RTTestSub ErrorCount.47 * Equivalent to RTTestSubSubErrorCount. 48 48 */ 49 #undef Bs3TestSub ErrorCount50 BS3_CMN_DEF(uint16_t, Bs3TestSub ErrorCount,(void))49 #undef Bs3TestSubSubErrorCount 50 BS3_CMN_DEF(uint16_t, Bs3TestSubSubErrorCount,(void)) 51 51 { 52 return g_cusBs3TestErrors - g_cusBs3Sub TestAtErrors;52 return g_cusBs3TestErrors - g_cusBs3SubSubTestAtErrors; 53 53 } 54 54 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestTerm.c
r103183 r103262 43 43 44 44 45 static void bs3TestSubCleanupWorker(char const BS3_FAR *pszName, bool fSkipped, uint16_t cErrorsAtStart, uint32_t uDoneCmd, 46 char const BS3_FAR *pszParent) 47 { 48 uint16_t const cErrors = g_cusBs3TestErrors - cErrorsAtStart; 49 size_t cch = Bs3StrLen(pszName); 50 51 /* Tell VMMDev. */ 52 bs3TestSendCmdWithU32(uDoneCmd, cErrors); 53 54 /* Print result to the console. */ 55 if (pszParent) 56 { 57 Bs3PrintStr(pszParent); 58 cch += Bs3StrLen(pszParent) + 3; 59 Bs3PrintStr(" / "); 60 } 61 Bs3PrintStr(pszName); 62 Bs3PrintChr(':'); 63 do 64 Bs3PrintChr(' '); 65 while (cch++ < 49); 66 67 if (!cErrors) 68 Bs3PrintStr(!fSkipped ? "PASSED\n" : "SKIPPED\n"); 69 else 70 { 71 if (uDoneCmd == VMMDEV_TESTING_CMD_SUB_DONE) 72 g_cusBs3SubTestsFailed++; 73 else 74 g_cusBs3SubSubTestsFailed++; 75 Bs3Printf("FAILED (%u errors)\n", cErrors); 76 } 77 } 78 79 80 /** 81 * Cleans up the current sub-sub-test. 82 */ 83 BS3_DECL(void) bs3TestSubSubCleanup(void) 84 { 85 if (g_szBs3SubSubTest[0] != '\0') 86 { 87 if (!g_fbBs3SubSubTestReported) 88 bs3TestSubCleanupWorker(g_szBs3SubSubTest, g_fbBs3SubSubTestSkipped, g_cusBs3SubSubTestAtErrors, 89 VMMDEV_TESTING_CMD_SUBSUB_DONE, g_szBs3SubTest); 90 91 /* Reset the sub-sub-test. */ 92 g_fbBs3SubSubTestReported = true; 93 g_fbBs3SubSubTestSkipped = false; 94 g_szBs3SubSubTest[0] = '\0'; 95 } 96 } 97 45 98 46 99 /** … … 49 102 BS3_DECL(void) bs3TestSubCleanup(void) 50 103 { 104 bs3TestSubSubCleanup(); 51 105 if (g_szBs3SubTest[0] != '\0') 52 106 { 53 107 if (!g_fbBs3SubTestReported) 54 { 55 size_t cch; 56 uint16_t cErrors = g_cusBs3TestErrors - g_cusBs3SubTestAtErrors; 57 58 /* Tell VMMDev. */ 59 bs3TestSendCmdWithU32(VMMDEV_TESTING_CMD_SUB_DONE, cErrors); 60 61 /* Print result to the console. */ 62 Bs3PrintStr(g_szBs3SubTest); 63 Bs3PrintChr(':'); 64 cch = Bs3StrLen(g_szBs3SubTest); 65 do 66 Bs3PrintChr(' '); 67 while (cch++ < 49); 68 69 if (!cErrors) 70 Bs3PrintStr(!g_fbBs3SubTestSkipped ? "PASSED\n" : "SKIPPED\n"); 71 else 72 { 73 g_cusBs3SubTestsFailed++; 74 Bs3Printf("FAILED (%u errors)\n", cErrors); 75 } 76 } 108 bs3TestSubCleanupWorker(g_szBs3SubTest, g_fbBs3SubTestSkipped, g_cusBs3SubTestAtErrors, 109 VMMDEV_TESTING_CMD_SUB_DONE, NULL); 77 110 78 111 /* Reset the sub-test. */ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-test.h
r98103 r103262 45 45 46 46 47 /** Indicates whether the VMMDev is operational. */48 #ifndef DOXYGEN_RUNNING49 # define g_fbBs3VMMDevTesting BS3_DATA_NM(g_fbBs3VMMDevTesting)50 #endif51 extern bool g_fbBs3VMMDevTesting;52 53 /** The number of tests that have failed. */54 #ifndef DOXYGEN_RUNNING55 # define g_cusBs3TestErrors BS3_DATA_NM(g_cusBs3TestErrors)56 #endif57 extern uint16_t g_cusBs3TestErrors;58 59 /** The start error count of the current subtest. */60 #ifndef DOXYGEN_RUNNING61 # define g_cusBs3SubTestAtErrors BS3_DATA_NM(g_cusBs3SubTestAtErrors)62 #endif63 extern uint16_t g_cusBs3SubTestAtErrors;64 65 /** Whether we've reported the sub-test result or not. */66 #ifndef DOXYGEN_RUNNING67 # define g_fbBs3SubTestReported BS3_DATA_NM(g_fbBs3SubTestReported)68 #endif69 extern bool g_fbBs3SubTestReported;70 /** Whether the sub-test has been skipped or not. */71 #ifndef DOXYGEN_RUNNING72 # define g_fbBs3SubTestSkipped BS3_DATA_NM(g_fbBs3SubTestSkipped)73 #endif74 extern bool g_fbBs3SubTestSkipped;75 76 /** The number of sub tests. */77 #ifndef DOXYGEN_RUNNING78 # define g_cusBs3SubTests BS3_DATA_NM(g_cusBs3SubTests)79 #endif80 extern uint16_t g_cusBs3SubTests;81 82 /** The number of sub tests that failed. */83 #ifndef DOXYGEN_RUNNING84 # define g_cusBs3SubTestsFailed BS3_DATA_NM(g_cusBs3SubTestsFailed)85 #endif86 extern uint16_t g_cusBs3SubTestsFailed;87 88 /** VMMDEV_TESTING_UNIT_XXX -> string */89 #ifndef DOXYGEN_RUNNING90 # define g_aszBs3TestUnitNames BS3_DATA_NM(g_aszBs3TestUnitNames)91 #endif92 extern char const g_aszBs3TestUnitNames[][12];93 94 47 /** The test name. */ 95 48 extern const char BS3_FAR *g_pszBs3Test_c16; … … 97 50 extern const char *g_pszBs3Test_c64; 98 51 52 /** Indicates whether the VMMDev is operational. */ 53 #ifndef DOXYGEN_RUNNING 54 # define g_fbBs3VMMDevTesting BS3_DATA_NM(g_fbBs3VMMDevTesting) 55 #endif 56 extern bool g_fbBs3VMMDevTesting; 57 58 /** The number of tests that have failed. */ 59 #ifndef DOXYGEN_RUNNING 60 # define g_cusBs3TestErrors BS3_DATA_NM(g_cusBs3TestErrors) 61 #endif 62 extern uint16_t g_cusBs3TestErrors; 63 64 99 65 /** The subtest name. */ 100 66 #ifndef DOXYGEN_RUNNING … … 102 68 #endif 103 69 extern char g_szBs3SubTest[64]; 70 71 /** The start error count of the current subtest. */ 72 #ifndef DOXYGEN_RUNNING 73 # define g_cusBs3SubTestAtErrors BS3_DATA_NM(g_cusBs3SubTestAtErrors) 74 #endif 75 extern uint16_t g_cusBs3SubTestAtErrors; 76 77 /** Whether we've reported the sub-test result or not. */ 78 #ifndef DOXYGEN_RUNNING 79 # define g_fbBs3SubTestReported BS3_DATA_NM(g_fbBs3SubTestReported) 80 #endif 81 extern bool g_fbBs3SubTestReported; 82 /** Whether the sub-test has been skipped or not. */ 83 #ifndef DOXYGEN_RUNNING 84 # define g_fbBs3SubTestSkipped BS3_DATA_NM(g_fbBs3SubTestSkipped) 85 #endif 86 extern bool g_fbBs3SubTestSkipped; 87 88 /** The number of sub tests. */ 89 #ifndef DOXYGEN_RUNNING 90 # define g_cusBs3SubTests BS3_DATA_NM(g_cusBs3SubTests) 91 #endif 92 extern uint16_t g_cusBs3SubTests; 93 94 /** The number of sub tests that failed. */ 95 #ifndef DOXYGEN_RUNNING 96 # define g_cusBs3SubTestsFailed BS3_DATA_NM(g_cusBs3SubTestsFailed) 97 #endif 98 extern uint16_t g_cusBs3SubTestsFailed; 99 100 101 /** The subsubtest name. */ 102 #ifndef DOXYGEN_RUNNING 103 # define g_szBs3SubSubTest BS3_DATA_NM(g_szBs3SubSubTest) 104 #endif 105 extern char g_szBs3SubSubTest[64]; 106 107 /** The start error count of the current sub-sub-test. */ 108 #ifndef DOXYGEN_RUNNING 109 # define g_cusBs3SubSubTestAtErrors BS3_DATA_NM(g_cusBs3SubSubTestAtErrors) 110 #endif 111 extern uint16_t g_cusBs3SubSubTestAtErrors; 112 113 /** Whether we've reported the sub-sub-test result or not. */ 114 #ifndef DOXYGEN_RUNNING 115 # define g_fbBs3SubSubTestReported BS3_DATA_NM(g_fbBs3SubSubTestReported) 116 #endif 117 extern bool g_fbBs3SubSubTestReported; 118 /** Whether the sub-sub-test has been skipped or not. */ 119 #ifndef DOXYGEN_RUNNING 120 # define g_fbBs3SubSubTestSkipped BS3_DATA_NM(g_fbBs3SubSubTestSkipped) 121 #endif 122 extern bool g_fbBs3SubSubTestSkipped; 123 124 /** The number of sub-sub-tests. */ 125 #ifndef DOXYGEN_RUNNING 126 # define g_cusBs3SubSubTests BS3_DATA_NM(g_cusBs3SubSubTests) 127 #endif 128 extern uint16_t g_cusBs3SubSubTests; 129 130 /** The number of sub-sub-tests that failed. */ 131 #ifndef DOXYGEN_RUNNING 132 # define g_cusBs3SubSubTestsFailed BS3_DATA_NM(g_cusBs3SubSubTestsFailed) 133 #endif 134 extern uint16_t g_cusBs3SubSubTestsFailed; 135 136 137 /** VMMDEV_TESTING_UNIT_XXX -> string */ 138 #ifndef DOXYGEN_RUNNING 139 # define g_aszBs3TestUnitNames BS3_DATA_NM(g_aszBs3TestUnitNames) 140 #endif 141 extern char const g_aszBs3TestUnitNames[][12]; 142 104 143 105 144 … … 141 180 #endif 142 181 BS3_DECL(bool) bs3TestIsVmmDevTestingPresent(void); 182 183 /** 184 * Similar to rtTestSubSubCleanup. 185 */ 186 #ifndef DOXYGEN_RUNNING 187 # define bs3TestSubSubCleanup BS3_CMN_NM(bs3TestSubSubCleanup) 188 #endif 189 BS3_DECL(void) bs3TestSubSubCleanup(void); 143 190 144 191 /** -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk
r102157 r103262 5 5 6 6 # 7 # Copyright (C) 2007-202 3Oracle and/or its affiliates.7 # Copyright (C) 2007-2024 Oracle and/or its affiliates. 8 8 # 9 9 # This file is part of VirtualBox base platform packages, as … … 164 164 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubDone) 165 165 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubF) 166 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubSub) 167 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubSubDone) 168 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubSubF) 169 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubSubV) 166 170 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubV) 167 171 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestTerm) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h
r102157 r103262 5 5 6 6 /* 7 * Copyright (C) 2007-202 3Oracle and/or its affiliates.7 * Copyright (C) 2007-2024 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 217 217 #define Bs3TestSubErrorCount BS3_CMN_MANGLER(Bs3TestSubErrorCount) 218 218 #define Bs3TestSubF BS3_CMN_MANGLER(Bs3TestSubF) 219 #define Bs3TestSubSub BS3_CMN_MANGLER(Bs3TestSubSub) 220 #define Bs3TestSubSubDone BS3_CMN_MANGLER(Bs3TestSubSubDone) 221 #define Bs3TestSubSubF BS3_CMN_MANGLER(Bs3TestSubSubF) 222 #define Bs3TestSubSubV BS3_CMN_MANGLER(Bs3TestSubSubV) 219 223 #define Bs3TestSubV BS3_CMN_MANGLER(Bs3TestSubV) 220 224 #define Bs3TestTerm BS3_CMN_MANGLER(Bs3TestTerm) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h
r102157 r103262 5 5 6 6 /* 7 * Copyright (C) 2007-202 3Oracle and/or its affiliates.7 * Copyright (C) 2007-2024 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 217 217 #undef Bs3TestSubErrorCount 218 218 #undef Bs3TestSubF 219 #undef Bs3TestSubSub 220 #undef Bs3TestSubSubDone 221 #undef Bs3TestSubSubF 222 #undef Bs3TestSubSubV 219 223 #undef Bs3TestSubV 220 224 #undef Bs3TestTerm -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r102277 r103262 3629 3629 3630 3630 /** 3631 * Equivalent to RTTestI FailedF.3631 * Equivalent to RTTestISubF. 3632 3632 */ 3633 3633 BS3_CMN_PROTO_STUB(void, Bs3TestSubF,(const char BS3_FAR *pszFormat, ...)); … … 3642 3642 */ 3643 3643 BS3_CMN_PROTO_STUB(void, Bs3TestSubDone,(void)); 3644 3645 /** 3646 * Equivalent to RTTestISubSub. 3647 */ 3648 BS3_CMN_PROTO_STUB(void, Bs3TestSubSub,(const char BS3_FAR *pszSubTest)); 3649 3650 /** 3651 * Equivalent to RTTestISubSubF. 3652 */ 3653 BS3_CMN_PROTO_STUB(void, Bs3TestSubSubF,(const char BS3_FAR *pszFormat, ...)); 3654 3655 /** 3656 * Equivalent to RTTestISubSubV. 3657 */ 3658 BS3_CMN_PROTO_STUB(void, Bs3TestSubSubV,(const char BS3_FAR *pszFormat, va_list BS3_FAR va)); 3659 3660 /** 3661 * Equivalent to RTTestISubSubDone. 3662 */ 3663 BS3_CMN_PROTO_STUB(void, Bs3TestSubSubDone,(void)); 3644 3664 3645 3665 /**
Note:
See TracChangeset
for help on using the changeset viewer.