summaryrefslogtreecommitdiff
path: root/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp')
-rw-r--r--src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp b/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp
index 92cb58cc..16616474 100644
--- a/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp
+++ b/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -115,7 +115,7 @@ void tst(int iFrom, int iTo, int iInc)
for (int i = iFrom, iItr = 0; i != iTo; i += iInc, iItr++)
{
- int rc = vmmR0CallRing3SetJmp(&g_Jmp, (PFNVMMR0SETJMP)tst2, (PVM)i, 0);
+ int rc = vmmR0CallRing3SetJmp(&g_Jmp, (PFNVMMR0SETJMP)tst2, (PVM)(uintptr_t)i, 0);
RTTESTI_CHECK_MSG_RETV(rc == 0 || rc == 42, ("i=%d rc=%d setjmp; cbFoo=%#x cbFooUsed=%#x\n", i, rc, g_cbFoo, g_cbFooUsed));
#ifdef VMM_R0_SWITCH_STACK
@@ -145,13 +145,9 @@ int main()
* Init.
*/
RTTEST hTest;
- int rc;
- if ( RT_FAILURE(rc = RTR3InitExeNoArguments(0))
- || RT_FAILURE(rc = RTTestCreate("tstVMMR0CallHost-1", &hTest)))
- {
- RTStrmPrintf(g_pStdErr, "tstVMMR0CallHost-1: Fatal error during init: %Rrc\n", rc);
- return 1;
- }
+ RTEXITCODE rcExit = RTTestInitAndCreate("tstVMMR0CallHost-1", &hTest);
+ if (rcExit != RTEXITCODE_SUCCESS)
+ return rcExit;
RTTestBanner(hTest);
g_Jmp.pvSavedStack = (RTR0PTR)RTTestGuardedAllocTail(hTest, VMM_STACK_SIZE);