Changeset 90197 in vbox
- Timestamp:
- Jul 14, 2021 10:17:51 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145718
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp
r86403 r90197 54 54 /** Number of bytes used last time we called foo(). */ 55 55 static intptr_t volatile g_cbFooUsed; 56 /** Set if we're in a long jump. */ 57 static bool g_fInLongJmp; 56 58 57 59 … … 80 82 { 81 83 g_cJmps++; 84 g_fInLongJmp = true; 82 85 int rc = vmmR0CallRing3LongJmp(&g_Jmp, 42); 86 g_fInLongJmp = false; 83 87 if (!rc) 84 88 return i + 10000; … … 130 134 g_cJmps = 0; 131 135 g_cbFooUsed = 0; 132 136 g_fInLongJmp = false; 137 138 int iOrg = iFrom; 133 139 for (int i = iFrom, iItr = 0; i != iTo; i += iInc, iItr++) 134 140 { 135 int rc = stackRandom(&g_Jmp, (PFNVMMR0SETJMP)(uintptr_t)tst2, (PVM)(uintptr_t)i, 0); 136 RTTESTI_CHECK_MSG_RETV(rc == 0 || rc == 42, ("i=%d rc=%d setjmp; cbFoo=%#x cbFooUsed=%#x\n", i, rc, g_cbFoo, g_cbFooUsed)); 141 if (!g_fInLongJmp) 142 iOrg = i; 143 int rc = stackRandom(&g_Jmp, (PFNVMMR0SETJMP)(uintptr_t)tst2, (PVM)(uintptr_t)iOrg, 0); 144 RTTESTI_CHECK_MSG_RETV(rc == (g_fInLongJmp ? 42 : 0), 145 ("i=%d iOrg=%d rc=%d setjmp; cbFoo=%#x cbFooUsed=%#x fInLongJmp=%d\n", 146 i, iOrg, rc, g_cbFoo, g_cbFooUsed, g_fInLongJmp)); 137 147 138 148 #ifdef VMM_R0_SWITCH_STACK … … 168 178 */ 169 179 RTTEST hTest; 180 #ifdef VMM_R0_NO_SWITCH_STACK 170 181 RTEXITCODE rcExit = RTTestInitAndCreate("tstVMMR0CallHost-1", &hTest); 182 #else 183 RTEXITCODE rcExit = RTTestInitAndCreate("tstVMMR0CallHost-2", &hTest); 184 #endif 171 185 if (rcExit != RTEXITCODE_SUCCESS) 172 186 return rcExit;
Note:
See TracChangeset
for help on using the changeset viewer.