VirtualBox

Changeset 52378 in vbox for trunk/src/VBox/Storage/testcase


Ignore:
Timestamp:
Aug 14, 2014 11:44:04 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95519
Message:

Storage/tstVDIo: Don't run builtin tests if there is not enough free RAM available

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/testcase/tstVDIo.cpp

    r52371 r52378  
    3434#include <iprt/critsect.h>
    3535#include <iprt/test.h>
     36#include <iprt/system.h>
    3637
    3738#include "VDMemDisk.h"
     
    27982799static void tstVDIoRunBuiltinTests(void)
    27992800{
     2801    /*
     2802     * We need quite a bit of RAM for the builtin tests. Skip it if there
     2803     * is not enough free RAM available.
     2804     */
     2805    uint64_t cbFree = 0;
     2806    int rc = RTSystemQueryAvailableRam(&cbFree);
     2807    if (   RT_FAILURE(rc)
     2808        || cbFree < (UINT64_C(6) * _1G))
     2809    {
     2810        RTStrmPrintf(g_pStdErr, "tstVDIo: fatal error: Failed to query available RAM or not enough available, skipping (rc=%Rrc cbFree=%llu)\n",
     2811                     rc, cbFree);
     2812        return;
     2813    }
     2814
    28002815    for (unsigned i = 0; i < g_cVDIoTests; i++)
    28012816    {
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