VirtualBox

Changeset 103262 in vbox


Ignore:
Timestamp:
Feb 8, 2024 12:00:32 AM (12 months ago)
Author:
vboxsync
Message:

IPRT,VMMDev,Bs3Kit: Added support for sub-sub-tests to better deal with bs3-cpu-generated-1 and others with too many sub-tests for the test manager.

Location:
trunk
Files:
16 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VMMDevTesting.h

    r98103 r103262  
    128128/** Start a new sub-test, sending name (zero terminated string). (RTTestSub) */
    129129#define VMMDEV_TESTING_CMD_SUB_NEW      UINT32_C(0xcab1e002)
    130 /** Sub-test is done, sending 32-bit error count for it. (RTTestDone) */
     130/** Sub-test is done, sending 32-bit error count for it. (RTTestSubDone) */
    131131#define VMMDEV_TESTING_CMD_SUB_DONE     UINT32_C(0xcab1e003)
    132132/** Report a failure, sending reason (zero terminated string). (RTTestFailed) */
     
    145145 * DATA port and reading back the result. */
    146146#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)
    147151
    148152/** The magic part of the command. */
  • trunk/include/iprt/mangling.h

    r103252 r103262  
    25372537# define RTTestISubF                                    RT_MANGLER(RTTestISubF)
    25382538# 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)
    25392543# define RTTestIValue                                   RT_MANGLER(RTTestIValue)
    25402544# define RTTestIValueF                                  RT_MANGLER(RTTestIValueF)
     
    25572561# define RTTestSubF                                     RT_MANGLER(RTTestSubF)
    25582562# 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)
    25592568# define RTTestSummaryAndDestroy                        RT_MANGLER(RTTestSummaryAndDestroy)
    25602569# define RTTestValue                                    RT_MANGLER(RTTestValue)
  • trunk/include/iprt/test.h

    r98103 r103262  
    421421
    422422/**
     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 */
     433RTR3DECL(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 */
     446RTR3DECL(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 */
     459RTR3DECL(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 */
     468RTR3DECL(int) RTTestSubSubDone(RTTEST hTest);
     469
     470/**
    423471 * Prints an extended PASSED message, optional.
    424472 *
    425  * This does not conclude the sub-test, it could be used to report the passing
    426  * 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.
    427475 *
    428476 * @returns Number of chars printed, negative numbers are IPRT error codes.
     
    437485 * Prints an extended PASSED message, optional.
    438486 *
    439  * This does not conclude the sub-test, it could be used to report the passing
    440  * 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.
    441489 *
    442490 * @returns Number of chars printed, negative numbers are IPRT error codes.
     
    556604 * This is typically used for benchmarking but can be used for other purposes
    557605 * 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.
    559608 *
    560609 * @returns IPRT status code.
     
    617666
    618667/**
    619  * Get the error count of the current sub test.
     668 * Get the error count of the current sub-test.
    620669 *
    621670 * @returns The error counter, UINT32_MAX if no valid test handle.
     
    624673 */
    625674RTR3DECL(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 */
     683RTR3DECL(uint32_t) RTTestSubSubErrorCount(RTTEST hTest);
    626684
    627685/**
     
    10241082
    10251083/**
    1026  * Completes a sub-test.
     1084 * Completes a sub-test (and any outstanding sub-sub-test).
    10271085 *
    10281086 * @returns Number of chars printed.
     
    10311089
    10321090/**
     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 */
     1099RTR3DECL(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 */
     1110RTR3DECL(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 */
     1121RTR3DECL(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 */
     1128RTR3DECL(int) RTTestISubSubDone(void);
     1129
     1130/**
    10331131 * Prints an extended PASSED message, optional.
    10341132 *
    1035  * This does not conclude the sub-test, it could be used to report the passing
    1036  * 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.
    10371135 *
    10381136 * @returns IPRT status code.
     
    10451143 * Prints an extended PASSED message, optional.
    10461144 *
    1047  * This does not conclude the sub-test, it could be used to report the passing
    1048  * 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.
    10491147 *
    10501148 * @returns IPRT status code.
     
    10591157 * This is typically used for benchmarking but can be used for other purposes
    10601158 * 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.
    10621161 *
    10631162 * @returns IPRT status code.
  • trunk/src/VBox/Devices/VMMDev/VMMDevTesting.cpp

    r103245 r103262  
    384384                case VMMDEV_TESTING_CMD_INIT:
    385385                case VMMDEV_TESTING_CMD_SUB_NEW:
     386                case VMMDEV_TESTING_CMD_SUBSUB_NEW:
    386387                case VMMDEV_TESTING_CMD_FAILED:
    387388                case VMMDEV_TESTING_CMD_SKIPPED:
     
    413414                                    if (pThisCC->hTestingTest != NIL_RTTEST)
    414415                                        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);
    415421                                    break;
    416422                                case VMMDEV_TESTING_CMD_FAILED:
     
    445451                case VMMDEV_TESTING_CMD_TERM:
    446452                case VMMDEV_TESTING_CMD_SUB_DONE:
     453                case VMMDEV_TESTING_CMD_SUBSUB_DONE:
    447454                    if (cb == 2)
    448455                    {
     
    469476#ifdef IN_RING3
    470477                        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
    471491                        if (uCmd == VMMDEV_TESTING_CMD_TERM)
    472492                        {
    473493                            if (pThisCC->hTestingTest != NIL_RTTEST)
    474494                            {
    475                                 while (RTTestErrorCount(pThisCC->hTestingTest) < u32)
    476                                     RTTestErrorInc(pThisCC->hTestingTest); /* A bit stupid, but does the trick. */
    477495                                RTTestSubDone(pThisCC->hTestingTest);
    478496                                RTTestSummaryAndDestroy(pThisCC->hTestingTest);
     
    481499                            VMMDEV_TESTING_OUTPUT(("testing: TERM - %u errors\n", u32));
    482500                        }
     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                        }
    483507                        else
    484508                        {
    485509                            if (pThisCC->hTestingTest != NIL_RTTEST)
    486                             {
    487                                 while (RTTestSubErrorCount(pThisCC->hTestingTest) < u32)
    488                                     RTTestErrorInc(pThisCC->hTestingTest); /* A bit stupid, but does the trick. */
    489510                                RTTestSubDone(pThisCC->hTestingTest);
    490                             }
    491511                            VMMDEV_TESTING_OUTPUT(("testing: SUB_DONE - %u errors\n", u32));
    492512                        }
  • trunk/src/VBox/Runtime/VBox/VBoxRTImp.def

    r103014 r103262  
    19741974    RTTestISubF
    19751975    RTTestISubV
     1976    RTTestISubSub
     1977    RTTestISubSubDone
     1978    RTTestISubSubF
     1979    RTTestISubSubV
    19761980    RTTestIValue
    19771981    RTTestIValueF
     
    19891993    RTTestSub
    19901994    RTTestSubDone
     1995    RTTestSubErrorCount
    19911996    RTTestSubF
    19921997    RTTestSubV
     1998    RTTestSubSub
     1999    RTTestSubSubDone
     2000    RTTestSubSubErrorCount
     2001    RTTestSubSubF
     2002    RTTestSubSubV
    19932003    RTTestSummaryAndDestroy
    19942004    RTTestValue
  • trunk/src/VBox/Runtime/r3/test.cpp

    r103005 r103262  
    122122    PRTTESTGUARDEDMEM   pGuardedMem;
    123123
    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;
    139145
    140146    /** Error context message. */
     
    243249
    244250
     251/** RTTestCreateEx helpers.   */
     252DECL_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
    245264RTR3DECL(int) RTTestCreateEx(const char *pszTest, uint32_t fFlags, RTTESTLVL enmMaxLevel,
    246265                             RTHCINTPTR iNativeTestPipe, const char *pszXmlFile, PRTTEST phTest)
     
    277296    pTest->pGuardedMem      = NULL;
    278297
    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);
    286300
    287301    pTest->fXmlEnabled      = false;
     
    525539    }
    526540
    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;
    529545    RTStrFree((char *)pTest->pszTest);
    530546    pTest->pszTest = NULL;
     
    944960        {
    945961            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);
    947963            rtTestXmlOutput(pTest, "</Test>\n");
    948964        }
     
    11201136
    11211137/**
    1122  * Prints the result of a sub-test if necessary.
     1138 * Prints the result of a sub-test or sub-sub-test if necessary.
    11231139 *
    11241140 * @returns Number of chars printed.
    11251141 * @param   pTest       The test instance.
     1142 * @param   pTracker    The sub-test or sub-sub-test tracker.
     1143 * @param   cchIndent   Result indent.
    11261144 * @remarks Caller own the test Lock.
    11271145 */
    1128 static int rtTestSubTestReport(PRTTESTINT pTest)
     1146static int rtTestSubTestReportWorker(PRTTESTINT pTest, struct RTTESTINT::RTTESTINTSUBTRACKER *pTracker, unsigned cchIndent)
    11291147{
    11301148    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;
    11361155        if (!cErrors)
    11371156        {
    1138             if (!pTest->fSubTestSkipped)
     1157            if (!pTracker->fSkipped)
    11391158            {
    11401159                rtTestXmlElem(pTest, "Passed", NULL);
    11411160                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);
    11431163            }
    11441164            else
     
    11461166                rtTestXmlElem(pTest, "Skipped", NULL);
    11471167                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);
    11491170            }
    11501171        }
    11511172        else
    11521173        {
    1153             pTest->cSubTestsFailed++;
     1174            pTracker->cFailedTests++;
    11541175            rtTestXmlElem(pTest, "Failed", "errors=\"%u\"", cErrors);
    11551176            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);
    11581179        }
    11591180    }
     
    11621183
    11631184
    1164 /**
    1165  * RTTestSub and RTTestSubDone worker that cleans up the current (if any)
    1166  * sub test.
     1185/** Worker for rtTestSubSubCleanup and rtTestSubCleanup.  */
     1186static 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.
    11671199 *
    11681200 * @returns Number of chars printed.
     
    11701202 * @remarks Caller own the test Lock.
    11711203 */
     1204static 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 */
    11721218static int rtTestSubCleanup(PRTTESTINT pTest)
    11731219{
    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
    11831223    RTStrFree(pTest->pszErrCtx);
    11841224    pTest->pszErrCtx = NULL;
     
    11931233
    11941234    RTCritSectEnter(&pTest->Lock);
    1195     rtTestSubTestReport(pTest);
     1235    rtTestSubTestReportWorker(pTest, &pTest->SubSub, 2);
     1236    rtTestSubTestReportWorker(pTest, &pTest->Sub, 0);
    11961237    RTCritSectLeave(&pTest->Lock);
    11971238
     
    12191260
    12201261    RTCritSectEnter(&pTest->Lock);
    1221     rtTestSubTestReport(pTest);
     1262    rtTestSubTestReportWorker(pTest, &pTest->SubSub, 2);
     1263    rtTestSubTestReportWorker(pTest, &pTest->Sub, 0);
    12221264    RTCritSectLeave(&pTest->Lock);
    12231265
     
    12511293
    12521294
     1295/** Worker for RTTestSub and RTTestSubSub. */
     1296static 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
    12531309RTR3DECL(int) RTTestSub(RTTEST hTest, const char *pszSubTest)
    12541310{
     
    12611317    rtTestSubCleanup(pTest);
    12621318
     1319    pTest->SubSub.cTests       = 0;
     1320    pTest->SubSub.cFailedTests = 0;
     1321
    12631322    /* 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);
    12721324
    12731325    int cch = 0;
     
    13261378
    13271379
     1380RTR3DECL(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
     1409RTR3DECL(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
     1419RTR3DECL(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
     1433RTR3DECL(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
    13281445RTR3DECL(int) RTTestPassedV(RTTEST hTest, const char *pszFormat, va_list va)
    13291446{
     
    13671484    RTTEST_GET_VALID_RETURN_RC(pTest, VERR_INVALID_HANDLE);
    13681485
    1369     pTest->fSubTestSkipped = true;
     1486    if (pTest->SubSub.pszName)
     1487        pTest->SubSub.fSkipped = true;
     1488    else
     1489        pTest->Sub.fSkipped = true;
    13701490
    13711491    int cch = 0;
     
    15331653    RTTEST_GET_VALID_RETURN_RC(pTest, UINT32_MAX);
    15341654
    1535     return ASMAtomicReadU32(&pTest->cErrors) - pTest->cSubTestAtErrors;
     1655    return ASMAtomicReadU32(&pTest->cErrors) - pTest->Sub.cErrorsAtStart;
     1656}
     1657
     1658
     1659RTR3DECL(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;
    15361665}
    15371666
  • trunk/src/VBox/Runtime/r3/testi.cpp

    r98103 r103262  
    8787
    8888
     89RTR3DECL(int) RTTestISubSub(const char *pszSubSubTest)
     90{
     91    return RTTestSubSub(NIL_RTTEST, pszSubSubTest);
     92}
     93
     94
     95RTR3DECL(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
     105RTR3DECL(int) RTTestISubSubV(const char *pszSubSubTestFmt, va_list va)
     106{
     107    return RTTestSubSubV(NIL_RTTEST, pszSubSubTestFmt, va);
     108}
     109
     110
     111RTR3DECL(int) RTTestISubSubDone(void)
     112{
     113    return RTTestSubSubDone(NIL_RTTEST);
     114}
     115
     116
    89117RTR3DECL(int) RTTestIPassedV(const char *pszFormat, va_list va)
    90118{
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-generated-1-template.c

    r103216 r103262  
    56485648    pThis->pResultExtCtx  = NULL;
    56495649    pThis->pInitialExtCtx = NULL;
     5650
     5651    Bs3TestSubDone();
    56505652}
    56515653
     
    56805682    pThis->pabOpcodes         = g_abBs3Cg1Opcodes;
    56815683    pThis->fAdvanceMnemonic   = 1;
     5684
     5685    /* Start the mode sub-test before we start reporting errors against it. */
     5686    Bs3TestSub(pThis->pszModeShort);
    56825687
    56835688    /* Allocate extended context structures. */
     
    59165921        pThis->cchMnemonic              = pInstr->cchMnemonic;
    59175922        if (pThis->fAdvanceMnemonic)
    5918             Bs3TestSubF("%s / %.*s", pThis->pszModeShort, pThis->cchMnemonic, pThis->pchMnemonic);
     5923            Bs3TestSubSubF("%.*s", pThis->cchMnemonic, pThis->pchMnemonic);
    59195924        pThis->fAdvanceMnemonic         = pInstr->fAdvanceMnemonic;
    59205925        pThis->uOpcodeMap               = pInstr->uOpcodeMap;
     
    61336138
    61346139    if (BS3_CMN_NM(Bs3Cg1Init)(&This, bMode))
    6135     {
    61366140        bRet = BS3_CMN_NM(Bs3Cg1WorkerInner)(&This);
    6137         Bs3TestSubDone();
    6138     }
    61396141    Bs3Cg1Destroy(&This);
    61406142
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk

    r102157 r103262  
    231231        bs3-cmn-TestSubDone.c \
    232232        bs3-cmn-TestSubErrorCount.c \
     233        bs3-cmn-TestSubSub.c \
     234        bs3-cmn-TestSubSubDone.c \
     235        bs3-cmn-TestSubSubErrorCount.c \
    233236        bs3-cmn-TestTerm.c \
    234237        bs3-cmn-TestSendCmdWithStr.asm \
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestData.c

    r98103 r103262  
    4646*   Global Variables                                                                                                             *
    4747*********************************************************************************************************************************/
     48/** The test name. */
     49const char BS3_FAR *BS3_CMN_NM(g_pszBs3Test) = NULL;
     50
    4851#if ARCH_BITS == 16
    4952
     
    5760uint16_t    g_cusBs3TestErrors = 0;
    5861
     62/** The start error count of the current sub-sub-test. */
     63uint16_t    g_cusBs3SubSubTestAtErrors = 0;
     64/** Whether we've reported the sub-sub-test result or not. */
     65bool        g_fbBs3SubSubTestReported = true;
     66/** Whether the sub-sub-test has been skipped or not. */
     67bool        g_fbBs3SubSubTestSkipped = false;
     68/** The number of sub-sub-tests. */
     69uint16_t    g_cusBs3SubSubTests = 0;
     70/** The number of sub-sub-tests that failed. */
     71uint16_t    g_cusBs3SubSubTestsFailed = 0;
     72
    5973/** The start error count of the current subtest. */
    6074uint16_t    g_cusBs3SubTestAtErrors = 0;
    61 
    6275/** Whether we've reported the sub-test result or not. */
    6376bool        g_fbBs3SubTestReported = true;
    6477/** Whether the sub-test has been skipped or not. */
    6578bool        g_fbBs3SubTestSkipped = false;
     79/** The number of sub-tests. */
     80uint16_t    g_cusBs3SubTests = 0;
     81/** The number of sub-tests that failed. */
     82uint16_t    g_cusBs3SubTestsFailed = 0;
    6683
    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. */
     85uint16_t    g_usBs3TestStep;
    7286
    7387/** VMMDEV_TESTING_UNIT_XXX -> string */
     
    125139/** The subtest name. */
    126140char        g_szBs3SubTest[64];
    127 
    128 /** The current test step. */
    129 uint16_t    g_usBs3TestStep;
     141/** The subsubtest name. */
     142char        g_szBs3SubSubTest[64];
    130143
    131144#endif /* ARCH_BITS == 16 */
    132145
    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  
    11/* $Id$ */
    22/** @file
    3  * BS3Kit - Bs3TestSub, Bs3TestSubF, Bs3TestSubV.
     3 * BS3Kit - Bs3TestSubSub, Bs3TestSubSubF, Bs3TestSubSubV.
    44 */
    55
    66/*
    7  * Copyright (C) 2007-2023 Oracle and/or its affiliates.
     7 * Copyright (C) 2007-2024 Oracle and/or its affiliates.
    88 *
    99 * This file is part of VirtualBox base platform packages, as
     
    4545
    4646/**
    47  * Equivalent to RTTestISubV.
     47 * Equivalent to RTTestISubSubV.
    4848 */
    49 #undef Bs3TestSubV
    50 BS3_CMN_DEF(void, Bs3TestSubV,(const char *pszFormat, va_list BS3_FAR va))
     49#undef Bs3TestSubSubV
     50BS3_CMN_DEF(void, Bs3TestSubSubV,(const char *pszFormat, va_list BS3_FAR va))
    5151{
    5252    size_t cch;
    5353
     54    BS3_ASSERT(g_szBs3SubTest[0] != '\0');
     55
    5456    /*
    55      * Cleanup any previous sub-test.
     57     * Cleanup any previous sub-sub-test.
    5658     */
    57     bs3TestSubCleanup();
     59    bs3TestSubSubCleanup();
    5860
    5961    /*
    6062     * Format the sub-test name and update globals.
    6163     */
    62     cch = Bs3StrPrintfV(g_szBs3SubTest, sizeof(g_szBs3SubTest), pszFormat, va);
    63     g_cusBs3SubTestAtErrors = g_cusBs3TestErrors;
    64     BS3_ASSERT(!g_fbBs3SubTestSkipped);
    65     g_cusBs3SubTests++;
     64    cch = Bs3StrPrintfV(g_szBs3SubSubTest, sizeof(g_szBs3SubSubTest), pszFormat, va);
     65    g_cusBs3SubSubTestAtErrors = g_cusBs3TestErrors;
     66    BS3_ASSERT(!g_fbBs3SubSubTestSkipped);
     67    g_cusBs3SubSubTests++;
    6668
    6769    /*
    6870     * Tell VMMDev and output to the console.
    6971     */
    70     bs3TestSendCmdWithStr(VMMDEV_TESTING_CMD_SUB_NEW, g_szBs3SubTest);
     72    bs3TestSendCmdWithStr(VMMDEV_TESTING_CMD_SUBSUB_NEW, g_szBs3SubSubTest);
    7173
    7274    Bs3PrintStr(g_szBs3SubTest);
     75    cch += Bs3StrLen(g_szBs3SubTest) + 3;
     76    Bs3PrintStr(" / ");
     77    Bs3PrintStr(g_szBs3SubSubTest);
    7378    Bs3PrintChr(':');
    7479    do
     
    7782    Bs3PrintStr(" TESTING\n");
    7883
    79     /* The sub-test result is not yet reported. */
    80     g_fbBs3SubTestReported = false;
     84    /* The sub-sub-test result is not yet reported. */
     85    g_fbBs3SubSubTestReported = false;
    8186}
    8287
    8388
    8489/**
    85  * Equivalent to RTTestIFailedF.
     90 * Equivalent to RTTestISubSubF.
    8691 */
    87 #undef Bs3TestSubF
    88 BS3_CMN_DEF(void, Bs3TestSubF,(const char *pszFormat, ...))
     92#undef Bs3TestSubSubF
     93BS3_CMN_DEF(void, Bs3TestSubSubF,(const char *pszFormat, ...))
    8994{
    9095    va_list va;
    9196    va_start(va, pszFormat);
    92     BS3_CMN_NM(Bs3TestSubV)(pszFormat, va);
     97    BS3_CMN_NM(Bs3TestSubSubV)(pszFormat, va);
    9398    va_end(va);
    9499}
     
    96101
    97102/**
    98  * Equivalent to RTTestISub.
     103 * Equivalent to RTTestISubSub.
    99104 */
    100 #undef Bs3TestSub
    101 BS3_CMN_DEF(void, Bs3TestSub,(const char *pszMessage))
     105#undef Bs3TestSubSub
     106BS3_CMN_DEF(void, Bs3TestSubSub,(const char *pszMessage))
    102107{
    103     BS3_CMN_NM(Bs3TestSubF)("%s", pszMessage);
     108    BS3_CMN_NM(Bs3TestSubSubF)("%s", pszMessage);
    104109}
    105110
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestSubSubDone.c

    r103261 r103262  
    11/* $Id$ */
    22/** @file
    3  * BS3Kit - Bs3TestSubDone.
     3 * BS3Kit - Bs3TestSubSubDone.
    44 */
    55
    66/*
    7  * Copyright (C) 2007-2023 Oracle and/or its affiliates.
     7 * Copyright (C) 2007-2024 Oracle and/or its affiliates.
    88 *
    99 * This file is part of VirtualBox base platform packages, as
     
    4545
    4646/**
    47  * Equivalent to RTTestISubDone.
     47 * Equivalent to RTTestISubSubDone.
    4848 */
    49 #undef Bs3TestSubDone
    50 BS3_CMN_DEF(void, Bs3TestSubDone,(void))
     49#undef Bs3TestSubSubDone
     50BS3_CMN_DEF(void, Bs3TestSubSubDone,(void))
    5151{
    52     bs3TestSubCleanup();
     52    bs3TestSubSubCleanup();
    5353}
    5454
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestSubSubErrorCount.c

    r103261 r103262  
    11/* $Id$ */
    22/** @file
    3  * BS3Kit - Bs3TestSubErrorCount.
     3 * BS3Kit - Bs3TestSubSubErrorCount.
    44 */
    55
    66/*
    7  * Copyright (C) 2007-2023 Oracle and/or its affiliates.
     7 * Copyright (C) 2007-2024 Oracle and/or its affiliates.
    88 *
    99 * This file is part of VirtualBox base platform packages, as
     
    4545
    4646/**
    47  * Equivalent to RTTestSubErrorCount.
     47 * Equivalent to RTTestSubSubErrorCount.
    4848 */
    49 #undef Bs3TestSubErrorCount
    50 BS3_CMN_DEF(uint16_t, Bs3TestSubErrorCount,(void))
     49#undef Bs3TestSubSubErrorCount
     50BS3_CMN_DEF(uint16_t, Bs3TestSubSubErrorCount,(void))
    5151{
    52     return g_cusBs3TestErrors - g_cusBs3SubTestAtErrors;
     52    return g_cusBs3TestErrors - g_cusBs3SubSubTestAtErrors;
    5353}
    5454
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestTerm.c

    r103183 r103262  
    4343
    4444
     45static 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 */
     83BS3_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
    4598
    4699/**
     
    49102BS3_DECL(void) bs3TestSubCleanup(void)
    50103{
     104    bs3TestSubSubCleanup();
    51105    if (g_szBs3SubTest[0] != '\0')
    52106    {
    53107        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);
    77110
    78111        /* Reset the sub-test. */
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-test.h

    r98103 r103262  
    4545
    4646
    47 /** Indicates whether the VMMDev is operational. */
    48 #ifndef DOXYGEN_RUNNING
    49 # define g_fbBs3VMMDevTesting BS3_DATA_NM(g_fbBs3VMMDevTesting)
    50 #endif
    51 extern bool                 g_fbBs3VMMDevTesting;
    52 
    53 /** The number of tests that have failed. */
    54 #ifndef DOXYGEN_RUNNING
    55 # define g_cusBs3TestErrors BS3_DATA_NM(g_cusBs3TestErrors)
    56 #endif
    57 extern uint16_t             g_cusBs3TestErrors;
    58 
    59 /** The start error count of the current subtest. */
    60 #ifndef DOXYGEN_RUNNING
    61 # define g_cusBs3SubTestAtErrors BS3_DATA_NM(g_cusBs3SubTestAtErrors)
    62 #endif
    63 extern uint16_t             g_cusBs3SubTestAtErrors;
    64 
    65 /**  Whether we've reported the sub-test result or not. */
    66 #ifndef DOXYGEN_RUNNING
    67 # define g_fbBs3SubTestReported BS3_DATA_NM(g_fbBs3SubTestReported)
    68 #endif
    69 extern bool                 g_fbBs3SubTestReported;
    70 /** Whether the sub-test has been skipped or not. */
    71 #ifndef DOXYGEN_RUNNING
    72 # define g_fbBs3SubTestSkipped BS3_DATA_NM(g_fbBs3SubTestSkipped)
    73 #endif
    74 extern bool                 g_fbBs3SubTestSkipped;
    75 
    76 /** The number of sub tests. */
    77 #ifndef DOXYGEN_RUNNING
    78 # define g_cusBs3SubTests   BS3_DATA_NM(g_cusBs3SubTests)
    79 #endif
    80 extern uint16_t             g_cusBs3SubTests;
    81 
    82 /** The number of sub tests that failed. */
    83 #ifndef DOXYGEN_RUNNING
    84 # define g_cusBs3SubTestsFailed BS3_DATA_NM(g_cusBs3SubTestsFailed)
    85 #endif
    86 extern uint16_t             g_cusBs3SubTestsFailed;
    87 
    88 /** VMMDEV_TESTING_UNIT_XXX -> string */
    89 #ifndef DOXYGEN_RUNNING
    90 # define g_aszBs3TestUnitNames BS3_DATA_NM(g_aszBs3TestUnitNames)
    91 #endif
    92 extern char const           g_aszBs3TestUnitNames[][12];
    93 
    9447/** The test name. */
    9548extern const char BS3_FAR  *g_pszBs3Test_c16;
     
    9750extern const char          *g_pszBs3Test_c64;
    9851
     52/** Indicates whether the VMMDev is operational. */
     53#ifndef DOXYGEN_RUNNING
     54# define g_fbBs3VMMDevTesting BS3_DATA_NM(g_fbBs3VMMDevTesting)
     55#endif
     56extern 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
     62extern uint16_t             g_cusBs3TestErrors;
     63
     64
    9965/** The subtest name. */
    10066#ifndef DOXYGEN_RUNNING
     
    10268#endif
    10369extern 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
     75extern 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
     81extern 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
     86extern 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
     92extern 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
     98extern 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
     105extern 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
     111extern 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
     117extern 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
     122extern 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
     128extern 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
     134extern 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
     141extern char const           g_aszBs3TestUnitNames[][12];
     142
    104143
    105144
     
    141180#endif
    142181BS3_DECL(bool) bs3TestIsVmmDevTestingPresent(void);
     182
     183/**
     184 * Similar to rtTestSubSubCleanup.
     185 */
     186#ifndef DOXYGEN_RUNNING
     187# define bs3TestSubSubCleanup BS3_CMN_NM(bs3TestSubSubCleanup)
     188#endif
     189BS3_DECL(void) bs3TestSubSubCleanup(void);
    143190
    144191/**
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk

    r102157 r103262  
    55
    66#
    7 # Copyright (C) 2007-2023 Oracle and/or its affiliates.
     7# Copyright (C) 2007-2024 Oracle and/or its affiliates.
    88#
    99# This file is part of VirtualBox base platform packages, as
     
    164164$(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubDone)
    165165$(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)
    166170$(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubV)
    167171$(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestTerm)
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h

    r102157 r103262  
    55
    66/*
    7  * Copyright (C) 2007-2023 Oracle and/or its affiliates.
     7 * Copyright (C) 2007-2024 Oracle and/or its affiliates.
    88 *
    99 * This file is part of VirtualBox base platform packages, as
     
    217217#define Bs3TestSubErrorCount BS3_CMN_MANGLER(Bs3TestSubErrorCount)
    218218#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)
    219223#define Bs3TestSubV BS3_CMN_MANGLER(Bs3TestSubV)
    220224#define Bs3TestTerm BS3_CMN_MANGLER(Bs3TestTerm)
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h

    r102157 r103262  
    55
    66/*
    7  * Copyright (C) 2007-2023 Oracle and/or its affiliates.
     7 * Copyright (C) 2007-2024 Oracle and/or its affiliates.
    88 *
    99 * This file is part of VirtualBox base platform packages, as
     
    217217#undef Bs3TestSubErrorCount
    218218#undef Bs3TestSubF
     219#undef Bs3TestSubSub
     220#undef Bs3TestSubSubDone
     221#undef Bs3TestSubSubF
     222#undef Bs3TestSubSubV
    219223#undef Bs3TestSubV
    220224#undef Bs3TestTerm
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h

    r102277 r103262  
    36293629
    36303630/**
    3631  * Equivalent to RTTestIFailedF.
     3631 * Equivalent to RTTestISubF.
    36323632 */
    36333633BS3_CMN_PROTO_STUB(void, Bs3TestSubF,(const char BS3_FAR *pszFormat, ...));
     
    36423642 */
    36433643BS3_CMN_PROTO_STUB(void, Bs3TestSubDone,(void));
     3644
     3645/**
     3646 * Equivalent to RTTestISubSub.
     3647 */
     3648BS3_CMN_PROTO_STUB(void, Bs3TestSubSub,(const char BS3_FAR *pszSubTest));
     3649
     3650/**
     3651 * Equivalent to RTTestISubSubF.
     3652 */
     3653BS3_CMN_PROTO_STUB(void, Bs3TestSubSubF,(const char BS3_FAR *pszFormat, ...));
     3654
     3655/**
     3656 * Equivalent to RTTestISubSubV.
     3657 */
     3658BS3_CMN_PROTO_STUB(void, Bs3TestSubSubV,(const char BS3_FAR *pszFormat, va_list BS3_FAR va));
     3659
     3660/**
     3661 * Equivalent to RTTestISubSubDone.
     3662 */
     3663BS3_CMN_PROTO_STUB(void, Bs3TestSubSubDone,(void));
    36443664
    36453665/**
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette