VirtualBox

Changeset 103262 in vbox for trunk/include


Ignore:
Timestamp:
Feb 8, 2024 12:00:32 AM (15 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161553
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/include
Files:
3 edited

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.
Note: See TracChangeset for help on using the changeset viewer.

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