tstVMMR0CallHost-1.cpp revision cee5f4e7e4f238fc5b3436abdf3c915275017f6e
/* $Id$ */
/** @file
* Testcase for the VMMR0JMPBUF operations.
*/
/*
* Copyright (C) 2006 InnoTek Systemberatung GmbH
*
* 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 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.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define IN_VMM_R0
#define IN_RING0 /* pretent we're in Ring-0 to get the prototypes. */
#include "VMMInternal.h"
/*******************************************************************************
* Global Variables *
*******************************************************************************/
/** The jump buffer. */
static VMMR0JMPBUF g_Jmp;
/** The saved stack. */
{
if ((i % 7) == 0)
{
if (!rc)
return i + 10000;
return -1;
}
return i;
}
{
{
return 1;
}
return 0;
}
{
{
{
return 1;
}
}
return 0;
}
int main()
{
/*
* Init.
*/
RTR3Init(false);
RTPrintf("tstVMMR0CallHost-1: Testing...\n");
/*
* Try about 1000 long jumps with increasing stack size..
*/
if (!rc)
if (!rc)
RTPrintf("tstVMMR0CallHost-1: SUCCESS\n");
else
RTPrintf("tstVMMR0CallHost-1: FAILED\n");
return !!rc;
}