Changeset 62673 in vbox
- Timestamp:
- Jul 29, 2016 11:04:35 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 109246
- Location:
- trunk/src/VBox/ValidationKit/utils
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/TestExecServ/TestExecService.cpp
r62484 r62673 2491 2491 { 2492 2492 int rc2; 2493 RT_NOREF_PV(fFlags); 2493 2494 2494 2495 /* … … 3262 3263 bool fDaemonize = true; 3263 3264 bool fDaemonized = false; 3264 bool fTransportFixed = false;3265 3265 const char *pszUpgrading = NULL; 3266 3266 -
trunk/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceTcp.cpp
r62484 r62673 126 126 * @returns NIL_RTSOCKET if consumed, other wise hTcpClient. 127 127 * @param hTcpClient The client socket. 128 * @param fFromServer Set if server type connection. 129 */ 130 static RTSOCKET txsTcpSetClient(RTSOCKET hTcpClient, bool fFromServer) 128 */ 129 static RTSOCKET txsTcpSetClient(RTSOCKET hTcpClient) 131 130 { 132 131 RTCritSectEnter(&g_TcpCritSect); … … 159 158 if (RT_SUCCESS(rc)) 160 159 { 161 hTcpClient = txsTcpSetClient(hTcpClient , true /*fFromServer*/);160 hTcpClient = txsTcpSetClient(hTcpClient); 162 161 RTTcpServerDisconnectClient2(hTcpClient); 163 162 } 164 163 164 RT_NOREF2(hSelf, pvUser); 165 165 return rc; 166 166 } … … 192 192 static DECLCALLBACK(int) txsTcpClientConnectThread(RTTHREAD hSelf, void *pvUser) 193 193 { 194 RT_NOREF1(pvUser); 195 194 196 for (;;) 195 197 { … … 209 211 if (RT_SUCCESS(rc)) 210 212 { 211 hTcpClient = txsTcpSetClient(hTcpClient , true /*fFromServer*/);213 hTcpClient = txsTcpSetClient(hTcpClient); 212 214 RTTcpClientCloseEx(hTcpClient, true /* fGracefulShutdown*/); 213 215 break; -
trunk/src/VBox/ValidationKit/utils/cpu/cidet-app.cpp
r62484 r62673 43 43 44 44 #ifdef RT_OS_WINDOWS 45 # include < Windows.h>45 # include <iprt/win/windows.h> 46 46 #else 47 47 # define USE_SIGNALS … … 566 566 uint32_t fFlags) 567 567 { 568 RT_NOREF_PV(pThis); 568 569 static uint8_t const s_afBufProtToDefaultMemProt[] = 569 570 { … … 673 674 static bool CidetAppArmBuf(PCIDETAPP pThis, PCIDETAPPBUF pAppBuf) 674 675 { 676 RT_NOREF_PV(pThis); 675 677 uint8_t *pbUsingBuf = (pAppBuf->fUsingNormal ? pAppBuf->pbNormal : pAppBuf->pbLow); 676 678 if (pAppBuf->fLastPageProt == pAppBuf->fDefaultProt) … … 693 695 static bool CidetAppDearmBuf(PCIDETAPP pThis, PCIDETAPPBUF pAppBuf) 694 696 { 697 RT_NOREF_PV(pThis); 695 698 uint8_t *pbUsingBuf = (pAppBuf->fUsingNormal ? pAppBuf->pbNormal : pAppBuf->pbLow); 696 699 int rc = RTMemProtect(pbUsingBuf, pAppBuf->cb, pAppBuf->fDefaultProt | RTMEM_PROT_READ | RTMEM_PROT_WRITE); … … 1106 1109 static DECLCALLBACK(void) CidetAppCbFailureV(PCIDETCORE pThis, const char *pszMsg, va_list va) 1107 1110 { 1111 RT_NOREF_PV(pThis); 1108 1112 RTTestIFailedV(pszMsg, va); 1109 1113 } -
trunk/src/VBox/ValidationKit/utils/cpu/cidet-core.cpp
r62484 r62673 319 319 bool CidetCoreIsEncodingCompatibleWithInstruction(PCIDETCORE pThis) 320 320 { 321 RT_NOREF_PV(pThis); 321 322 return true; 322 323 } … … 727 728 static void cidetCoreSetupFirstBaseEncoding_MrmRmMod_32bit64bit(PCIDETCORE pThis, uint8_t iReg, bool f64Bit) 728 729 { 730 RT_NOREF_PV(f64Bit); 729 731 if (CidetInstrHasMrmRegOperand(pThis->pCurInstr)) 730 732 { … … 1072 1074 static bool cidetCoreSetupNextBaseEncoding_SibScale(PCIDETCORE pThis, uint8_t iReg) 1073 1075 { 1076 RT_NOREF_PV(iReg); 1074 1077 switch ((pThis->bSib >> X86_SIB_SCALE_SHIFT) & X86_SIB_SCALE_SMASK) 1075 1078 { … … 1320 1323 bool CidetCoreSetupNextMemoryOperandConfig(PCIDETCORE pThis) 1321 1324 { 1325 RT_NOREF_PV(pThis); 1322 1326 return false; 1323 1327 } … … 1372 1376 bool CidetCoreSetupNextCodeBufferConfig(PCIDETCORE pThis) 1373 1377 { 1378 RT_NOREF_PV(pThis); 1374 1379 return false; 1375 1380 } … … 1911 1916 * The opcode. 1912 1917 */ 1913 uint8_t const *pbOpcode = pThis->pCurInstr->abOpcode;1918 //uint8_t const *pbOpcode = pThis->pCurInstr->abOpcode; 1914 1919 switch (pThis->pCurInstr->cbOpcode) 1915 1920 { … … 1932 1937 if (pThis->idxMrmRmOp < RT_ELEMENTS(pThis->aOperands)) 1933 1938 { 1934 uint64_t uDispValue = pThis->aOperands[pThis->idxMrmRmOp].uImmDispValue;1939 //uint64_t uDispValue = pThis->aOperands[pThis->idxMrmRmOp].uImmDispValue; 1935 1940 switch (pThis->aOperands[pThis->idxMrmRmOp].cbMemDisp) 1936 1941 { … … 1958 1963 if ((pThis->aOperands[iOp].fFlags & CIDET_OF_K_MASK) == CIDET_OF_K_IMM) 1959 1964 { 1960 uint64_t uImmValue = pThis->aOperands[iOp].uImmDispValue;1965 //uint64_t uImmValue = pThis->aOperands[iOp].uImmDispValue; 1961 1966 switch (pThis->aOperands[iOp].cb) 1962 1967 { … … 2166 2171 CIDET_DPRINTF(("%04u: %s", iSubTest, szInstr)); 2167 2172 Assert(cbInstr == pThis->cbInstr); 2173 #else 2174 RT_NOREF_PV(iSubTest); 2168 2175 #endif 2169 2176 if (pThis->pfnSetupCodeBuf(pThis, &pThis->CodeBuf, pThis->abInstr)) -
trunk/src/VBox/ValidationKit/utils/nt/ntsetfreq.cpp
r62484 r62673 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #define _WIN32_WINNT 0x0500 32 #include <Windows.h> 31 #include <iprt/nt/nt.h> 33 32 34 33 #include <iprt/initterm.h> … … 39 38 #include <iprt/thread.h> 40 39 #include <iprt/err.h> 41 42 RT_C_DECLS_BEGIN43 /* from sysinternals. */44 NTSYSAPI LONG NTAPI NtSetTimerResolution(IN ULONG DesiredResolution, IN BOOLEAN SetResolution, OUT PULONG CurrentResolution);45 NTSYSAPI LONG NTAPI NtQueryTimerResolution(OUT PULONG MinimumResolution, OUT PULONG MaximumResolution, OUT PULONG CurrentResolution);46 RT_C_DECLS_END47 48 40 49 41 … … 109 101 * Query the current resolution. 110 102 */ 111 ULONG Cur = ~0;112 ULONG Min = ~0;113 ULONG Max = ~0;114 LONG Status;103 ULONG Cur = UINT32_MAX; 104 ULONG Min = UINT32_MAX; 105 ULONG Max = UINT32_MAX; 106 NTSTATUS rcNt = STATUS_SUCCESS; 115 107 if (fVerbose || !u32NewRes) 116 108 { 117 Status= NtQueryTimerResolution(&Min, &Max, &Cur);118 if ( Status >= 0)109 rcNt = NtQueryTimerResolution(&Min, &Max, &Cur); 110 if (NT_SUCCESS(rcNt)) 119 111 RTMsgInfo("cur: %u (%u.%02u Hz) min: %u (%u.%02u Hz) max: %u (%u.%02u Hz)\n", 120 112 Cur, 10000000 / Cur, (10000000 / (Cur * 100)) % 100, … … 122 114 Max, 10000000 / Max, (10000000 / (Max * 100)) % 100); 123 115 else 124 RTMsgError("NTQueryTimerResolution failed with status %#x\n", Status);116 RTMsgError("NTQueryTimerResolution failed with status %#x\n", rcNt); 125 117 } 126 118 127 119 if (u32NewRes) 128 120 { 129 Status= NtSetTimerResolution(u32NewRes, TRUE, &Cur);130 if ( Status < 0)131 RTMsgError("NTSetTimerResolution(%RU32,,) failed with status %#x\n", u32NewRes, Status);121 rcNt = NtSetTimerResolution(u32NewRes, TRUE, &Cur); 122 if (!NT_SUCCESS(rcNt)) 123 RTMsgError("NTSetTimerResolution(%RU32,,) failed with status %#x\n", u32NewRes, rcNt); 132 124 else if (fVerbose) 133 125 { 134 Cur = Min = Max = ~0;135 Status= NtQueryTimerResolution(&Min, &Max, &Cur);136 if ( Status >= 0)126 Cur = Min = Max = UINT32_MAX; 127 rcNt = NtQueryTimerResolution(&Min, &Max, &Cur); 128 if (NT_SUCCESS(rcNt)) 137 129 RTMsgInfo("new: %u (%u.%02u Hz) requested %RU32 (%u.%02u Hz)\n", 138 130 Cur, 10000000 / Cur, (10000000 / (Cur * 100)) % 100, 139 131 u32NewRes, 10000000 / u32NewRes, (10000000 / (u32NewRes * 100)) % 100); 140 132 else 141 RTMsgError("NTSetTimerResolution succeeded but the NTQueryTimerResolution call failed with status %#x (ignored)\n", Status); 142 Status = 0; 133 RTMsgError("NTSetTimerResolution succeeded but the NTQueryTimerResolution call failed with status %#x (ignored)\n", 134 rcNt); 135 rcNt = STATUS_SUCCESS; 143 136 } 144 137 } 145 138 146 if (u32NewRes && Status >= 0)139 if (u32NewRes && NT_SUCCESS(rcNt)) 147 140 { 148 141 if (cSecsSleep == UINT32_MAX) … … 154 147 } 155 148 156 return Status >= 0? 0 : 1;149 return NT_SUCCESS(rcNt) ? 0 : 1; 157 150 } 158 151 -
trunk/src/VBox/ValidationKit/utils/nt/nttimesources.cpp
r62484 r62673 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 #include < Windows.h>31 #include <iprt/win/windows.h> 32 32 33 33 #include <iprt/asm.h> … … 84 84 int main(int argc, char **argv) 85 85 { 86 RT_NOREF1(argv); 87 86 88 /* 87 89 * Init, create a test instance and "parse" arguments.
Note:
See TracChangeset
for help on using the changeset viewer.