- Timestamp:
- Dec 20, 2023 12:01:26 PM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 160809
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r102492 r102647 1063 1063 r3/win/RTCrStoreCreateSnapshotById-win.cpp \ 1064 1064 r3/win/RTFileQuerySectorSize-win.cpp \ 1065 r3/win/RTFsMountpointsEnum-win.cpp \ 1065 1066 r3/win/RTHandleGetStandard-win.cpp \ 1066 1067 r3/win/RTLocaleQueryNormalizedBaseLocaleName-win.cpp \ … … 1162 1163 r3/linux/RTSystemShutdown-linux.cpp \ 1163 1164 r3/posix/RTFileQueryFsSizes-posix.cpp \ 1165 r3/posix/RTFsMountpointsEnum-posix.cpp \ 1164 1166 r3/posix/RTHandleGetStandard-posix.cpp \ 1165 1167 r3/posix/RTMemProtect-posix.cpp \ … … 2984 2986 VBoxRT_LIBS.win += \ 2985 2987 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/wbemuuid.lib \ 2988 $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/mpr.lib \ 2986 2989 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib 2987 2990 VBoxRT_LDFLAGS.darwin = \ -
trunk/src/VBox/Runtime/testcase/tstRTFsQueries.cpp
r98103 r102647 42 42 #include <iprt/initterm.h> 43 43 #include <iprt/stream.h> 44 #include <iprt/test.h> 44 45 #include <iprt/errcore.h> 45 46 46 47 48 struct TSTCTX 49 { 50 int var; 51 int rc; 52 } TestCtx = { 42, VINF_SUCCESS }; 53 54 DECLCALLBACK(int) mountpointsEnumCallback(const char *pszMountpoint, void *pvUser) 55 { 56 TSTCTX *pCtx = (TSTCTX *)pvUser; 57 RTTESTI_CHECK(pCtx->var == 42); 58 59 RTTestIPrintf(RTTESTLVL_ALWAYS, "Mountpoint: %s\n", pszMountpoint); 60 61 return pCtx->rc; 62 } 63 64 static void tstMountpointsEnum(RTTEST hTest) 65 { 66 RTTEST_CHECK_RC_OK(hTest, RTFsMountpointsEnum(mountpointsEnumCallback, &TestCtx)); 67 } 68 69 /** @todo r=andy Overhaul this code to make use of the RTTEST APIs. */ 47 70 int main(int argc, char **argv) 48 71 { 49 RTR3InitExe(argc, &argv, 0); 72 RTTEST hTest; 73 RTEXITCODE rcExit = RTTestInitExAndCreate(argc, &argv, 0 /* fFlags */, "tstRTFsQueries", &hTest); 74 if (rcExit != RTEXITCODE_SUCCESS) 75 return rcExit; 76 RTTestBanner(hTest); 50 77 51 78 /* … … 116 143 } 117 144 118 if (!cErrors) 119 RTPrintf("tstRTFsQueries: SUCCESS\n"); 120 else 121 RTPrintf("tstRTFsQueries: FAIlURE - %u errors\n", cErrors); 122 return !!cErrors; 145 tstMountpointsEnum(hTest); 146 147 if (cErrors) 148 RTTestFailed(hTest, "tstRTFsQueries: FAIlURE - %u errors\n", cErrors); 149 150 /* 151 * Done. 152 */ 153 return RTTestSummaryAndDestroy(hTest); 123 154 }
Note:
See TracChangeset
for help on using the changeset viewer.