Changeset 32611 in vbox
- Timestamp:
- Sep 17, 2010 3:15:22 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 66015
- Location:
- trunk/src/VBox/Runtime/testcase
- Files:
-
- 1 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/Makefile.kmk
r31787 r32611 144 144 tstRTR0MemUserKernelDriver \ 145 145 tstRTR0SemMutexDriver \ 146 tstRTR0TimerDriver \ 146 147 tstR0ThreadPreemptionDriver \ 147 148 tstTSC … … 150 151 tstRTR0MemUserKernel \ 151 152 tstRTR0SemMutex \ 153 tstRTR0Timer \ 152 154 tstR0ThreadPreemption 153 155 ifdef VBOX_WITH_RAW_MODE … … 346 348 tstRTMemPool_SOURCES = tstRTMemPool.cpp 347 349 348 tstRTR0MemUserKernel_TEMPLATE = VBoxR0349 tstRTR0MemUserKernel_INST = $(INST_TESTCASE)350 tstRTR0MemUserKernel_DEFS = IN_RT_R0351 tstRTR0MemUserKernel_SYSSUFF = .r0352 tstRTR0MemUserKernel_SOURCES = tstRTR0MemUserKernel.cpp353 tstRTR0MemUserKernel_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)354 if1of ($(VBOX_LDR_FMT), pe lx)355 tstRTR0MemUserKernel_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)356 endif357 358 tstRTR0MemUserKernelDriver_SOURCES = tstRTR0MemUserKernelDriver.cpp359 360 350 tstMove_SOURCES = tstMove.cpp 361 351 … … 391 381 tstRand_SOURCES = tstRand.cpp 392 382 383 tstRTFsQueries_SOURCES = tstRTFsQueries.cpp 384 385 tstRTProcCreateEx_TEMPLATE = VBOXR3TSTEXE 386 tstRTProcCreateEx_SOURCES = tstRTProcCreateEx.cpp 387 388 tstRTProcWait_SOURCES = tstRTProcWait.cpp 389 390 tstRTProcIsRunningByName_SOURCES = tstRTProcIsRunningByName.cpp 391 392 tstRTS3_SOURCES = tstRTS3.cpp 393 394 tstSemMutex_SOURCES = tstSemMutex.cpp 395 396 tstSemEvent_SOURCES = tstSemEvent.cpp 397 398 tstRTSemRW_TEMPLATE = VBOXR3TSTEXE 399 tstRTSemRW_SOURCES = tstRTSemRW.cpp 400 401 tstSemPingPong_SOURCES = tstSemPingPong.cpp 402 403 tstSems_SOURCES = tstSems.cpp 404 405 tstRTSemXRoads_TEMPLATE = VBOXR3TSTEXE 406 tstRTSemXRoads_SOURCES = tstRTSemXRoads.cpp 407 408 tstRTSort_TEMPLATE = VBOXR3TSTEXE 409 tstRTSort_SOURCES = tstRTSort.cpp 410 411 tstRTStrAlloc_TEMPLATE = VBOXR3TSTEXE 412 tstRTStrAlloc_SOURCES = tstRTStrAlloc.cpp 413 414 tstRTStrCache_TEMPLATE = VBOXR3TSTEXE 415 tstRTStrCache_SOURCES = tstRTStrCache.cpp 416 417 tstRTStrFormat_SOURCES = tstRTStrFormat.cpp 418 419 tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp 420 421 tstStrToNum_SOURCES = tstStrToNum.cpp 422 423 tstRTStrVersion_TEMPLATE = VBOXR3TSTEXE 424 tstRTStrVersion_SOURCES = tstRTStrVersion.cpp 425 426 tstRTSystemQueryDmi_TEMPLATE = VBOXR3TSTEXE 427 tstRTSystemQueryDmi_SOURCES = tstRTSystemQueryDmi.cpp 428 429 tstRTSystemQueryOsInfo_TEMPLATE = VBOXR3TSTEXE 430 tstRTSystemQueryOsInfo_SOURCES = tstRTSystemQueryOsInfo.cpp 431 432 tstRTTemp_TEMPLATE = VBOXR3TSTEXE 433 tstRTTemp_SOURCES = tstRTTemp.cpp 434 435 tstTermCallbacks_SOURCES = tstTermCallbacks.cpp 436 437 tstThread-1_SOURCES = tstThread-1.cpp 438 439 tstTime_SOURCES = tstTime.cpp 440 441 tstTime-2_SOURCES = tstTime-2.cpp 442 443 tstTime-3_SOURCES = tstTime-3.cpp 444 445 tstTime-4_SOURCES = tstTime-4.cpp 446 447 tstTimer_SOURCES = tstTimer.cpp 448 449 tstTimerLR_SOURCES = tstTimerLR.cpp 450 451 tstRTTimeSpec_TEMPLATE = VBOXR3TSTEXE 452 tstRTTimeSpec_SOURCES = tstRTTimeSpec.cpp 453 454 tstTSC_SOURCES = tstTSC.cpp 455 tstTSC_CXXFLAGS.linux += -O3 456 457 tstRTUuid_TEMPLATE = VBOXR3TSTEXE 458 tstRTUuid_SOURCES = tstRTUuid.cpp 459 460 tstUtf8_SOURCES = tstUtf8.cpp 461 462 tstRTCoreDump_TEMPLACE = VBOXR3TSTEXE 463 tstRTCoreDump_SOURCES = tstRTCoreDump.cpp 464 465 466 # 467 # Ring-0 testcases. 468 # 469 470 ## @todo create a template for compiling the ring-0 part. 471 tstRTR0MemUserKernel_TEMPLATE = VBoxR0 472 tstRTR0MemUserKernel_INST = $(INST_TESTCASE) 473 tstRTR0MemUserKernel_DEFS = IN_RT_R0 474 tstRTR0MemUserKernel_SYSSUFF = .r0 475 tstRTR0MemUserKernel_SOURCES = tstRTR0MemUserKernel.cpp 476 tstRTR0MemUserKernel_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) 477 if1of ($(VBOX_LDR_FMT), pe lx) 478 tstRTR0MemUserKernel_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) 479 endif 480 tstRTR0MemUserKernelDriver_TEMPLATE = VBOXR3TSTEXE 481 tstRTR0MemUserKernelDriver_SOURCES = tstRTR0MemUserKernelDriver.cpp 482 483 484 tstRTR0SemMutex_TEMPLATE = VBoxR0 485 tstRTR0SemMutex_INST = $(INST_TESTCASE) 486 tstRTR0SemMutex_DEFS = IN_RT_R0 487 tstRTR0SemMutex_SYSSUFF = .r0 488 tstRTR0SemMutex_SOURCES = tstRTR0SemMutex.cpp 489 tstRTR0SemMutex_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) 490 if1of ($(VBOX_LDR_FMT), pe lx) 491 tstRTR0SemMutex_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) 492 endif 493 tstRTR0SemMutexDriver_TEMPLATE = VBOXR3TSTEXE 494 tstRTR0SemMutexDriver_SOURCES = tstRTR0SemMutexDriver.cpp 495 496 497 tstRTR0Timer_TEMPLATE = VBoxR0 498 tstRTR0Timer_INST = $(INST_TESTCASE) 499 tstRTR0Timer_DEFS = IN_RT_R0 500 tstRTR0Timer_SYSSUFF = .r0 501 tstRTR0Timer_SOURCES = tstRTR0Timer.cpp 502 tstRTR0Timer_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) 503 if1of ($(VBOX_LDR_FMT), pe lx) 504 tstRTR0Timer_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) 505 endif 506 tstRTR0TimerDriver_TEMPLATE = VBOXR3TSTEXE 507 tstRTR0TimerDriver_SOURCES = tstRTR0TimerDriver.cpp 508 509 393 510 tstR0ThreadPreemption_TEMPLATE = VBoxR0 394 511 tstR0ThreadPreemption_INST = $(INST_TESTCASE) … … 400 517 tstR0ThreadPreemption_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) 401 518 endif 402 403 519 tstR0ThreadPreemptionDriver_TEMPLATE = VBOXR3TSTEXE 404 520 tstR0ThreadPreemptionDriver_SOURCES = tstR0ThreadPreemptionDriver.cpp 405 521 406 tstRTR0SemMutex_TEMPLATE = VBoxR0 407 tstRTR0SemMutex_INST = $(INST_TESTCASE) 408 tstRTR0SemMutex_DEFS = IN_RT_R0 409 tstRTR0SemMutex_SYSSUFF = .r0 410 tstRTR0SemMutex_SOURCES = tstRTR0SemMutex.cpp 411 tstRTR0SemMutex_LIBS = $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB) 412 if1of ($(VBOX_LDR_FMT), pe lx) 413 tstRTR0SemMutex_LIBS += $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB) 414 endif 415 416 tstRTR0SemMutexDriver_TEMPLATE = VBOXR3TSTEXE 417 tstRTR0SemMutexDriver_SOURCES = tstRTR0SemMutexDriver.cpp 418 419 tstRTFsQueries_SOURCES = tstRTFsQueries.cpp 420 421 tstRTProcCreateEx_TEMPLATE = VBOXR3TSTEXE 422 tstRTProcCreateEx_SOURCES = tstRTProcCreateEx.cpp 423 424 tstRTProcWait_SOURCES = tstRTProcWait.cpp 425 426 tstRTProcIsRunningByName_SOURCES = tstRTProcIsRunningByName.cpp 427 428 tstRTS3_SOURCES = tstRTS3.cpp 429 430 tstSemMutex_SOURCES = tstSemMutex.cpp 431 432 tstSemEvent_SOURCES = tstSemEvent.cpp 433 434 tstRTSemRW_TEMPLATE = VBOXR3TSTEXE 435 tstRTSemRW_SOURCES = tstRTSemRW.cpp 436 437 tstSemPingPong_SOURCES = tstSemPingPong.cpp 438 439 tstSems_SOURCES = tstSems.cpp 440 441 tstRTSemXRoads_TEMPLATE = VBOXR3TSTEXE 442 tstRTSemXRoads_SOURCES = tstRTSemXRoads.cpp 443 444 tstRTSort_TEMPLATE = VBOXR3TSTEXE 445 tstRTSort_SOURCES = tstRTSort.cpp 446 447 tstRTStrAlloc_TEMPLATE = VBOXR3TSTEXE 448 tstRTStrAlloc_SOURCES = tstRTStrAlloc.cpp 449 450 tstRTStrCache_TEMPLATE = VBOXR3TSTEXE 451 tstRTStrCache_SOURCES = tstRTStrCache.cpp 452 453 tstRTStrFormat_SOURCES = tstRTStrFormat.cpp 454 455 tstStrSimplePattern_SOURCES = tstStrSimplePattern.cpp 456 457 tstStrToNum_SOURCES = tstStrToNum.cpp 458 459 tstRTStrVersion_TEMPLATE = VBOXR3TSTEXE 460 tstRTStrVersion_SOURCES = tstRTStrVersion.cpp 461 462 tstRTSystemQueryDmi_TEMPLATE = VBOXR3TSTEXE 463 tstRTSystemQueryDmi_SOURCES = tstRTSystemQueryDmi.cpp 464 465 tstRTSystemQueryOsInfo_TEMPLATE = VBOXR3TSTEXE 466 tstRTSystemQueryOsInfo_SOURCES = tstRTSystemQueryOsInfo.cpp 467 468 tstRTTemp_TEMPLATE = VBOXR3TSTEXE 469 tstRTTemp_SOURCES = tstRTTemp.cpp 470 471 tstTermCallbacks_SOURCES = tstTermCallbacks.cpp 472 473 tstThread-1_SOURCES = tstThread-1.cpp 474 475 tstTime_SOURCES = tstTime.cpp 476 477 tstTime-2_SOURCES = tstTime-2.cpp 478 479 tstTime-3_SOURCES = tstTime-3.cpp 480 481 tstTime-4_SOURCES = tstTime-4.cpp 482 483 tstTimer_SOURCES = tstTimer.cpp 484 485 tstTimerLR_SOURCES = tstTimerLR.cpp 486 487 tstRTTimeSpec_TEMPLATE = VBOXR3TSTEXE 488 tstRTTimeSpec_SOURCES = tstRTTimeSpec.cpp 489 490 tstTSC_SOURCES = tstTSC.cpp 491 tstTSC_CXXFLAGS.linux += -O3 492 493 tstRTUuid_TEMPLATE = VBOXR3TSTEXE 494 tstRTUuid_SOURCES = tstRTUuid.cpp 495 496 tstUtf8_SOURCES = tstUtf8.cpp 497 498 tstRTCoreDump_TEMPLACE = VBOXR3TSTEXE 499 tstRTCoreDump_SOURCES = tstRTCoreDump.cpp 500 501 # 502 # odds and ends 522 523 # 524 # Odds and ends. 503 525 # 504 526 -
trunk/src/VBox/Runtime/testcase/tstRTR0Timer.cpp
r32582 r32611 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT R0 Testcase - T hread Preemption.3 * IPRT R0 Testcase - Timers. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2009 Oracle Corporation7 * Copyright (C) 2009-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 35 35 #include <iprt/string.h> 36 36 #include <VBox/sup.h> 37 #include "tstRTR0 MemUserKernel.h"37 #include "tstRTR0Timer.h" 38 38 39 39 … … 47 47 * @param pReqHdr The request header. Input / Output. Optional. 48 48 */ 49 DECLEXPORT(int) TSTRTR0 MemUserKernelSrvReqHandler(PSUPDRVSESSION pSession, uint32_t uOperation,50 49 DECLEXPORT(int) TSTRTR0TimerSrvReqHandler(PSUPDRVSESSION pSession, uint32_t uOperation, 50 uint64_t u64Arg, PSUPR0SERVICEREQHDR pReqHdr) 51 51 { 52 52 if (!VALID_PTR(pReqHdr)) … … 58 58 *pszErr = '\0'; 59 59 60 /* 61 * R3Ptr is valid and good for up to a page. The page before 62 * and after are both invalid. Or, it's a kernel page. 63 */ 64 RTR3PTR R3Ptr = (RTR3PTR)u64Arg; 65 if (R3Ptr != u64Arg) 60 if (u64Arg) 66 61 return VERR_INVALID_PARAMETER; 67 68 /*69 * Allocate a kernel buffer.70 */71 uint8_t *pbKrnlBuf = (uint8_t *)RTMemAlloc(PAGE_SIZE * 2);72 if (!pbKrnlBuf)73 {74 RTStrPrintf(pszErr, cchErr, "!no memory for kernel buffers");75 return VINF_SUCCESS;76 }77 62 78 63 /* … … 81 66 switch (uOperation) 82 67 { 83 case TSTRTR0 MEMUSERKERNEL_SANITY_OK:68 case TSTRTR0TIMER_SANITY_OK: 84 69 break; 85 70 86 case TSTRTR0 MEMUSERKERNEL_SANITY_FAILURE:71 case TSTRTR0TIMER_SANITY_FAILURE: 87 72 RTStrPrintf(pszErr, cchErr, "!42failure42%1024s", ""); 88 73 break; 89 74 90 case TSTRTR0MEMUSERKERNEL_BASIC: 75 #if 0 76 case TSTRTR0TIMER_BASIC: 91 77 { 92 78 int rc = RTR0MemUserCopyFrom(pbKrnlBuf, R3Ptr, PAGE_SIZE); … … 132 118 } 133 119 134 #define TEST_OFF_SIZE(off, size, rcExpect) \ 135 if (1) \ 136 { \ 137 int rc = RTR0MemUserCopyFrom(pbKrnlBuf, R3Ptr + (off), (size)); \ 138 if (rc != (rcExpect)) \ 139 { \ 140 RTStrPrintf(pszErr, cchErr, "!RTR0MemUserCopyFrom(, +%#x, %#x) -> %Rrc, expected %Rrc", \ 141 (off), (size), rc, (rcExpect)); \ 142 break; \ 143 } \ 144 rc = RTR0MemUserCopyTo(R3Ptr + (off), pbKrnlBuf, (size)); \ 145 if (rc != (rcExpect)) \ 146 { \ 147 RTStrPrintf(pszErr, cchErr, "!RTR0MemUserCopyTo(+%#x,, %#x) -> %Rrc, expected %Rrc", \ 148 (off), (size), rc, (rcExpect)); \ 149 break; \ 150 } \ 151 } else do {} while (0) 152 153 case TSTRTR0MEMUSERKERNEL_GOOD: 120 case TSTRTR0TIMER_GOOD: 154 121 { 155 122 for (unsigned off = 0; off < 16 && !*pszErr; off++) … … 159 126 } 160 127 161 case TSTRTR0 MEMUSERKERNEL_BAD:128 case TSTRTR0TIMER_BAD: 162 129 { 163 130 for (unsigned off = 0; off < 16 && !*pszErr; off++) … … 167 134 } 168 135 169 case TSTRTR0 MEMUSERKERNEL_INVALID_ADDRESS:136 case TSTRTR0TIMER_INVALID_ADDRESS: 170 137 { 171 138 if ( !RTR0MemUserIsValidAddr(R3Ptr) … … 180 147 break; 181 148 } 149 #endif 182 150 183 151 default: … … 187 155 188 156 /* The error indicator is the '!' in the message buffer. */ 189 RTMemFree(pbKrnlBuf);190 157 return VINF_SUCCESS; 191 158 } -
trunk/src/VBox/Runtime/testcase/tstRTR0Timer.h
r32582 r32611 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT R0 Testcase - User & Kernel Memory, common header.3 * IPRT R0 Testcase - Timers, common header. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2009 Oracle Corporation7 * Copyright (C) 2009-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 27 27 #ifdef IN_RING0 28 28 RT_C_DECLS_BEGIN 29 DECLEXPORT(int) TSTRTR0 MemUserKernelSrvReqHandler(PSUPDRVSESSION pSession, uint32_t uOperation,30 29 DECLEXPORT(int) TSTRTR0TimerSrvReqHandler(PSUPDRVSESSION pSession, uint32_t uOperation, 30 uint64_t u64Arg, PSUPR0SERVICEREQHDR pReqHdr); 31 31 RT_C_DECLS_END 32 32 #endif 33 33 34 typedef enum TSTRTR0 MEMUSERKERNEL34 typedef enum TSTRTR0TIMER 35 35 { 36 TSTRTR0 MEMUSERKERNEL_SANITY_OK = 1,37 TSTRTR0 MEMUSERKERNEL_SANITY_FAILURE,38 TSTRTR0 MEMUSERKERNEL_BASIC,39 TSTRTR0 MEMUSERKERNEL_GOOD,40 TSTRTR0 MEMUSERKERNEL_BAD,41 TSTRTR0 MEMUSERKERNEL_INVALID_ADDRESS42 } TSTRTR0 MEMUSERKERNEL;36 TSTRTR0TIMER_SANITY_OK = 1, 37 TSTRTR0TIMER_SANITY_FAILURE, 38 TSTRTR0TIMER_BASIC, 39 TSTRTR0TIMER_GOOD, 40 TSTRTR0TIMER_BAD, 41 TSTRTR0TIMER_INVALID_ADDRESS 42 } TSTRTR0TIMER; 43 43 -
trunk/src/VBox/Runtime/testcase/tstRTR0TimerDriver.cpp
r32582 r32611 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT R0 Testcase - T hread Preemption, driver program.3 * IPRT R0 Testcase - Timers, driver program. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2009 Oracle Corporation7 * Copyright (C) 2009-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 39 39 #ifdef VBOX 40 40 # include <VBox/sup.h> 41 # include "tstRTR0 MemUserKernel.h"41 # include "tstRTR0Timer.h" 42 42 #endif 43 43 … … 46 46 { 47 47 #ifndef VBOX 48 RTPrintf("tst Sup: SKIPPED\n");49 return 0;48 RTPrintf("tstRTR0Timer: SKIPPED\n"); 49 return RTEXITCODE_SKIPPED; 50 50 #else 51 51 /* … … 53 53 */ 54 54 RTTEST hTest; 55 int rc = RTTestInitAndCreate("tstRTR0 MemUserKernel", &hTest);55 int rc = RTTestInitAndCreate("tstRTR0Timer", &hTest); 56 56 if (rc) 57 57 return rc; 58 58 RTTestBanner(hTest); 59 59 60 uint8_t *pbPage = (uint8_t *)RTTestGuardedAllocTail(hTest, PAGE_SIZE);61 if (!pbPage)62 {63 RTTestFailed(hTest, "RTTestGuardedAllocTail failed with rc=%Rrc\n", rc);64 return RTTestSummaryAndDestroy(hTest);65 }66 67 60 PSUPDRVSESSION pSession; 68 61 rc = SUPR3Init(&pSession); … … 76 69 rc = RTPathExecDir(szPath, sizeof(szPath)); 77 70 if (RT_SUCCESS(rc)) 78 rc = RTPathAppend(szPath, sizeof(szPath), "tstRTR0 MemUserKernel.r0");71 rc = RTPathAppend(szPath, sizeof(szPath), "tstRTR0Timer.r0"); 79 72 if (RT_FAILURE(rc)) 80 73 { … … 84 77 85 78 void *pvImageBase; 86 rc = SUPR3LoadServiceModule(szPath, "tstRTR0MemUserKernel", 87 "TSTRTR0MemUserKernelSrvReqHandler", 88 &pvImageBase); 79 rc = SUPR3LoadServiceModule(szPath, "tstRTR0Timer", "TSTRTR0TimerSrvReqHandler", &pvImageBase); 89 80 if (RT_FAILURE(rc)) 90 81 { … … 107 98 Req.Hdr.cbReq = sizeof(Req); 108 99 Req.szMsg[0] = '\0'; 109 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0 MemUserKernel", sizeof("tstRTR0MemUserKernel") - 1,110 TSTRTR0 MEMUSERKERNEL_SANITY_OK, 0, &Req.Hdr), VINF_SUCCESS);100 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0Timer", sizeof("tstRTR0Timer") - 1, 101 TSTRTR0TIMER_SANITY_OK, 0, &Req.Hdr), VINF_SUCCESS); 111 102 if (RT_FAILURE(rc)) 112 103 return RTTestSummaryAndDestroy(hTest); … … 118 109 Req.Hdr.cbReq = sizeof(Req); 119 110 Req.szMsg[0] = '\0'; 120 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0 MemUserKernel", sizeof("tstRTR0MemUserKernel") - 1,121 TSTRTR0 MEMUSERKERNEL_SANITY_FAILURE, 0, &Req.Hdr), VINF_SUCCESS);111 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0Timer", sizeof("tstRTR0Timer") - 1, 112 TSTRTR0TIMER_SANITY_FAILURE, 0, &Req.Hdr), VINF_SUCCESS); 122 113 if (RT_FAILURE(rc)) 123 114 return RTTestSummaryAndDestroy(hTest); … … 126 117 return RTTestSummaryAndDestroy(hTest); 127 118 119 #if 0 128 120 /* 129 121 * Basic tests, bail out on failure. … … 133 125 Req.Hdr.cbReq = sizeof(Req); 134 126 Req.szMsg[0] = '\0'; 135 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0 MemUserKernel", sizeof("tstRTR0MemUserKernel") - 1,136 TSTRTR0 MEMUSERKERNEL_BASIC, (uintptr_t)pbPage, &Req.Hdr), VINF_SUCCESS);127 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0Timer", sizeof("tstRTR0Timer") - 1, 128 TSTRTR0TIMER_BASIC, (uintptr_t)pbPage, &Req.Hdr), VINF_SUCCESS); 137 129 if (RT_FAILURE(rc)) 138 130 return RTTestSummaryAndDestroy(hTest); … … 152 144 Req.Hdr.cbReq = sizeof(Req); 153 145 Req.szMsg[0] = '\0'; 154 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0 MemUserKernel", sizeof("tstRTR0MemUserKernel") - 1,155 TSTRTR0 MEMUSERKERNEL_GOOD, (uintptr_t)pbPage, &Req.Hdr), VINF_SUCCESS);146 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0Timer", sizeof("tstRTR0Timer") - 1, 147 TSTRTR0TIMER_GOOD, (uintptr_t)pbPage, &Req.Hdr), VINF_SUCCESS); 156 148 if (RT_FAILURE(rc)) 157 149 return RTTestSummaryAndDestroy(hTest); … … 171 163 Req.Hdr.cbReq = sizeof(Req); 172 164 Req.szMsg[0] = '\0'; 173 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0 MemUserKernel", sizeof("tstRTR0MemUserKernel") - 1,174 TSTRTR0 MEMUSERKERNEL_BAD, (uintptr_t)pbPage + PAGE_SIZE, &Req.Hdr), VINF_SUCCESS);165 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0Timer", sizeof("tstRTR0Timer") - 1, 166 TSTRTR0TIMER_BAD, (uintptr_t)pbPage + PAGE_SIZE, &Req.Hdr), VINF_SUCCESS); 175 167 if (RT_FAILURE(rc)) 176 168 return RTTestSummaryAndDestroy(hTest); … … 190 182 Req.Hdr.cbReq = sizeof(Req); 191 183 Req.szMsg[0] = '\0'; 192 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0MemUserKernel", sizeof("tstRTR0MemUserKernel") - 1, 193 TSTRTR0MEMUSERKERNEL_INVALID_ADDRESS, (uintptr_t)pvImageBase, &Req.Hdr), VINF_SUCCESS); 194 if (RT_FAILURE(rc)) 195 return RTTestSummaryAndDestroy(hTest); 196 if (Req.szMsg[0] == '!') 197 { 198 RTTestIFailed("%s", &Req.szMsg[1]); 199 return RTTestSummaryAndDestroy(hTest); 200 } 201 if (Req.szMsg[0]) 202 RTTestIPrintf(RTTESTLVL_ALWAYS, "%s", Req.szMsg); 184 RTTESTI_CHECK_RC(rc = SUPR3CallR0Service("tstRTR0Timer", sizeof("tstRTR0Timer") - 1, 185 TSTRTR0TIMER_INVALID_ADDRESS, (uintptr_t)pvImageBase, &Req.Hdr), VINF_SUCCESS); 186 if (RT_FAILURE(rc)) 187 return RTTestSummaryAndDestroy(hTest); 188 if (Req.szMsg[0] == '!') 189 { 190 RTTestIFailed("%s", &Req.szMsg[1]); 191 return RTTestSummaryAndDestroy(hTest); 192 } 193 if (Req.szMsg[0]) 194 RTTestIPrintf(RTTESTLVL_ALWAYS, "%s", Req.szMsg); 195 # endif 203 196 204 197 /*
Note:
See TracChangeset
for help on using the changeset viewer.