VirtualBox

Ignore:
Timestamp:
Apr 4, 2016 5:01:14 PM (9 years ago)
Author:
vboxsync
Message:

bs3kit: Use \#define with BS3_DATA_NM to map data symbols to names accessible in all context. (Underscores in 16-bit and 32-bit, no underscores in 64-bit.) Detect PSE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestTerm.c

    r59865 r60311  
    3939BS3_DECL(void) bs3TestSubCleanup(void)
    4040{
    41     if (BS3_DATA_NM(g_szBs3SubTest)[0] != '\0')
     41    if (g_szBs3SubTest[0] != '\0')
    4242    {
    43         if (!BS3_DATA_NM(g_fbBs3SubTestReported))
     43        if (!g_fbBs3SubTestReported)
    4444        {
    4545            size_t   cch;
    46             uint16_t cErrors = BS3_DATA_NM(g_cusBs3TestErrors) - BS3_DATA_NM(g_cusBs3SubTestAtErrors);
     46            uint16_t cErrors = g_cusBs3TestErrors - g_cusBs3SubTestAtErrors;
    4747
    4848            /* Tell VMMDev. */
     
    5050
    5151            /* Print result to the console. */
    52             Bs3PrintStr(BS3_DATA_NM(g_szBs3SubTest));
     52            Bs3PrintStr(g_szBs3SubTest);
    5353            Bs3PrintChr(':');
    54             cch = Bs3StrLen(BS3_DATA_NM(g_szBs3SubTest));
     54            cch = Bs3StrLen(g_szBs3SubTest);
    5555            do
    5656                Bs3PrintChr(' ');
     
    5858
    5959            if (!cErrors)
    60                 Bs3PrintStr(!BS3_DATA_NM(g_fbBs3SubTestSkipped) ? "PASSED\n" : "SKIPPED\n");
     60                Bs3PrintStr(!g_fbBs3SubTestSkipped ? "PASSED\n" : "SKIPPED\n");
    6161            else
    6262            {
    63                 BS3_DATA_NM(g_cusBs3SubTestsFailed)++;
    64                 Bs3Printf("FAILED (%u errors)\n", BS3_DATA_NM(g_szBs3SubTest), cErrors);
     63                g_cusBs3SubTestsFailed++;
     64                Bs3Printf("FAILED (%u errors)\n", g_szBs3SubTest, cErrors);
    6565            }
    6666        }
    6767
    6868        /* Reset the sub-test. */
    69         BS3_DATA_NM(g_fbBs3SubTestReported) = true;
    70         BS3_DATA_NM(g_fbBs3SubTestSkipped)  = false;
    71         BS3_DATA_NM(g_szBs3SubTest)[0]      = '\0';
     69        g_fbBs3SubTestReported = true;
     70        g_fbBs3SubTestSkipped  = false;
     71        g_szBs3SubTest[0]      = '\0';
    7272    }
    7373}
     
    9090    {
    9191        Bs3PrintStr(BS3_CMN_NM(g_pszBs3Test));
    92         if (BS3_DATA_NM(g_cusBs3TestErrors) == 0)
    93             Bs3Printf(": SUCCESS (%u tests)\n", BS3_DATA_NM(g_cusBs3SubTests));
     92        if (g_cusBs3TestErrors == 0)
     93            Bs3Printf(": SUCCESS (%u tests)\n", g_cusBs3SubTests);
    9494        else
    9595            Bs3Printf(": FAILURE - %u (%u of %u tests)\n",
    96                       BS3_DATA_NM(g_cusBs3TestErrors), BS3_DATA_NM(g_cusBs3SubTestsFailed), BS3_DATA_NM(g_cusBs3SubTests));
     96                      g_cusBs3TestErrors, g_cusBs3SubTestsFailed, g_cusBs3SubTests);
    9797    }
    9898
     
    100100     * Tell VMMDev.
    101101     */
    102     bs3TestSendCmdWithU32(VMMDEV_TESTING_CMD_TERM, BS3_DATA_NM(g_cusBs3TestErrors));
     102    bs3TestSendCmdWithU32(VMMDEV_TESTING_CMD_TERM, g_cusBs3TestErrors);
    103103
    104104    BS3_CMN_NM(g_pszBs3Test) = NULL;
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