tstShflSizes.cpp revision 30e6672eae531c74fca0d2e7c3cdb11e5ce03f48
/** @file
*
* Testcase for shared folder structure sizes.
* Run this on Linux and Windows, then compare.
*/
/*
* Copyright (C) 2006-2007 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
do { \
if (fPrintChecks) \
else if ((size) != sizeof(t)) \
{ \
cErrors++; \
} \
else if (!fQuiet)\
RTPrintf("%30s: %d\n", #t, (int)sizeof(t)); \
} while (0)
{
unsigned cErrors = 0;
/*
* Prints the code below if any argument was giving.
*/
RTPrintf("tstShflSizes: TESTING\n");
/*
* The checks.
*/
#ifdef VBOX_WITH_64_BITS_GUESTS
/* The size of the guest structures depends on the current architecture bit count (ARCH_BITS)
* because the HGCMFunctionParameter structure differs in 32 and 64 bit guests.
* The host VMMDev device takes care about this.
*
* Therefore this testcase verifies whether structure sizes are correct for the currebt ARCH_BITS.
*/
# if ARCH_BITS == 64
# else
# error "Unsupported ARCH_BITS"
# endif /* ARCH_BITS */
#else
#endif /* VBOX_WITH_64_BITS_GUESTS */
/*
* The summary.
*/
if (!cErrors)
RTPrintf("tstShflSizes: SUCCESS\n");
else
return !!cErrors;
}